Hallo all
I like to code a strategy that take the 8.50 to 9.00 candles as a range and then executes a long above the range high or a short below the range low. I how can I give the code the to execute at the break of the range high or low? I have been trying but with no luck. Thank you for your help, really appreciate it!
I got this code but no trades are executed
// Definition of code parameters
DEFPARAM FLATBEFORE = 090000
DEFPARAM FLATAFTER = 120000
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
//Long Conditions
IF Time = 085500 THEN
SignalHigh = max(high, high[1])
SignalLow = min(low, low[1])
ENDIF
//Define the breatout Conditions
LongCondition = (open > SignalHigh and time >= 090000)
ShortCondition = (open < SignalLow and time >= 090000)
TradeLong = 0
TradeShort = 0
IF Time = 090000 and open= SignalHigh THEN
BUY 1 CONTRACT AT MARKET
ENDIF
//Set Stop-Loss
SET STOP TRAILING 20