3.8.4.2Loading indicators onto trading charts

A call to CreateDialog() or CreateSubWidget() can use the settings:{} block to specify indicators to load onto the trading chart. For example, the settings can contain a loadIndicators[] list:

Framework.CreateDialog({

…,

settings: {

// Load EMA and ATR indicators onto the chart

loadIndicators: [

{indicator: "EMA", indicatorSettings: {period: 10}},

{indicator: "ATR"} // Use default period (14 bars)

]

}

});

The definition of each indicator is the same as for a ChartChange() instruction:

Property

Description

indicator

The class name of an indicator in the FXB.ta library, such as "MACD" or "RSI". However, in addition to indicators from the FXB.ta library, it is also possible to load some extra indicators, as described in relation to a ChartChange().

indicatorSettings:{}

The parameters for the indicator, as specified when creating an instance of the FXB.ta class. You only need to specify parameters which you want to change from the defaults.