OnDeinit in indicators - page 8

 
mql5:
I will try to explain again (on my fingers):
  1. The terminal started up X amount of time after the last start-up
  2. Initiated history download, which is missing (terminal was idle for X minutes)
  3. Call OnCalculate for the existing history prevtime= the last known time of history, size of indicator buffer N bars
  4. While the history is being downloaded from the server, a tick comes
  5. Called OnCalculate of the indicator, where Time[0] is a tick time, the indicator records it as prevtime, the size of the indicator buffer is N+1 bars (between N and N+1 bars there is a gap in the history)
  6. After the history is downloaded, OnCalculate is called again, but this time there is no hole in the history, but prevtime has the same date as Time[0] - no new bar (respectively, no clearing of buffers in the indicator), buffer size of indicator N+X/Timeframe bars and IndBuffer[0] are not the same as in step 5



Thanks. I have a question here.

What if I set the max history size to be the same as in the settings? Bars will not change?

Reason: