yuan83:
can anyone advise, what's the coding for
at the start of each candle (different from the time frame you are using for the EA itself)
thanks!
https://www.mql5.com/en/forum/139517
:)
You can do something like this . . .
int TF = Period_M5; // what timeframe do you need ? datetime LastBarTF; // Time of the current bar, updated for each tick datetime CurrentBarTF = iTime(NULL, TF, 1 ); if (CurrentBarTF2 != LastBarTF ) //return if current bar hasn't finished { // do stuff in here that you want to do at the first tick of the new bar LastBarTF = iTime(NULL, TF, 1 ); }
RaptorUK:
You can do something like this . . .
hi Raptor,
thanks.
let me try to make some sense of your code..
datetime CurrentBarTF = iTime(NULL, TF, 1 ); will keep showing the same value due to the time frame defined, till the next 5 min is reached?
thanks.
yuan83:
Till the next 5 min Bar arrives . . . yes.
hi Raptor,
thanks.
let me try to make some sense of your code..
datetime CurrentBarTF = iTime(NULL, TF, 1 ); will keep showing the same value due to the time frame defined, till the next 5 min is reached?
thanks bro
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
can anyone advise, what's the coding for
at the start of each candle (different from the time frame you are using for the EA itself)
thanks!