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.

IChart. add Indicator Window (without indicator)
 Post subject: IChart. add Indicator Window (without indicator) Post rating: 0   Post Posted: Fri 10 May, 2013, 14:08 

User rating: 1
Joined: Mon 27 Feb, 2012, 22:49
Posts: 119
Location: Czech Republic,
In Java doc for IChart is not add() method.

I’d like to create (from strategy) in chart indicator window, but without indicator. I’d like to draw in this window from strategy. Draw some objects (small squares) creating points matrix(as a compressed information). Could you advise me?

Thanks


 
 Post subject: Re: IChart. add Indicator Window (without indicator) Post rating: 0   Post Posted: Fri 10 May, 2013, 14:38 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Consider creating an indicator which has an invisible output i.e. OutputParameterInfo.setShowValueOnChart(false) and which implements the IMinMax interface, to allow you to have some constant Y-axis i.e. price-axis value range, say 0 to 100:
    @Override
    public double[] getMinMax(int outputIdx, Object values2, int firstVisibleValueIndex, int lastVisibleValueIndex) {
            return new double[] {0, 100};
    }
Then plot the indicator on the chart from the strategy and afterwards plot the chart objects on the panel. Of course alternatively you can also draw chart objects right away from the indicator, see:
https://www.dukascopy.com/wiki/#Indicator_draws_chart_objects
or for more advanced case see HeikinAshiIndicator.java in platform sources:
https://www.dukascopy.com/wiki/#Platform_indicator_source_files


 
 Post subject: Re: IChart. add Indicator Window (without indicator) Post rating: 0   Post Posted: Fri 10 May, 2013, 14:41 

User rating: 1
Joined: Mon 27 Feb, 2012, 22:49
Posts: 119
Location: Czech Republic,
Thanks very much for fast answer. Have a nice weekend.


 

Jump to:  

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