Open Range Breakout DAX 5/15M

Category: Strategies By: Reiner Created: June 10, 2016, 4:40 PM
June 10, 2016, 4:40 PM
Strategies
27 Comments

Hi guys,

Open range breakout systems are very popular. They are simple and reliable with volatile instruments like the DAX. I trade the ORB together with the equity curve because as all breakout systems they could have some ugly drawdown phases. These concept is very easy and is described perfectly here in the Blog. Add to the equity curve a simple moving average and trade only if the curve is above the MA could help to avoid ugly losses.

I want to share an easy ORB strategy works profitable in M5 and M15 – this is not a big thing but maybe helpful for some PRT beginners.

have fun

Reiner

// Open Range Breakout DAX 5/15M

// code-parameter
DEFPARAM FlatAfter = 173000

// window high/low calculation
ONCE StartTime = 90000
ONCE EndTime = 93000

// trading window
ONCE BuyTime = 93000
ONCE SellTime = 173000

// money management
ONCE Capital = 10000
ONCE Risk = 0.01
ONCE StopLoss = 10
ONCE equity = Capital + StrategyProfit
ONCE maxrisk = round(equity*Risk)
ONCE PositionSize = abs(round((maxrisk/StopLoss)/PointValue)*pipsize)
// fixed position size
//ONCE PositionSize = 10

//signal line
signal = Tema[5](close)

// calculate high/low and sl/tp
IF Time >= StartTime AND Time <= EndTime THEN
 IF TIME = StartTime THEN
  DailyHigh = High
  DailyLow = Low
 ENDIF
 IF High > DailyHigh THEN
  DailyHigh = High
 ENDIF
 IF Low < DailyLow THEN
 DailyLow = Low
 ENDIF

 sl = DailyHigh - DailyLow
 tp = sl

 TradeCounterLong = 0
 TradeCounterShort = 0
ENDIF

// position management
IF Time >= BuyTime AND Time <= SellTime THEN
 // Long
 IF Not LONGONMARKET AND signal CROSSES OVER DailyHigh AND TradeCounterLong = 0 THEN
 // long
  IF (Time >= 93000 AND Time <= 113000) OR (Time >= 130000 AND Time <= 171500) THEN // no trading during lunch
   BUY PositionSize CONTRACT AT MARKET
   TradeCounterLong = TradeCounterLong + 1
  ENDIF
 ENDIF
// short
 IF Not SHORTONMARKET AND signal CROSSES UNDER DailyLow AND close < DClose(1) AND TradeCounterShort = 0 THEN
  IF Time >= 93000 AND Time <= 150000 THEN // short breakouts after 1500 are not profitable
   SELLSHORT PositionSize CONTRACT AT MARKET
   TradeCounterShort = TradeCounterShort + 1
  ENDIF
 ENDIF

 // close positions
 IF Time = SellTime THEN
   IF LONGONMARKET THEN
    SELL AT MARKET
   ENDIF
  IF SHORTONMARKET AND Time = SellTime THEN
   EXITSHORT AT MARKET
  ENDIF
 ENDIF

// stops and targets
SET STOP LOSS sl
SET TARGET PROFIT tp

ENDIF

 

Download
Filename: Open-Range-Breakout-DAX-5-15M.itf
Downloads: 957
Reiner Veteran
I usually let my code do the talking, which explains why my bio is as empty as a newly created file. Bio to be initialized...
Author’s Profile

Comments

Logo Logo
Loading...