Ichimoku Dax M15
I present you this algorithm that works exclusively with ichimoku…
This one seems profitable since 2012, we will also be able to note that are the adaptive stoploss system allows him to pass a stock market karck without problem and to be always in cohesion with the volatility.
However, you will notice that it lacks some optimizations, in its current state, I do not recommend to use it, this is why I transmit this code so that we can optimize it together.
This code could be much better, unfortunately, partial closings are not yet available and I still lack skills in this area .
However, I’m sure you’ll find something to make it look better.
Yours sincerely,
//--------------------Paramettre de Base
DEFPARAM CumulateOrders = False
DEFPARAM FLATBEFORE = 080000
noEntryAfterTime = 220000
timeEnterAfter = time < noEntryAfterTime
//--------------------Money Management
Capital = 10000
Risque = (Capital*1)/100
Stopp = ValueStop
Lotss = Risque/Stopp
set stop loss Stopp
//--------------------Paramettre de StopLoss
MA1 = Average[50,0](TypicalPrice)
Up1 = MA1 + (1.65*Average[50,1](Range))
Down1 = MA1 - (1.65*Average[50,1](Range))
MA2 = Average[100,0](TypicalPrice)
Up2 = MA2 + (1.65*Average[100,1](Range))
Down2 = MA2 - (1.65*Average[100,1](Range))
MA3 = Average[150,0](TypicalPrice)
Up3 = MA3 + (1.65*Average[150,1](Range))
Down3 = MA3 - (1.65*Average[150,1](Range))
MA4 = Average[200,0](TypicalPrice)
Up4 = MA4 + (1.65*Average[200,1](Range))
Down4 = MA4 - (1.65*Average[200,1](Range))
Up = (Up1+Up2+Up3+Up4)/4
Down = (Down1+Down2+Down3+Down4)/4
ValueStop = (UP-Down)
//--------------------Indicateur
//Ichimoku
Tenkan = (highest[9](high)+lowest[9](low))/2
Kijun = (highest[26](high)+lowest[26](low))/2
SSpanA = (tenkan+kijun)/2
SSpanB = (highest[52](high)+lowest[52](low))/2
SpanA = (tenkan[26]+kijun[26])/2
SpanB = (highest[52](high[26])+lowest[52](low[26]))/2
//--------------------Paramettre d'Achat
//Ichimoku UP
IU1 = SSpanA => SSpanB and SpanA > SpanB
IU2 = close > SpanA[26] and close > SpanB[26]
IU3 = close > tenkan[26] and close > kijun[26]
IU4 = close > high[26]
IU5 = close > Kijun and close > Tenkan
IU6 = Tenkan > SpanA and Tenkan > SpanB
IU7 = Kijun > SpanA and Kijun > SpanB
IU8 = Tenkan > kijun and tenkan > tenkan[1]
IU = IU1 and IU2 and IU3 and IU4 and IU5 and IU6 and IU7 and IU8
//Bougie
BGUP = (close-open) > (high-close)
//Regroupement des commande
TUP = IU
if TUP then
TUP1 = 1
else
TUP1 = 0
endif
//--------------------Paramettre d'Achat
IF TUP and BGUP and TUP1[1] = 1 and timeEnterAfter THEN
BUY Lotss CONTRACT AT MARKET
ENDIF
IF close < kijun and close > positionprice THEN
SELL AT MARKET
ENDIF
//--------------------Paramettre de Vente
//Ichimoku Down
ID1 = SSpanA =< SSpanB and SpanA < SpanB
ID2 = close < SpanA[26] and close < SpanB[26]
ID3 = close < tenkan[26] and close < kijun[26]
ID4 = close < low[26]
ID5 = close < Kijun and close < tenkan
ID6 = Tenkan < SpanA and Tenkan < SpanB
ID7 = Kijun < SpanA and Kijun < SpanB
ID8 = Tenkan < kijun and tenkan < tenkan[1]
ID = ID1 and ID2 and ID3 and ID4 and ID5 and ID6 and ID7 and ID8
//Bougie
BGDown = (open-close) > (close-low)
//Regroupement des commande
TDOWN = ID
if TDOWN then
TDOWN1 = 1
else
TDOWN1 = 0
endif
//--------------------Paramettre de Vente
IF TDOWN and BGDown and TDOWN1[1] = 1 and timeEnterAfter THEN
SELLSHORT Lotss CONTRACT AT MARKET
ENDIF
IF close > kijun and close < positionprice THEN
EXITSHORT AT MARKET
ENDIF
Thank you for sharing your idea. It’s a food for thought 🙂