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
Developers, you have a mistake somewhere.
Look at the screenshot of Comment after closing the terminal and opening it after 1 minute.
Number of initialized elements and that the first, second, third and fourth element of the buffer is empty.
Indicator counts only the 0th buffer. So why 2 candles?
Developers, you have a mistake somewhere.
Look at the screenshot of Comment after closing the terminal and opening it after 1 minute.
Number of initialized elements and that the first, second, third and fourth element of the buffer is empty.
Indicator counts only the 0th buffer. So why 2 candles?
Because when you analyse for a new bar, you do not check the number of bars, but limit yourself to checking the time. When you start the terminal or break connection with the server during the operation, a tick comes before the missing (to the full history) bars arrive. At this tick, a new candle is created, but there is a gap (missing history) between it and the history in the terminal, which will be downloaded from the server and inserted in its place. After the opening of a new bar it will disappear.
And it doesn't matter that in deinit the zeroing occurs when the terminal is closed?
Vasily, run a test indicator that prints the number of bars.
This is what it prints in the log.
Maybe this will tell you where the problem is coming from...
Please ask the developers for a simple answer.
When the terminal is closed, is the DeInit() function executed in the programs attached to the chart?
Strictly speaking, no.
OnDeinit is executed. DeInit will only be executed if you call it explicitly from OnDeinit.
If you are referring to the old deinit function, also keep in mind that function names are case-sensitive. That is, deInit is an unknown function, deinit is a standard entry point on deinitialization (like OnDeinit)
And it doesn't matter that in deinit the zeroing takes place when the terminal is closed?
Who cares? When the terminal is closed, these buffers are no longer needed, because they will immediately be released when the program is unloaded, which occurs immediately after OnDeinit
Try just changing the timeframe. OnDeinit will work, buffers will remain (because program is not unloaded in this case), but no one guarantees their contents from "past life"
Read at last the documentation! https://docs.mql4.com/ru/runtime/running and https://docs.mql4.com/ru/runtime/event_fire#deinit
Who cares? When you close the terminal, these buffers are no longer needed, because they will immediately be released when the program is unloaded, which occurs immediately after OnDeinit
Try just changing the timeframe. OnDeinit will work, buffers will remain (as program unloading does not happen in this case), but no one guarantees their contents from "past life"
Read at last the documentation! https://docs.mql4.com/ru/runtime/running and https://docs.mql4.com/ru/runtime/event_fire#deinit
So in my case, the buffers are bifurcated when the graph is reopened?
You do not have buffer bifurcation.
This is how you fill your buffer yourself. The first time, when you draw it; the second time, when you get a portion of data. Both times you operate with the same Time[0] value.
You are not having a buffer split.
This is how you fill your buffer yourself. The first time at rendering and the second time at data arrival. Both times you operate with the same Time[0] value.
OK.
Please correct English help and that's it.
Also English help says thatArrayInitialize returns nothing.