cyborg1999:
I have just been writing a test DLL . I have a question regarding the arraycopyratesfunction.
When arraycopyrates is used to pass address of mqlrates array structureis this pointer then fixed for the duration of EA execution?
i.e. can we safey just use arraycopyrates in the EA init function topass address to DLL just once or does/could MT4 reallocate memory at anypoint regarding rates which means arraycopyrates should in theory becalled every tick i.e. within MT4 start function.
I have just been writing a test DLL . I have a question regarding the arraycopyratesfunction.
When arraycopyrates is used to pass address of mqlrates array structureis this pointer then fixed for the duration of EA execution?
i.e. can we safey just use arraycopyrates in the EA init function topass address to DLL just once or does/could MT4 reallocate memory at anypoint regarding rates which means arraycopyrates should in theory becalled every tick i.e. within MT4 start function.
Nearly all MQL functions are working on chart buffers copy, so they stay unchanged during the OnTick function. However, I am not sure if the other event functions refresh the buffer or not (like OnChartEvent or OnTimer).
You may also force the update during the event with RefreshRates() function.
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
When arraycopyrates is used to pass address of mqlrates array structure is this pointer then fixed for the duration of EA execution?
i.e. can we safey just use arraycopyrates in the EA init function to pass address to DLL just once or does/could MT4 reallocate memory at any point regarding rates which means arraycopyrates should in theory be called every tick i.e. within MT4 start function.