
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
static datetime Time0;
int start()
{
bool newBar;
newBar = Time[0] > Time0;
if (newBar) Time0 = Time[0];
if (liHour == EndHour + GMToffset && newBar)
more conditions here
then open a buy or sell
Return(0);
}
Does the above IF condition with AND clause work ? It worked on backtesting.. but on live demo it didn't. I wanted the control to go into the loop only once in a day
exactly at 7 AM (USA PST) time and when the new bar is opened.
If I remove " && newBar" clause, the control goes into the loop until time turns to 8 AM. I don't want that..
Any ideas.. does time change and new bar does not happen at the same time ?