Hi,
I have some confused, when I need to amend the code? And how to amend to align with my time zone. Such as follows.
May I know the time 000000 to 200000, if my time zone is GMT+8. The code any update? thanks.
//ctime = time >= 000000 and time <= 220000
Horaire = time >= 000000 and time <= 200000
Thanks!
>> For clarity of messages on ProRealCode’s forums, please use the “insert code PRT” button to separate the text of the code part! Thank you! << 🙂
You need to set dates in this range:
Horaire = time >= 080000 and time <= 040000 //would be 280000 arithmetically
since the starting time is greater than the ending time, it’s a bit more complicated:
//Horaire = time >= 080000 and time <= 040000
Horaire = (time >= 080000) or (time >= 000000 and time <= 040000)
(not tested)
Thanks! robertogozzi
I have one more question on the time zone code
defparam flatbefore=090000
defparam flatafter=173000
If GMT+8, it will be
defparam flatbefore=170000
defparam flatafter=253000
Right? thanks.
No, I think you’d better not use DEFPARAM FlatBefore and FlatAfter, because 253000 is 013000 and it would conflict with FlatBefore which comes after.
You’d better use TIME to select the range of time you want to trade, such as:
TradingTime = (time >= 170000) OR ((time >= 000000) AND (time < 013000))
and also use TIME to close open trades at 013000:
IF time = 013000 THEN //close ALL open trades, if any,
SELL AT MARKET //no matter whether Long
EXITSHORT AT MARKET //or Short ones
ENDIF