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
If the 500-bar cycle and comparison of their values with the stored ones had to be done many times, and it would be longer than calculating the hash and comparing it with the stored one in the same cycle, 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 the resetting of prev_calculated?
The Expert Advisor calls the indicator every minute and checks what is new. If prev_calculated=0 is noticed, then it is a full recalculation, maybe it is not so long, but still. For example USDCNH pair is not so rare at my broker reset.
The reset time (prev_calculated=0):
P.S. I even wonder which candle changes if the terminal Max bar in history/chart is set to 2000/2000.
create an indicator with 4 indicator buffers that store OHLC - fill it when you run the indicator for the first time
when prev_calculated=0 write in the log file where there is a discrepancy between OHLC and buffers and then synchronize indicator buffers with newOHLC
HH: in principle, there is no sense to fill in buffers at the first indicator start - it can be done at prev_calculated=0
The Expert Advisor calls the indicator every minute and checks what is new, if prev_calculated=0 is seen, then there is a full recalculation, it may not take long to count but still. For example USDCNH pair is not rare at my broker reset.
Reset time (prev_calculated=0):
P.S. I even wonder which candle changes if the Max bar in history/chart is set to 2000/2000 in the terminal.Hardly a bar change. More likely something of a service.
I don't see the point in bothering with it at all.
More like something official.
Didn't know about that. Well then there's definitely no point in bothering with it. Just read in the handbook "If since the last call of OnCalculate() price data were changed (a deeper history was pumped or history gaps were filled in), then the value of input parameter prev_calculated will be set to zero by the terminal itself".
write an indicator with 4 indicator buffers storing OHLC - fill it at first start of the indicator
When prev_calculated=0 you write in the log where there is a discrepancy between OHLC and buffers and then synchronize indicator buffers with newOHLC
HH: in principle, there is no sense to fill in indicator buffers at first occurence - you may do it at prev_calculated=0
Yes thanks, for the sake of interest I'll do a separate indicator, check if the candles are changing or there's something service.
Question, someone did check for OrderModify? How to check it?
P.S. The contract specification is HSI50 (Full acces.)
At one broker MarketInfo() constantly (once or twice a day) flies off, gets value 0 ( specifically MODE_MARGINREQUIRED). It's kind of normal, but at the same time there is no attempt to reach the iCustom() indicator (connected through a resource). Even after MarketInfo() receives data, iCustom() remains silent. Only restarting the terminal helps. How to access the indicator without restarting the terminal, any ideas? Can the indicator disappear from a resource somewhere?
Good day!
One broker constantly (once or twice a day) MarketInfo() flies off, gets value 0 ( MODE_MARGINREQUIRED specifically). It's kind of normal, but at the same time there is no attempt to reach the iCustom() indicator (connected through a resource). Even after MarketInfo() receives data, iCustom() remains silent. Only restarting the terminal helps. How to access the indicator without restarting the terminal, any ideas? Can the indicator disappear from a resource somewhere?
That's the question I'd like an answer to.
I don't remember encountering "array out of range" for Time[1], but this fact happened in EA. Do you do some kind of check for "array out of range" for predefined array variables-Timeseries?