Dukascopy

Use Custom Indicator in Strategi

2018-10-14  本文已影响0人  edenwzg

Custom indicators can be used from a strategy just like any other standard JForex platform indicator. In order to use these custom indicators in calculations they must be registered first. There are two ways how one can register a custom indicator within a strategy:

For the former apporach one can also elect to package the indicators in the compiled strategy file, see below the first example for this. As an example of application of both approaches see onStart method of Simple custom indicator.

The following examples demonstrate ways how one can register custom indicators, handle their outputs and plot them on chart.

Package custom indicator in strategy jfx file

In order to package the indicators inside the compiled strategy one has to use the CustomIndicators annotation. This approach allows the user to run the strategy on other workstations without having to copy along the indicator jfx files.

Note: CustomIndicators available with JForex-API 2.7.9.5. IIndicators.getIndicatorByPath available with JForex-API 2.9.1.

上一篇下一篇

猜你喜欢

热点阅读