Bonjour, j’aimerais parametrer un screener qui détecte les configs suivantes: dernière bougie ( j’utilise un blanc/noir sur les graphes et en barchart pour mieux les detecter) et heikensashi de meme nature ( haussiere ou baissiere). donc blanc/vert ( BV) ou noir/rouge( NR) avec comme signal ( haussier) buy >du plus haut d’une NR si cours > bandeau de hull . quelques exemples suivent ( pour faciliter la vue , à nouveau j’ai placé un barchart ( blanc/noir au lieu de vert/rouge) à la place d’une bougie classique. Par la suite, le signal 5* sera: buy >noir/rouge NR si cours >hull et inversement sell< blanc/vert ( BV) si cours <bandeau de hull. D’autre signaux sur configs 2 bougies tels que; blanc/rouge ( BR) apres une noir/rouge ( NR) alors sell<NR si hull negatif. si hull positif, une NR aprés un BR alors buy>NR. J’ai identifié plusieurs configs qui donnent régulièrement des points avec un stoploss proche. Les stoploss sont placés sous le plus bas d’une NR si signal BUY ou au dessus d’une BV si signal SELL
Comme parametre, le timeframe. Il faut detecter les weekly daily puis dans toutes les UT inférieures jusqu’au 5mn.
Pour le bandeau de hull, j’utilise celui ci
//conversion de code tradingview
//@version=4
//study(“Hull Trend with Kahlman”, shorttitle=”HMA-Kahlman Trend”, overlay=true)
//variables
//longueur=24
//showcross=t
//gain=10000
//k=f
//nonrepainting=f
src=customclose
longueur =longueur
showcross = showcross
gain = gain
k = k
hma= WeightedAverage[ROUND(SQRT(length))](2 * WeightedAverage[ROUND(length / 2)](src) – WeightedAverage[length](src))
// Calcul des composants de l’indicateur HMA3
p=(length /2)
wma1 = WeightedAverage[round(p/3)](close)
wma2 = WeightedAverage[round(p/2)](close)
wma3 = WeightedAverage[round(p)](close)
// Calcul de l’indicateur HMA3
ga=3*wma1-wma2-wma3
hma3 = WeightedAverage[round(p)](ga)
// Initialisation des variables du filtre de Kalman
ONCE Pred = src
ONCE Velo = 0
ONCE Smooth = src
kf = src
// Boucle de calcul pour le filtre de Kalman
IF BarIndex > 0 THEN
Smooth = Pred + (src-Pred)*SQRT((gain/10000)*2)
Velo=Velo+((gain/10000)*(src-Pred))
Pred=Smooth +Velo
kf=Pred
ENDIF
wma1f = WeightedAverage[round(p/3)](kf)
wma2f = WeightedAverage[round(p/2)](kf)
wma3f = WeightedAverage[round(p)](kf)
// Calcul du filtrage de b
gaf=3*wma1f-wma2f-wma3f
if k then
a =WeightedAverage[ROUND(SQRT(length))](2 * WeightedAverage[ROUND(length / 2)](kf) – WeightedAverage[length](kf) )
b =WeightedAverage[round(p)](gaf)
endif
sinon k alors
a = hma
b = hma3
endif
si showcross alors
crossdn =a traverse b
atrh = moyennetruerange[10](close)*0,5
si nonrepainting=0 alors
si crossdn alors
DRAWTEXT(“.”, barindex-1,high[1]+atrh,dialog,bold,20)colored(250,250,0)
//DRAWPOINT(barindex-1,high[1]+atrh,4)colored (255,250,250,100)bordercolor(0,0,0,0)
endif
crossup = a croise sous b
si crossup alors
DRAWTEXT(“.”, barindex-1,b[1]-atrh,dialog,bold,20)coloured(250,255, 0)
//DRAWPOINT(barindex-1,b[1]-atrh,5)colored(250,255,250,100)bordercolor(0,0,0,0)
endif
endif
si nonrepainting=1 alors
si crossdn alors
DRAWTEXT(“Vh”, barindex ,high+atrh,dialog,bold,20)coloured(255,250,0)
//DRAWPOINT(barindex,high+atrh,5)coloured(255,250,250)bordercolor(0,0,0,0)
endif
crossup = a croise sous b
si croisé alors
DRAWTEXT(“Ah”, barindex,b-atrh,dialog,bold,20)coloured(250,255,0)
//DRAWPOINT(barindex,b-atrh,5)coloured(250,250,250)bordercolor(0,0,0 ,0)
endif
endif
endif
renvoie a comme « coque », b comme « coque3 »