
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
Volume is unreliable, you can skip ticks. Always use Time[] or iTime():
Oh I see, I didnt take that into account ... oh well it seemed like a good idea at the time lol, Im glad you pointed that out I was going to use it in my EA.
I did notice something when I tested the volume Alert, new bars dont always start at the exact time of the new bar, the first tick to starts the new bar is often several seconds after the beginning of the time period. Would this not mean a second order could still be sent on the last price quote of the old bar even though a new time period on time[] has begun ?
Chistabo:
"... I should check if this is first time the Code is executed, then proceed ..."
"... I should check if this is first time the Code is succesfully executed, then proceed ..." ?
"... I should check if this is first time the Code is succesfully executed, then proceed ..." ?
Hello, guys!
Yes, Ais, we agree.
If anybody interested, here is present Code which works just fine:
Thank you all for help,
HAVE FUN,
Simon
PS: will upload complete Code, if I find where to...
Oh I see, I didnt take that into account ... oh well it seemed like a good idea at the time lol, Im glad you pointed that out I was going to use it in my EA.
I did notice something when I tested the volume Alert, new bars dont always start at the exact time of the new bar, the first tick to starts the new bar is often several seconds after the beginning of the time period. Would this not mean a second order could still be sent on the last price quote of the old bar even though a new time period on time[] has begun ?
Two solutions to store values between reloads:
1. using Global Variables -> https://docs.mql4.com/globals;
2. using files -> https://docs.mql4.com/files.
I like 1.
"Global variables are kept in the client terminal within 4 weeks since the last access <added by me> <even if terminal restarts or shuts off> </added by me>, then they will be deleted automatically. An access to a global variable is not only setting of a new value, but reading of the global variable value, as well." <- https://docs.mql4.com/globals.