Probleme pour code affichage niveau ATR
Forums › ProRealTime forum Français › Support ProBuilder › Probleme pour code affichage niveau ATR
- This topic has 4 replies, 3 voices, and was last updated 3 weeks ago by
fleglo.
-
-
04/06/2025 at 3:14 PM #245628
Bonjour, J’essaye de faire afficher sur le panneau de prix des niveaux haut et bas suivant 1 et 2x ATR
Mais au niveau des 4 lignes commençant par drawtext PRT me signale une erreur au niveau des signes +.
Pourriez vous m’indiquer quelle est l’erreur dans mon code et comment le modifier ?
12345678910111213141516171819202122// ParamètresatrPeriod = 14myATR = AverageTrueRange[atrPeriod]basePrice = close // on évite le mot réservé 'price'// Calcul des niveauxhigh1ATR = basePrice + myATRlow1ATR = basePrice - myATRhigh2ATR = basePrice + 2 * myATRlow2ATR = basePrice - 2 * myATR// Affichage texte uniquement sur la dernière bougieif barindex = lastbarindex thendrawtext("1x ATR Max: " + high1ATR, barindex, high1ATR, dialog, red, 12)drawtext("1x ATR Min: " + low1ATR, barindex, low1ATR, dialog, red, 12)drawtext("2x ATR Max: " + high2ATR, barindex, high2ATR, dialog, blue, 12)drawtext("2x ATR Min: " + low2ATR, barindex, low2ATR, dialog, blue, 12)endifreturn high1ATR as "Max 1x ATR", low1ATR as "Min 1x ATR", high2ATR as "Max 2x ATR", low2ATR as "Min 2x ATR"merci
04/06/2025 at 3:46 PM #24562904/06/2025 at 3:59 PM #245630bon j’ai tout modifié
12345678910111213141516171819202122// ParamètresatrPeriod = 14myATR = AverageTrueRange[atrPeriod]basePrice = close // on évite le mot réservé 'price'// Calcul des niveauxhigh1ATR = basePrice + myATRlow1ATR = basePrice - myATRhigh2ATR = basePrice + 2 * myATRlow2ATR = basePrice - 2 * myATR// Affichage texte uniquement sur la dernière bougieif IsLastBarUpdate thendrawtext("1x ATR Max: :#high1ATR#", barindex, high1ATR, dialog, bold, 12)coloured("red")drawtext("1x ATR Min: #low1ATR#", barindex, low1ATR, dialog, bold, 12)coloured("red")drawtext("2x ATR Max: #high2ATR#", barindex, high2ATR, dialog, bold, 12)coloured("blue")drawtext("2x ATR Min: #low2ATR#", barindex, low2ATR, dialog,bold, 12)coloured("blue")endifreturn high1ATR as "Max 1x ATR", low1ATR as "Min 1x ATR", high2ATR as "Max 2x ATR", low2ATR as "Min 2x ATR"1 user thanked author for this post.
04/06/2025 at 5:25 PM #24563307/11/2025 at 12:34 PM #248816Bonjour, je n’ai pas trouvé d’autres forum plus proche que mon pb ATR sur le sujet.
J’ai un souci avec les différences entre les indicateurs de PRT et les mêmes de la fonction Graph, notamment les RSI et l’ATR qui ne correspondent pas du tout ce qui fausse tout le travail.
Comment résoudre ce problème svp ?
je joints une capture juste après l’intradaybarindex = 0 d’un ATR 66(close)
-
AuthorPosts
Find exclusive trading pro-tools on