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.

indicators.OutputParameterInfo.setColor2(..) is undefined
 Post subject: indicators.OutputParameterInfo.setColor2(..) is undefined Post rating: 0   New post Posted: Tue 02 Aug, 2011, 09:49 
User avatar

User rating: 3
Joined: Wed 18 May, 2011, 16:25
Posts: 331
Location: SwitzerlandSwitzerland
API Snapshot:

Quote:
setColor2
public void setColor2(java.awt.Color color2)Sets default color used when drawing trend down outputs

Parameters:
color2 - the color2 to set


The function is missing/undefined in the current release (2.13.26/API 2.6.38).

Best, RR.


 
 Post subject: Re: indicators.OutputParameterInfo.setColor2(..) is undefine Post rating: 0   New post Posted: Wed 03 Aug, 2011, 07:29 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Currently the function is available only in standalone API. It will be available in JForex client with the next release of JForex client.


 
 Post subject: Re: indicators.OutputParameterInfo.setColor2(..) is undefined Post rating: 0   New post Posted: Tue 19 Dec, 2017, 11:20 
User avatar

User rating: 21
Joined: Thu 19 May, 2011, 20:50
Posts: 413
Location: Germany, Munich
This works now, I tested it in the current JForex 3.2.21

        IChart chart = context.getChart(Instrument.EURUSD);
        IIndicator adx = indicators.getIndicator("ADX");
        for (int i = 0; i < adx.getIndicatorInfo().getNumberOfOutputs(); i++) {
            OutputParameterInfo output = adx.getOutputParameterInfo(i);
            output.setColor(Color.red);
            output.setColor2(Color.yellow);
        }
       
        chart.add(adx, new Object[]{14}, null, // color array value must be null here
        new DrawingStyle[]{DrawingStyle.LINE}, new int[]{1});

You have to set the color array to null, otherwise the color will be always overwritten by the chart.add function.


 

Jump to:  

  © 1998-2025 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