Market: Dow Jones
Timeframe: 1H
Direction: Long only
This strategy combines a breakout above a 600-period moving average with a trend filter based on the Ichimoku cloud.
The strategy aims to capture large bullish moves while filtering out weaker breakouts using the Ichimoku cloud.
A long position is opened when:
The ATR(14) is recorded at the time of entry and is used to calculate two profit targets:
The ATR value is fixed at the time of entry and does not change during the trade.
The remaining position is closed if price closes:
There is no fixed stop-loss in this version.
The strategy does not take overnight financing costs into account. This is particularly important when trading CFDs. The backtest was performed using an average spread of 4 points.
———————————————————————————————————————————————————————————
Marché : Dow Jones
Unité de temps : 1H
Direction : Achat uniquement
Cette stratégie combine une cassure de moyenne mobile 600 périodes avec un filtre de tendance basé sur le nuage Ichimoku.
La stratégie cherche à capter de grandes phases haussières tout en filtrant les cassures faibles grâce au nuage Ichimoku.
Une position acheteuse est ouverte lorsque :
L’ATR(14) est enregistré au moment de l’entrée et sert à calculer deux objectifs :
La valeur de l’ATR est figée au moment de l’entrée et ne change pas pendant le trade.
La position restante est fermée si le prix clôture :
Il n’y a pas de stop-loss fixe dans cette version.
La stratégie ne tient pas comptes des frais overnight. Attention si vous êtes en Cfd notamment. Backtest réalisé avec un spread moyen de 4.
//Dow Kumo Breakout
//DOW JONES
//TF 1H
defparam cumulateorders = false
defparam preloadbars = 100000
maperiod = 600
atrperiod = 14
tp1atr = 8
tp2atr = 20
positionsize = 2
tp1size = 1
tp2size = 1
trendma = average[maperiod](close)
myatr = averagetruerange[atrperiod](close)
tenkan = (highest[9](high) + lowest[9](low)) / 2
kijun = (highest[26](high) + lowest[26](low)) / 2
spana = (tenkan[26] + kijun[26]) / 2
spanb = (highest[52](high[26]) + lowest[52](low[26])) / 2
kumotop = max(spana,spanb)
kumobottom = min(spana,spanb)
once entryatr = 0
once initialpositionsize = 0
once tp1done = 0
breakma = close crosses over trendma
abovekumo = close > kumotop
longsignal = breakma and abovekumo
if not onmarket then
entryatr = 0
initialpositionsize = 0
tp1done = 0
if longsignal then
entryatr = myatr
initialpositionsize = positionsize
buy positionsize contracts at market
endif
endif
if longonmarket then
if tp1done = 0 and countofposition < initialpositionsize then
tp1done = 1
endif
tp1price = positionprice + (tp1atr * entryatr)
tp2price = positionprice + (tp2atr * entryatr)
breakmaexit = close < trendma
breakkumoexit = close < kumobottom
structurebreak = breakmaexit and breakkumoexit
if structurebreak then
sell at market
else
if tp1done = 0 then
sell tp1size contracts at tp1price limit
sell tp2size contracts at tp2price limit
else
sell at tp2price limit
endif
endif
endif
nice!