So, in this case, to achieve a situation when the first 240min *period* in a day starts at 8:00 and the last ends at 16:45, one would do as follows:
...........
BarPeriod=15;
FrameOffset=8;
TimeFrame= framesync(24);
TimeFrame=16; //15*16=240
price=.....
if hour()=1600 and minute()=45 { TimeFrame=0}

enterLong()
....................

Correct?

Last edited by Zheka; 11/08/17 19:22.