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.

custom indicator
 Post subject: custom indicator Post rating: 0   New post Posted: Mon 11 Jul, 2011, 13:29 
User avatar

User rating: 1
Joined: Tue 28 Jun, 2011, 20:38
Posts: 18
Location: United StatesUnited States
Hello Support,

I am using the simple indicator as an example and exercise and try to create my own indicator however I would need only to calculate output on a completed candle and not on every tick price as it is the case in the simpleindicator ?

Also when printing the input arguments of the calculate method on each call and at the beginning of the method startIndex and endIndex I noticed that startIndex value depends on the getLookback value which is coherent with documentation however the endIndex is not always the same and varies between 3995 and 4000 elements on each call of the calculate method? Why is that ? And why is 4000 the maximum it can return ?

Thank you,
cyberalgo


 
 Post subject: Re: custom indicator Post rating: 0   New post Posted: Wed 13 Jul, 2011, 16:13 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
cyberalgo wrote:
I am using the simple indicator as an example and exercise and try to create my own indicator however I would need only to calculate output on a completed candle and not on every tick price as it is the case in the simpleindicator ?

Indicators get recalculated on every tick if you simply don't need the in-progress candle's value you can ignore last element in the array of input values in your calculations.
cyberalgo wrote:
And why is 4000 the maximum it can return ?

Usually the maximum number of visible candles on screen is less than 2000 so 4000 is more than enough for an indicator.


 

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