|
Attention! Read the forum rules carefully before posting a topic.
Try to find an answer in Wiki before asking a question. Submit programming questions in this forum only. Off topics are strictly forbidden.
Any topics which do not satisfy these rules will be deleted.
Add indicator from strategy and set outputs details. |
lifon
|
Post subject: Add indicator from strategy and set outputs details. |
Post rating: 0
|
Posted: Sun 14 Mar, 2021, 07:57
|
|
User rating: 1
Joined: Mon 27 Feb, 2012, 22:49 Posts: 119 Location: Czech Republic,
|
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
|
|
|
|
|
API Support
|
Post subject: Re: Add indicator from strategy and set outputs details. |
Post rating: 0
|
Posted: Thu 06 May, 2021, 16:35
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
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.
|
|
|
|
|
lifon
|
Post subject: Re: Add indicator from strategy and set outputs details. |
Post rating: 0
|
Posted: Thu 06 May, 2021, 16:57
|
|
User rating: 1
Joined: Mon 27 Feb, 2012, 22:49 Posts: 119 Location: Czech Republic,
|
|
|
|
|
|
Pages: [
1
]
|
|
|
|
|