Main Timeframe: 15-minute (EXCHANGE TIME)
Second Timeframe: DAILY
 {Strategy inputs} inputs: myFraction(4.7), N1higher(10), N2higher(16), N1main(4); {StopLoss} Input: sl(700); {Strategy Variables} vars: myBreakoutLong(0), TodaysOpen(0), ATR(0), EntryCond1long(false), EntryCond2long(false); //Point Of Initiation TodaysOpen = OpenD(0); //For the calculation of the space ATR = AvgTrueRange(40); //The BreakoutLevel (POI + space) myBreakoutLong = TodaysOpen + ( myFraction * ATR ); //higher timeframe filter condition (DAILY) EntryCond1long = 0.1 * (C of data2 - H[N1higher] of data2) < N2higher; //main timeframe filter condition (15 minute) EntryCond2long = CloseD(1) - Lowest(H, N1main) < ATR ; //Position size condition if closeD(1) < opend(1) then value1 = 2 Else Value1 = 1; //Entry Condition
if EntryCond1long = true and EntryCond2long = true and EntriesToday(Date) < 1
then buy value1 contracts next bar at
myBreakoutLong stop; //Exit Condition
If time = 1500 then sell currentcontracts contract this bar at close; //stopLoss Setstopposition; setstoploss(sl); //Exit at the end of the day - protection setexitonclose;