Combined SuperTrend, Parabolic SAR and MACD strategy

Category: Strategies By: cpgraham Created: May 15, 2016, 5:58 PM
May 15, 2016, 5:58 PM
Strategies
33 Comments

EUR / USD 1 minute strategy

This strategy is a combination of 3 indicators, SuperTrend, Parabolic SAR and MACD; also including the Range. A trade entry is generated following the switch of the Parabolic SAR from BUY to SELL or vice versa, after a longer Parabolic SAR run (the aim of this is to ignore shorter term price changes and focus on more significant trend changes). The attachments and performance is based on only £1 per pip, producing an approximate 9% return every 3 months. Compounding the trade size as your capital grows should produce a reasonable return (i.e. use the 2% compounding model as per Bob Volman’s book (2011) on FX scalping.

However this is far from perfect as I would like to improve the Win / Loss ratio. So any comments and improvements are welcome!

// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
DEFPARAM FlatBefore = 080000
DEFPARAM FlatAfter = 180000

ST = SuperTrend[3,5] //3,10
ParaSAR = SAR[0.02,0.02,0.03]
MCD = MACDline[12,26,150](close)
SIG = ExponentialAverage[9](MACDline[12,26,150](close))
Q = MCD - SIG
a=Range

p = 100 //100
a1= lowest[p](low) //p
b1= highest[p](high) //p
c1 =100* (3 * close - 2* a1 - open[p-1]) / customclose //p-1
c2 = 100*(open[p-1] + 2 * b1 -3 * close) / customclose //p-1
SR = exponentialAverage[p*5](c1) - exponentialAverage[p*5](c2) //5*p

ONCE countB = 0
ONCE countS = 0

IF ST[2] >= ST[1] THEN
countB = countB + 1
ELSE
countB = 0
ENDIF

IF ST[1] >= ST[2] THEN
countS = countS + 1
ELSE
countS = 0
ENDIF

// Conditions to enter long positions 0.045
IF NOT ONMARKET AND countB > 15 AND ST > ST[1] AND ParaSAR < close AND (Q - Q[1]) > (0.045*POINTSIZE) AND SR > SR[1] AND a[1] > 2*PIPSIZE THEN
BUY 1 PERPOINT AT MARKET
ENDIF

// Conditions to enter short positions  0.19 0.186
IF NOT ONMARKET AND countS > 15 AND ST[1] > ST AND ParaSAR > close AND (Q[1] - Q) > (0.186*POINTSIZE) AND SR < SR[1] AND a[1] > 2*PIPSIZE THEN
SELLSHORT 1 PERPOINT AT MARKET
ENDIF

// Stops and targets
SET TARGET pPROFIT 10
SET STOP PLOSS 10

 

Download
Filename: SuperTrend-SARMACD-1m-strat.itf
Downloads: 730
cpgraham Junior
As an architect of digital worlds, my own description remains a mystery. Think of me as an undeclared variable, existing somewhere in the code.
Author’s Profile

Comments

Logo Logo
Loading...