You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
It doesn't work...
The possibilities of the language have been cut.
Good afternoon!
In the indicator prev_calculated often becomes zero, due to which the indicator is often recalculated, which is not necessary. I am interested only in the last 500 candlesticks, if there is no history changing or new candlesticks coming in.
Please advise the best option. Maybe we should make a time array of each candlestick and check it via a loop? Or there are other variants?
Good afternoon!
In the indicator prev_calculated often becomes zero, due to which the indicator is often recalculated, which is not necessary. I am interested only in the last 500 candlesticks, if there is no history changing or new candlesticks coming in.
Please advise the best option. Maybe we should make a time array of each candlestick and check it via a loop? Or there are other variants?
We can try to calculate some hash for these candlesticks and compare it.
But it will change with each candlestick, so maybe the array-cache will be a better solution.
I'm looking formethods to sort an array of structures. Does anyone have any working variants ?
Here
You could try to calculate some hash for these candlesticks, and compare it.
But it will change with each candlestick, so maybe an array-cache would be a better solution.
If you inserted or deleted a bar, fine, if you corrected the shadows, no, in the latter case there is no quick solution at all. 500 bars is not the right amount of hash for it.
I meant hash by TOHLC
But there's really no point, probably.
If you inserted or deleted a bar, fine, if you tweaked the shadows, no, in the latter case there is no quick solution at all. 500 bars is not enough to hash it.
Thanks, I'm not familiar with hashes. Is 500 bars too little or too much for a hash?
I meant hash by TOHLC
But there's really no point, most likely.
Thanks, I'll compare TOHLC arrays then.
Thanks, I'm not familiar with hashes. Is 500 bars too little or too much for hashing?
If the loop on 500 bars and comparison of their values with stored ones had to be done many times, and it would be longer than counting hash and comparing it with memorized one in the same loop, then it would make sense.
But this is hardly the case.
What's taking you so long to count that you notice the rare occurrence of resetting prev_calculated?