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.

How to make a repainting indicator?
 Post subject: How to make a repainting indicator? Post rating: 0   New post Posted: Mon 28 Dec, 2009, 18:51 
User avatar

User rating: 0
Joined: Wed 19 Nov, 2008, 20:45
Posts: 10
I have a repainting indicator but this is the way it works. Currently it leaves output arrows on the screen even when I set unstablePeriod to true and change previously drawn values in output array to NaN.

Is there any way around it?


 
 Post subject: Re: How to make a repainting indicator? Post rating: 0   New post Posted: Tue 29 Dec, 2009, 11:33 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
what you mean by
Quote:
I have a repainting indicator but this is the way it works.
The unstablePeriod mode is used for specific indicator, such as EMA, calculations.
Why do you think that previously calculated and drawn indicator values should change?


 
 Post subject: Re: How to make a repainting indicator? Post rating: 0   New post Posted: Tue 29 Dec, 2009, 14:27 
User avatar

User rating: 0
Joined: Wed 19 Nov, 2008, 20:45
Posts: 10
Support wrote:
what you mean by
Quote:
I have a repainting indicator but this is the way it works.
The unstablePeriod mode is used for specific indicator, such as EMA, calculations.
Why do you think that previously calculated and drawn indicator values should change?


Well, I just need it for eyecandy. The signal been calculated and new data arrives and that very same signal moves to the new bar.

In metatrader there are a lot of repainting indicators like COG and others, so I wonder is it possible to do this in jforex with indicators engine. I am sure I can do it from within a strategy by adding and deleting objects, yet I wonder is it possible or will ever be possible from indicators.


 
 Post subject: Re: How to make a repainting indicator? Post rating: 0   New post Posted: Tue 29 Dec, 2009, 16:21 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
The function setRecalculateAll will help you to do this.(https://www.dukascopy.com/swiss/docs/api/com/dukascopy/api/indicators/IndicatorInfo.html#setRecalculateAll(boolean))
indicatorInfo.setRecalculateAll(true);


 

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