Hello everyone,
At the request of one of us, I wrote this code, the translation of this strategy exposed by IG :
https://www.youtube.com/watch?v=vnCsFRrNq7s
CAC40, M15.
Actually, I put both positions “long” and “short” (the video only shows « long » trades).
Although the strategy is positive WITHOUT spread, I am surprised and disappointed by the results.
WITH SPREAD, we’re just negative on all tested data !
I still publish this strategy, which unfortunately is therefore not profitable with the spread.
With some improvement from you, it could be positive.
Good trades to all !
// CAC40 12-18
// PARAMETRES
Defparam cumulateorders = false
Defparam flatafter = 173000
// TAILLE DES POSITIONS
n = 5
// VARIABLES
iMACDline = MACDline[12,26,9](close)
iEAMACD = ExponentialAverage[9](MACDline[12,26,9](close))
iRSI = RSI[14](close)
iSuperTrend = SuperTrend[3,10]
// CONDITIONS ACHAT
ctime = time > 090000 and time < 171500
c1a = iMACDline crosses over iEAMACD
c2a = iRSI < 65
c3a = close > iSuperTrend
IF ctime AND c1a AND c2a AND c3a THEN
Buy n shares at market
ENDIF
// CONDITIONS VENTE
ctime = time > 090000 and time < 171500
c1a = iMACDline crosses under iEAMACD
c2a = iRSI > 35
c3a = close < iSuperTrend
IF ctime AND c1a AND c2a AND c3a THEN
Sellshort n shares at market
ENDIF
// STOP & OBJECTIF
Set stop pLoss 12
Set target pProfit 18