美文网首页Dukascopy
Use Custom Indicator in Strategi

Use Custom Indicator in Strategi

作者: edenwzg | 来源:发表于2018-10-14 21:11 被阅读0次

    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:

    • register the indicator from a compiled .jfx file;
    • register the indicator from a class which is located within the strategy's java file.

    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.

    相关文章

      网友评论

        本文标题:Use Custom Indicator in Strategi

        本文链接:https://www.haomeiwen.com/subject/hibtzftx.html