Cul plat et moyennes mobiles
Bonjour à tous,
Tout d’abord point de vulgarité ! que neni ! un cul plat c’est un heikin ashi sans mèche basse !
J’aimerai faire un screener qui m’indique la première apparition d’un cul plat
après le croisement à la hausse de deux moyennes mobiles ( ex : 20 et 50)
J’ai bien essayé en automatique mais sans résultat probant.
Y a-t-il un codeur dans la salle qui saurait résoudre ce problème ?
Merci
Bonne fin de week end
Le screener ci-dessous détectera la première bougie Heikin Ashi faisant un “cul plat” après un croisement de moyennes mobiles en tendance haussière :
ma20 = average[20]
ma50 = average[50]
if ma20 crosses over ma50 then
start=barindex
endif
// ---- détection cul plat
xClose = (open+high+low+close)/4
IF BarIndex=0 THEN
xOpen = open
//xHigh = high
xLow = low
ELSe
xOpen = (xOpen[1] + xClose[1])/2
//xHigh = Max(Max(high, xOpen), xClose)
xLow = Min(Min(low, xOpen), xClose)
ENDIF
test = 0
if xopen<xclose and xlow=xopen and ma20>ma50 and lastbar<start then
lastbar=start
test = 1
endif
screener[test]
Bonjour Nicolas,
Après avoir installé ton code les résultats ressortent à la perfection , y compris les culs plats du jour du croisement.
Tout seul j’étais loin du compte alors merci beaucoup pour ton aide.
Bonne journée à toi et à la communauté
PS : chacun utilisera ses moyennes favorites ceci ne reflète que l’idée prudente d’un achat éventuel.
Bonjour à tous,
J’ai fais le screener inverse suivant le code de Nicolas mais sur ces deux derniers jours les résultats ne sont pas top, il detecte les HA baissiers mais
ce ne sont pas des culs plats !?
Quelqu’un voit-il le bug ?
merci
// CUL PLAT XDW MA2050 by Nicolas 25.10.2021
ma20 = average[20]
ma50 = average[50]
if ma20 crosses under ma50 then
start=barindex
endif
// ---- détection cul plat
xClose = (open+high+low+close)/4
IF BarIndex=0 THEN
xOpen = open
//xHigh = high
xLow = low
ELSe
xOpen = (xOpen[1] + xClose[1])/2
//xHigh = Max(Max(high, xOpen), xClose)
xLow = Min(Min(low, xOpen), xClose)
ENDIF
test = 0
if xopen>xclose and xlow<xopen and ma20<ma50 and lastbar<start then
lastbar=start
test = 1
endif
screener[test]
Pour avoir un cul plat dans l’autre sens, il faut que le plus haut soit égale à l’ouverture, soit xhigh=open à la ligne 49 et supprimer ton “xlow<xopen”
Bonjour Nicolas
Désolé je ne comprend pas bien ta réponse, j’ai fais ça mais ça ne marche pas
Peux tu y jeter un oeil
merci
// CUL PLAT XDW MA2050 by Nicolas 25.10.2021
ma20 = average[20]
ma50 = average[50]
if ma20 crosses under ma50 then
start=barindex
endif
// ---- détection cul plat
xClose = (open+high+low+close)/4
IF BarIndex=0 THEN
xOpen = open
xHigh = open
//xLow = low
ELSe
xOpen = (xOpen[1] + xClose[1])/2
//xHigh = Max(Max(high, xOpen), xClose)
// xLow = Min(Min(low, xOpen), xClose)
ENDIF
test = 0
//if xopen>xclose and xlow<xopen and ma20<ma50 and lastbar<start then
lastbar=start
if xhigh = open and ma20<ma50 and lastbar<start then
lastbar=start
test = 1
endif
screener[test]
A tester :
ma20 = average[20]
ma50 = average[50]
if ma20 crosses under ma50 then
start=barindex
endif
// ---- détection cul plat
xClose = (open+high+low+close)/4
IF BarIndex=0 THEN
xOpen = open
//xHigh = high
xLow = low
ELSe
xOpen = (xOpen[1] + xClose[1])/2
//xHigh = Max(Max(high, xOpen), xClose)
xLow = Min(Min(low, xOpen), xClose)
ENDIF
test = 0
if xopen>xclose and xhigh=xopen and ma20>ma50 and lastbar<start then
lastbar=start
test = 1
endif
screener[test]
Merci Nicolas
A priori le code fonctionnerait j’ai bougé 2 choses en gras, pour aujourd’hui ça va, je testerai dans les prochains jours pour confirmer
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
// CUL PLAT XDW MA2050 by Nicolas 29.10.2021
ma20 = average[20]
ma50 = average[50]
if ma20 crosses under ma50 then
start=barindex
endif
// ---- détection cul plat
xClose = (open+high+low+close)/4
IF BarIndex=0 THEN
xOpen = open
xHigh = high
//xLow = low
ELSe
xOpen = (xOpen[1] + xClose[1])/2
xHigh = Max(Max(high, xOpen), xClose)
//xLow = Min(Min(low, xOpen), xClose)
ENDIF
test = 0
if xopen>xclose and xhigh=xopen and ma20<ma50 and lastbar<start then
lastbar=start
test = 1
endif
screener[test]
Bonjour à tous,
J’ai testé le code ci-dessus dans plusieurs compartiments de la côte et a priori cela fonctionne bien.
merci Nicoolas ! (lol)
Bon week end