DAX Donchian breakout Aktivator 1 hour

Category: Strategies By: Nicolas Created: March 8, 2016, 3:22 PM
March 8, 2016, 3:22 PM
Strategies
4 Comments

This automatic trading strategy on DAX GER30 is made of the indicator “Donchian Channel Activator Factor” available in the Library here : http://www.prorealcode.com/prorealtime-indicators/donchian-channel-activator-factor/

This system is a simple one, based on breakout of the recent highest or lowest on a 1 hour timeframe. Each trade has a stoploss made of the difference from the current close to last indicator value (upper or lower channel).

Test were made with 1 point spread, on mini-DAX CFD from ProRealTime-Trading.

//parameters
pd = 20
Factor = 1
ot = 1

//indicators
hi = HIGHEST[pd](high)[ot]
lo = LOWEST[pd](low)[ot]
DUpper=hi+Factor*AverageTrueRange[pd](close)
DLower=lo-Factor*AverageTrueRange[pd](close)

// case BUY
IF NOT LongOnMarket AND Close>hi AND Close[1]<hi THEN
  BUY 1 CONTRACTS AT MARKET
  stoploss = close-DLower
ENDIF

// exit BUY position
If LongOnMarket AND Close<lo THEN
  SELL AT MARKET
ENDIF

//case SELL
IF NOT ShortOnMarket AND Close<lo AND Close[1]>lo THEN
  SELLSHORT 1 CONTRACTS AT MARKET
  stoploss = DUpper-close
ENDIF

// exit SELL position 
IF ShortOnMarket AND Close>hi THEN
  EXITSHORT AT MARKET
ENDIF

SET STOP LOSS stoploss

Download
Filename: Donchian-Aktivator-System.itf
Downloads: 261
Nicolas Master
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

Logo Logo
Loading...