Questa è la formula base che si usa per comperare\vendere breakout di range temporali.
DEFPARAM cumulateOrders = false
startHour = 080000
cTime = time >= startHour // inizio dell’operatività
//——————————————————
if openTime = 000000 then
myHighest = high
myLowest = low
endif
if openTime >= 000000 and openTime <=080000 then // range temporale
myHighest = max (myHighest,high)
myLowest = min (myLowest,low)
endif
//————————————————————–
if not onMarket and cTime then
buy 1 contract at myHighest + (1*pointSize) stop
sellShort 1 contract at myLowest – (1*pointSize) stop
endif
1 user thanked author for this post.