théorie de dow
Forums › ProRealTime forum Français › Support ProBuilder › théorie de dow
- This topic has 9 replies, 2 voices, and was last updated 2 weeks ago by
LucasBest.
-
-
01/30/2025 at 2:00 PM #243225
Bonjour,
j’ai établi un code pour lequel je rencontre certaines difficultés.
Conditions de départ pour définir une reprise de tendance haussière.
1) sommet 1> sommet 2 et sommet 2 < sommet 3 2) creux 1 > creux 2
3) Si sommet (S) et creux (C):
S1 est plus récent que S2 et S2 est plus récent que S3. Idem pour c1, c2 et c3.
4) S1 est en abscisse avant C1 et C2 est situé entre S1 et S2.
5) afficher texte sous low C1Au niveau des ordonnées cela semble fonctionner mais cela ne marche pas au niveau des abscisses. c’est à dire que je n’arrive pas à bloquer dans mon code un enchainement correct des sommets et des creux.
Merci à vous pour vos lumières.
01/30/2025 at 2:01 PM #243226théorie de DOW12345678910111213141516171819202122232425262728sommet=high<high[1] and high[1]>high[2]creux= low>low[1] and low[1]<low[2]if sommet then // sommet 1xs1=barindex[1]ys1=high[1]endifif Creux then // creux 1xc1=barindex[1]yc1=low[1]endifif sommet then // sommet 2xs2=xs1[1]ys2=ys1[1]endifif Creux then // creux 2xc2=xc1[1]yc2=yc1[1]endifif Creux then // creux 3xc3=xc2[1]yc3=yc2[1]endifConditionY= yc1>yc2 and yc2<yc3 and ys1>ys2ConditionX= XC1<XS1 AND XC2>XS2 AND XC2 <XS2if ConditionY and ConditionX then // CREUXdrawtext("DOW UP",XC1,YC1,Dialog,Bold,10) coloured(10,153,10)endif02/01/2025 at 12:22 AM #243300Dow12345678910111213141516171819202122232425262728293031323334// Once length = 1once S1x = 0once S2x = 0once S3x = 0sommet = high[length] = highest[2*length+1](high)creux = low[length] = lowest[2*length+1](low)If sommet thenS3x = S2xS3y = S2yS2x = S1xS2y = S1yS1x = barindex-lengthS1y = high[length]EndifIf creux thenC3x = C2xC3y = C2yC2x = C1xC2y = C1yC1x = barindex-lengthC1y = low[length]EndifConditionY = C1y > C2y and C2y < C3y and S1y > S2y and S2y < S3yConditionX = S1x > C1x and C1x > S2x and S2x > C2x and C2x > S3x and S3x > C3xif ConditionY and ConditionX thendrawarrowup(barindex, 2*low-high) coloured(10,153,10)endifReturn2 users thanked author for this post.
02/02/2025 at 10:15 AM #243331Bonjour LucasBest,
Merci pour ton retour, ta proposition de code m’a bien aidé.
Pour que cela fonctionne correctement, je dois simplifier les conditions X et Y comme suit:
ConditionY = C1y > C2y and S1y > S2y
ConditionX = S1x > C1x and S2x > C2xEn effet, il peut y avoir plusieurs creux haussiers entre 2 sommets consécutifs haussiers et/ou plusieurs sommets haussiers entre 2 creux consécutifs haussiers.
Lorsque l’on calcule S2, S3 et C2, C3 respectivement en fonction de S1 et C1 on n’intègre pas les cas particulières ci-dessus.
Du coup, le code n’identifie pas la plus part du temps les creux haussiers.
Je ne sais pas comment modifier le code pour les intégrer, d’où ma simplification.Je trouve intéressant ton code pour tracer les lignes de tendances et l’indication du nombre de sommet ou creux touchés.
Voudrais tu bien me le partager?Bien à toi.
02/02/2025 at 10:27 AM #243332Code modifié1234567891011121314151617181920212223242526272829303132333435363738394041424344REM DEF SOMMET et CREUX NIVEAU 1TDpointHighNiv11= high[2]<high[1] and high[1]>High[0] and high[1]>close[3]TDpointHighNiv12= high[3]<high[2] and high[2]=high[1] and high[1]>High[0] and high[2]>close[4]TDpointHighNiv13= high[4]<high[3] and high[3]=high[2] and high[2]=high[1] and high[1]>High[0] and high[3]>close[5]TDpointSommet = TDpointHighNiv11 or TDpointHighNiv12 or TDpointHighNiv13TDpointCreuxNiv11= low[2]>low[1] and low[1]<low[0] and low[1]<close[3]TDpointCreuxNiv12= low[3]>low[2] and low[2]=low[1] and low[1]<low[0] and low[2]<close[4]TDpointCreuxNiv13= low[4]>low[3] and low[3]=low[2] and low[2]=low[1] and low[1]<low[0] and low[3]<close[5]TDpointCreux = TDpointCreuxNiv11 or TDpointCreuxNiv12 or TDpointCreuxNiv13once S1x = 0once S2x = 0once S3x = 0Sommet = TDpointSommetCreux = TDpointCreuxIf sommet thenS3x = S2xS3y = S2yS2x = S1xS2y = S1yS1x = barindex[1]S1y = high[1]EndifIf creux thenC3x = C2xC3y = C2yC2x = C1xC2y = C1yC1x = barindex[1]C1y = low[1]EndifREM ordres des sommets et creux du plus récent noté (1) au plus ancien noté (2)ConditiontheorieDowXup = S1x > C1x and S2x > C2xConditiontheorieDowYup = C1y > C2y and S1y > S2yif ConditiontheorieDowXup and ConditiontheorieDowYup thendrawtext("DOW UP",C1x,C1y-atr,Dialog,Bold,20) coloured(10,153,10)endifReturn02/02/2025 at 10:50 AM #243336Question:
J’ai une superposition de résultats au même endroit donc un sur épaississement du texte, etc…
Comment peut-on éviter la superposition de résultat dans le code?😉
02/02/2025 at 11:10 AM #243341Correction12345678910111213141516171819202122232425262728293031323334353637// Once length = 2once S1x = 0once S2x = 0once S3x = 0once LastPivot = 1sommet = high[length] = highest[2*length+1](high)creux = low[length] = lowest[2*length+1](low)If sommet and LastPivot = -1 thenS3x = S2xS3y = S2yS2x = S1xS2y = S1yS1x = barindex-lengthS1y = high[length]LastPivot = 1EndifIf creux and LastPivot = 1 thenC3x = C2xC3y = C2yC2x = C1xC2y = C1yC1x = barindex-lengthC1y = low[length]LastPivot = -1EndifConditionY = C1y > C2y and C2y < C3y and S1y > S2y and S2y < S3yConditionX = S1x > C1x and C1x > S2x and S2x > C2x and C2x > S3x and S3x > C3xif ConditionY and ConditionX thendrawarrowup(barindex, 2*low-high) coloured(10,153,10)endifReturn02/02/2025 at 11:17 AM #243344Je trouve intéressant ton code pour tracer les lignes de tendances et l’indication du nombre de sommet ou creux touchés.
Voudrais tu bien me le partager?
Bien à toi.
Il s’agit d’un de mes 3 indicateurs les plus aboutis ; cela représente des semaines/mois de réflexion et plusieurs heures de code pour arriver à ce résultat… Il est évident que si je devais le poster quelque part, ça ne serait pas ici gratuitement mais sur la marketplace.
02/02/2025 at 11:23 AM #243345Pas de soucis, je comprends.
Merci pour ton aide !02/02/2025 at 11:28 AM #243347Pas de soucis, je comprends.
Merci pour ton aide !
Avec plaisir.
Je viens de poster un indicateur de supports et résistances (horizontaux et donc beaucoup plus facile à coder). Il faut mixer ce type d’indicateur à celui-ci (dow) pour filtrer les signaux… Mieux vaut peu de signaux, mais une convergence de signes pour ne trader que les setup les plus prometteurs.
1 user thanked author for this post.
-
AuthorPosts