Bonjour NiCOOLas,
Merci pour ton code qui répond point par point à mes conditions,
J’avais bien bidouillé un truc mais j’étais encore loin du compte !
Pour les artistes j’ai coloré le rectangle .
Ton code m’a révélé qu’il manquait une condition au descriptif,
Le rectangle n’apparait que lorsque la tendance est EMA9>EMA18
Alors serait-il possible de garder l’empreinte du rectangle jusqu’à
Ce que le prix revienne dans cette zone rectangulaire.
Si c’est possible ce serait très bien sinon je garderai le code tel quel.
Encore merci pour ta disponibilité malgré la somme de travail que tu dois avoir.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
// ZBK NICOLAS 09/11/2021 defparam drawonlastbaronly = true ema9 = average[9,1] ema18 = average[18,1] if ema9 crosses under ema18 then ll=low endif if ema9<ema18 then ll = min(ll,low) if ll<>ll[1] then bar = barindex endif endif if ema9>ema18 then offset = max(1,barindex-bar) // drawrectangle(bar,low[offset],barindex,high[offset]) drawrectangle(bar,low[offset],barindex,high[offset])COLOURED(176,242,182,50)bordercolor(0,255,0)STYLE (line,1) endif return ema9,ema18 |