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.

Identifying index of updating Candle
 Post subject: Identifying index of updating Candle Post rating: 0   New post Posted: Wed 27 Jan, 2010, 13:57 

User rating: 0
Joined: Mon 25 Jan, 2010, 20:52
Posts: 13
Hi,

I need to draw Last updating Candle in different manner.

So how come I know that candle which I am drawing is last candle(lastest) and it is updating.

public void drawOutput(Graphics g, ...........
        for (int i = indicatorDrawingSupport.getIndexOfFirstCandleOnScreen(), j = 0; j < indicatorDrawingSupport.getNumberOfCandlesOnScreen(); i++, j++) {
           g.setColor(color);
            int candleMiddle = (int) indicatorDrawingSupport.getMiddleOfCandle(i);
............
        }


Regards.


 
 Post subject: Re: Identifying index of updating Candle Post rating: 0   New post Posted: Thu 28 Jan, 2010, 12:06 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
In IIndicatorDrawingSupport there is a method isLastCandleInProgress. This method will return true if the data passed to drawOutput method contains in-progress candle as it's last element in array.


 

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