I’m testing on h1, ohlc mode on 1m, you only need a few minutes, how to skip hlc ticks in ontick ?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Our community is a completely independent place for communication between forex traders and software developers for trading platforms Metatrader 4 and Metatrader 5
Create A New Account
topmett
Thanks
scriptong
Elementary:
bool IsNewBar(const ENUM_TIMEFRAMES eTF)
{
static datetime dtLastTime = 0;
if (iTime(NULL, eTF, 0) == dtLastTime)
return false;
dtLastTime = iTime(NULL, eTF, 0);
return true;
}
...
if (!IsNewBar(PERIOD_M1))
{
//Skip tick
}