Dukascopy
 
 
Wiki JStore Search Login

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.
 Post subject: Add indicator from strategy and set outputs details. Post rating: 0   New post 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


 
 Post subject: Re: Add indicator from strategy and set outputs details. Post rating: 0   New post Posted: Thu 06 May, 2021, 16:35 
User avatar

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.


 
 Post subject: Re: Add indicator from strategy and set outputs details. Post rating: 0   New post Posted: Thu 06 May, 2021, 16:57 

User rating: 1
Joined: Mon 27 Feb, 2012, 22:49
Posts: 119
Location: Czech Republic,
Thank you.


 

Jump to:  

  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com