Hello,
I coded custom indicator which is functional in JForex Platform.
Now I wanted to use it in my strategy (standalone JForex API without JForex Platform).
So I took as an example
Object[] rsiObject2=indicators.calculateIndicator(trading_instrument, periodbar, new OfferSide[] {OfferSide.BID}, "RSI", new IIndicators.AppliedPrice[] {IIndicators.AppliedPrice.CLOSE}, new Object[] {14} , Filter.ALL_FLATS, 2, bidBar.getTime(), 0);
this surely works, since "RSI" is standard.
I tried
Object[] bmrObject=indicators.calculateIndicator(trading_instrument, periodbar, new OfferSide[] {OfferSide.BID}, "BMR_DRAFT", new IIndicators.AppliedPrice[] {IIndicators.AppliedPrice.CLOSE}, new Object[] {14} , Filter.ALL_FLATS, 2, bidBar.getTime(), 0);
where "BMR_DRAFT" is the unique name given by me in
new IndicatorInfo("BMR_draft", "Gives BMR", "My indicators", true, false, false, 1, 1, 2);
when coding this indicator.
After running I got an exception---
Exception message: Indicator with name BMR_DRAFT was not found
com.dukascopy.api.JFException: Indicator with name BMR_DRAFT was not found
at com.dukascopy.api.impl.Indicators$IndicatorCalc.calculate(Indicators.java:6400)
at com.dukascopy.api.impl.Indicators.calculateIndicator(Indicators.java:4731)....
---
And this is quite logical! Since the system has no Idea about my indicator.
So, how can I still use my custom indicator???