Optimize session trading hours
At the beginning of your start() procedure put something like :
That will prevent execution at times outside the desired session
You could use broker or local time too for that purpose but in that case back-testing might become problematic. To use broker time do it the following way :
and for local time use this :
[PHP]if (TimeLocal()sessionEnd) return(0);Hi all,
Wich is the way to go optimizing session range? i mean, how i can optimize sessionStart sessionEnd, could you give some example code?.
Best,
Vince.Thanks mladen,wich is the correct approach to do not have problems in backtesting/optimizing?Best,Vince.
Hi all,
Wich is the way to go optimizing session range? i mean, how i can optimize sessionStart sessionEnd, could you give some example code?.
Best,
Vince.