help - checking bar opening
MA
As written, your var
olBarTime
is volatile & is being reset each tick - when start() executes again
To do what I think you want, use a static var which preserves its state (i.e. value) across ticks
--
static int oldBarTime; init() { oldBarTime=Time[0]; } int start() { if(oldBarTime!=Time[0]) { oldBarTime=Time[0]; Print("Opening of a 15 mn bar"); } return(0); }
Good luck
-BB-
Dear All,
I am trying to use the following code and cant make it work. I have check and rechecked the code seem clean, I cant figure out why nothing is being printed....please help.
Nothing is being printed...did i miss something ?
thx!