Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

Add indicator from strategy and set outputs details.
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=65&t=57623
Page 1 of 1

Author:  lifon [ Sun 14 Mar, 2021, 07:57 ]
Post subject:  Add indicator from strategy and set outputs details.

Hello support,

I add indicator MACD to chart from strategy (IChartPanel.add(..)). I need to show only histogram. How can I do it (from strategy). In java dokumentation I didn't find it.

Thank you

Author:  API Support [ Thu 06 May, 2021, 16:35 ]
Post subject:  Re: Add indicator from strategy and set outputs details.

Greetings.

IIndicator indicator = indicators.getIndicator("MACD");

for (int i = 0, n = indicator.getIndicatorInfo().getNumberOfOutputs(); i < n; i++) {
indicator.getOutputParameterInfo(i).setShowOutput(i == 2);
}

chart.add(indicator, new Object[] {12, 26, 9});

Regards.

Author:  lifon [ Thu 06 May, 2021, 16:57 ]
Post subject:  Re: Add indicator from strategy and set outputs details.

Thank you.

  Page 1 of 1