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 ?
// Paramètres
atrPeriod = 14
myATR = AverageTrueRange[atrPeriod]
basePrice = close // on évite le mot réservé 'price'
// Calcul des niveaux
high1ATR = basePrice + myATR
low1ATR = basePrice - myATR
high2ATR = basePrice + 2 * myATR
low2ATR = basePrice - 2 * myATR
// Affichage texte uniquement sur la dernière bougie
if barindex = lastbarindex then
drawtext("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)
endif
return high1ATR as "Max 1x ATR", low1ATR as "Min 1x ATR", high2ATR as "Max 2x ATR", low2ATR as "Min 2x ATR"
merci
j’ai pas verifié
drawtext("1x ATR Max:#high1ATR", barindex, high1ATR, dialog, red, 12)
bon j’ai tout modifié
// Paramètres
atrPeriod = 14
myATR = AverageTrueRange[atrPeriod]
basePrice = close // on évite le mot réservé 'price'
// Calcul des niveaux
high1ATR = basePrice + myATR
low1ATR = basePrice - myATR
high2ATR = basePrice + 2 * myATR
low2ATR = basePrice - 2 * myATR
// Affichage texte uniquement sur la dernière bougie
if IsLastBarUpdate then
drawtext("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")
endif
return high1ATR as "Max 1x ATR", low1ATR as "Min 1x ATR", high2ATR as "Max 2x ATR", low2ATR as "Min 2x ATR"
Merci beaucoup pour ce retour rapide.
Bonjour, 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)