Dear Community, Dear Support,
I am using a version of TesterMainGUIMode from the wiki to test my strategy and see the price and positions on a chart.
Now I want to add 3 ema indicators: on high, low and close.
Ema on CLOSE was easy with:
IChart chart = context.getChart(instrument);
if (chart != null) {
IIndicator ema = indicators.getIndicator("EMA");
chart.add(ema, new Object[]{34});
}
Now I want to add the ema on the AppliedPrice.HIGH and AppliedPrice.LOW
When looking at the indicator metadata, I get:
Exponential Moving Average: input count=1, optional input count=1, output count=1
Input 0: Price - DOUBLE
Opt input: Time Period, range: min=2, max=100000, default= 30
Output 0: Line - DOUBLE
I am (almost) sure there is a way to specify on which price to apply (high, low, close, etc...); may be by manipulating somehow the input. Unfortunately, I could not find out how in the wiki, forums or javadoc how to do it!
Thank you in advance for any help!