Indicator Usage Checklist

If indicator values are different on chart and in strategy, please, check the following:

  • Chart and strategy must have the same filters. The filters on chart can be changed in JForex client settings: Tools > Preferences > Chart > Flats Filtration. Also the offer sides should match (i.e. BID/ASK).
  • GMT time zone must be used in strategy. Please, see date formatting for further details on using time in a strategy.
  • Note that onBar() method is called when a bar has finished. The bar with index 0 in history corresponds to the new unfinished bar. Whereas index 1 corresponds to the last finished bar, that is also passed to onBar() as askBar and bidBar. Therefore, the value of indicator at shift 0 is not yet final and will change when the the bar is completed.
  • Please check that timezone settings on chart and in strategy are equal by setting them in (Tools > Preferences > Chart > "Day start time"), (Tools > Preferences > General > "Platform time zone")
  • Indicator output is affected by Base period

For more convenient value comparison, plot OHLC info object on chart from strategy with option IOhlcChartObject.setShowIndicatorInfo(true), see example Include in OHLC.

The information on this web site is provided only as general information, which may be incomplete or outdated. Click here for full disclaimer.