DEFPARAM CumulateOrders = False //no more than 1 trade allowed
DEFPARAM FlatAfter = 235959 //Comment this out to keep trades running overnight
ONCE StartBreak = 000000 //Start of BreakOut strategy time, no trades
ONCE EndBreak = 070000 //End of BreakOut strategy time, trades on
ONCE NoMoreTrades = 240000 //Time to stop entering new trades
ONCE MinPrice = 0 //Lowest price (initial value)
ONCE MaxPrice = 0 //Highest price (initial value)
IF (time >= StartBreak) AND (time <= EndBreak) THEN //Check at each bar
IF close < MinPrice THEN //Update minimun if a lower closing price is met
MinPrice = close
ENDIF
IF close > MaxPrice THEN //Update maximum if a higher closinfg price is met
MaxPrice = close
ENDIF
ENDIF
IF OnMarket THEN //Set variables to initial ZERO after entering a
MinPrice = 0 // trade, so they are ready for the next break out
MaxPrice = 0
ENDIF
IF (time >= EndBreak) AND (time < NoMoreTrades) THEN
.
. //you wanna put your orders here according to
. // your conditions
.
ENDIF