Trend Surfer DAX

Category: Strategies By: Reiner Created: May 21, 2016, 8:59 AM
May 21, 2016, 8:59 AM
Strategies
36 Comments

Hi guys,

my first post 🙂 is one of my DAX systems based on the TDI indicator working on a 5 minute chart.

have fun

Reiner

// Trend Surfer DAX

// code-Parameter
DEFPARAM FlatAfter = 170000

// DAX trading window
ONCE BuyTimeMorning = 90000
ONCE SellTimeMorning = 110000
ONCE BuyTimeAfternoon = 150000
ONCE SellTimeAfternoon = 170000

// traders dynamic indicator
ONCE q = 14
ONCE r = 4
ONCE t = 29

// tdi filter parameter
ONCE longPriceLevel = 35
ONCE shortPriceLevel = 40
ONCE middleBandLevel = 40

// trading parameter
ONCE PositionSize = 1
ONCE sl = 250
ONCE tp = 50

// position management during trading window
IF (Time >= BuyTimeMorning AND Time <= SellTimeMorning) OR (Time >= BuyTimeAfternoon AND Time <= SellTimeAfternoon) THEN

 // calculate TDI indicator
 RSIasPrice = RSI[q](customclose)
 Priceline = Average[r](RSIasPrice)
 MiddleBand = Average[t]((RSIasPrice))

 // open position
 // long
 IF Not LONGONMARKET AND Priceline > MiddleBand AND Priceline > longPriceLevel AND MiddleBand > middleBandLevel THEN
  BUY PositionSize CONTRACT AT MARKET
 ENDIF

 // short
 IF Not SHORTONMARKET AND Priceline CROSSES UNDER MiddleBand AND Priceline > shortPriceLevel THEN
  SELLSHORT PositionSize CONTRACT AT MARKET
 ENDIF

 // close position
 IF Time = SellTimeMorning OR Time = SellTimeAfternoon THEN
  // long
  IF LONGONMARKET THEN
   SELL AT MARKET
  ENDIF
  IF SHORTONMARKET THEN
   EXITSHORT AT MARKET
  ENDIF
 ENDIF

 // stop and profit
 SET STOP pLOSS sl
 SET TARGET pPROFIT tp

ENDIF

 

Download
Filename: Trend-Surfer-DAX.itf
Downloads: 776
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...