Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Submit JForex API bug reports in this forum only.
    Submit Converter issues in Converter Issues.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

How to add HeikinAshi indicator on chart with custom params
 Post subject: How to add HeikinAshi indicator on chart with custom params Post rating: 0   New post Posted: Fri 24 Jan, 2014, 15:20 
User avatar

User rating: 7
Joined: Thu 05 Sep, 2013, 12:43
Posts: 56
Location: Russian Federation, Tomsk
Hi,
I want to add HeikinAshi indicator on chart. When I use this code
chart.add(indicators.getIndicator("HeikinAshi"));

indicator will be added with default parameters
Image

But I need that Up bars be GREEN and Down bars be RED
Image

When I use this code
chart.add(indicators.getIndicator("HeikinAshi"), new Object[] {null}, new Color[]{Color.GREEN,Color.RED}, new DrawingStyle[]{DrawingStyle.LINE}, new int[]{1});

indicator will be added but HeikinAshi border will be GREEN and HeikinAshi candle will be RED. It is not right.
Image


Thanks for help


 

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