Disliked{quote} bool FirstTimeInLoop = true; // put this in the variables section before init() if (NewBar() && FirstTimeInLoop ) // dont need == true as the compiler assumes it so { Close position function ? Open new position function ? FirstTimeInLoop = false; // after its been through the loop once it will be locked out until FirstTimeInLoop is again set to true.........}Ignored
You mean put the code before expert initialization function, could it work? Because EA loop only the int start() function after it pass through initialization function, how can it reset to true again?
Thanks.