Merci pour ton aide Ivan. voici un des code de l’indicateur disponible sur le forum.
// Screener TrendDECODER
// Signal 1 : TrendUP H1
// Signal 2 : TrendUP M15 and GreyBox in an M15 UpTrend
//signalType details:
// 1 = new bullish trend detected (from red to blue cloud)
// -1 = new bearish trend detected (from blue to red cloud)
// 2 = grey box during bullish trend
// -2 = grey box during bearish trend
// 3 = red trend line breakout
// -3 = blue trend line breakout
// adjust below the size and the liquidity of the assets you want to trade
minPrice = close > 5
minVol = summation[10](volume) > 2000
// ===============================================
timeframe (1H)
data1, ignored, ignored, TrendLine1 = CALL “TrendDecoder_datas”(close)
if data1 = 1 and data1[1]=0 then
trend1=1
endif
if data1 = -1 then
trend1=0
endif
testH1 = trend1 and Close > TrendLine1
// ===============================================
timeframe (15 minutes)
data2, ignored, ignored, TrendLine2 = CALL “TrendDecoder_datas”(close)
if data2 = 1 and data2[1]=0 then
trend2=1
endif
if data2 = -1 then
trend2=0
endif
testM15 = trend2 and Close > TrendLine2
// ===============================================
timeframe (5 minutes)
data3, ignored, ignored, TrendLine3 = CALL “TrendDecoder_datas”(close)
if data3 = 1 and data3[1]=0 then
trend3=1
endif
if data3 = -1 then
trend3=0
endif
testM5 = trend3 and Close > TrendLine3
// ===============================================
Timeframe (default)// M1
ignored, ignored, ignored, TrendLine4 = CALL “TrendDecoder_datas”(close)
testM1 = Close < TrendLine4
screener[testM1 and testM5 and testM15 and testH1 and minPrice and minVol]
Modifié par le modérateur en saisissant le code à l’aide du bouton « Ajouter un code d’outillage ». Pensez à faire de même dans vos prochains messages.
je te joint également le message de la mise a jour du concepteur:
Hi TrendDECODERS,
After many requests, we have updated our backtest function.
You now have the possibility to include Trailing Stop Loss values to make your exits thanks to the “TrailLong” and “TrailShort” variables which correspond respectively to the boundaries of the Blue and Orange Clouds;
TrailLong is the farthest edge of the price and TrailShort the closest;
Signals, TrailLong, TrailShort = CALL “TrendDecoder_datas”(close)
The 6 values of the “Signals” variable are as follows:
// 1 = new UP trend detected (from red cloud to blue cloud)
// -1 = new DOWN trend detected (from blue cloud to red cloud)
// 2 = GreyBOX during the uptrend
// -2 = GreyBOX during a downtrend
// 3 = break out of the red Realtime trendline
// -3 = break out of the blue Realtime trendline
You also have this post on Prorealcode that may help:
https://www.prorealcode.com/topic/backtests-timeframe-multiple-avec-trenddecoder/page/2/#post-195391
=> Of course, you’ll have to replace the “TrendDecoder_datas” function in the code with the one above because we’ve enhanced it 😉
Timeframe (15mn, updateonclose)
Signal15 = CALL “TrendDecoder_datas”(close) => Signals15, TrailLong15, TrailShort15=CALL “TrendDecoder_datas”(close)
NB: the function CALL “TrendDecoder_datas”(close) is a free bonus given on reques to TrendDECODER customers with identified licence
je voudrais pouvoir le configurer de façon a détecter M15 en trend haussier et M5 en signal UP.
et inversement pour la tendence baissière.
encore un grand merci Ivan.