Dear community,
I am very new to the Forex and JForex world so a newbie asks for some help.
I am also not sure if this is the right topic for such question, but after searching around in the forums I haven`t found a better place...
I am trying to place stochRSI on a chart from my strategy. I am trying to use IChart.addIndicator() which I have found in this example:
https://www.dukascopy.com/wiki/#Add_indi ... de_in_OHLCBut I don`t know what parameters do I have to define for the IChart.addIndicator() to make this work.
If I manually add a stochRSI to a chart, I can define 5 things:
Price,
Time period,
Fast K period,
Fast D period,
Fast D MaType,
So I gave it a try to use these:
public int srsiTimePeriod = 14;
public int srsiFastKPeriod = 14;
public int srsiFastDPeriod = 14;
public AppliedPrice appliedPrice = AppliedPrice.CLOSE;
chart.addIndicator(indicators.getIndicator("stochRSI"), new Object [] {srsiTimePeriod, srsiFastKPeriod, srsiFastDPeriod, MaType.EMA});
This compiled, but at start I got:
Unexpected optional parameter [com.dukascopy.api.IIndicators$MaType]=[EMA] for index [3]
Based on
https://www.dukascopy.com/wiki/#Indicator_metadata/Retrieve_indicator_metadata the stochRSI has the following metadata:
Output 1: Fast %D - DOUBLE
Output 0: Fast %K - DOUBLE
Opt Input 3: Fast %D MAType - OTHER
Opt Input 2: Fast %D Period - OTHER
Opt Input 1: Fast %K Period - OTHER
Opt Input 0: Time Period - OTHER
Input 0: Price - DOUBLE
Stochastic Relative Strength Indicator: input count=1, optional input count=4, output count=2
What do I miss here?
Thanks in advance.