Bonjour,
Voici la formule en EXPRESS (whs futurestation nano) du calcul de l'ATR (Average True Range), avec une interprétation personnelle (totalement personnalisable bien sur). Bonne chance;
Express Average_True_Range
Vars
series TR, ATR;
input $period_ATR(1, 100, 5);
numeric truehigh, truelow;
Calculation
if IsFirstBar() then
begin
TR = high - low;
end
else
begin
truehigh = close[1];
if truehigh < high then
truehigh = high;
truelow = close[1];
if truelow > low then
truelow = low;
TR = truehigh - truelow;
end
if IsFinalBar() then
begin
ExpMovingAverage(TR, ATR, $period_ATR);
end
interpretation
begin
if (ATR > ATR[1]) or (ATR > ATR[2]) or (ATR > ATR[3]) then
if (close > open) then
sentiment = 100;
else if (close < open) then
sentiment = 0;
end
plot (ATR, 16, 152, 197, 2);
Voici la formule en EXPRESS (whs futurestation nano) du calcul de l'ATR (Average True Range), avec une interprétation personnelle (totalement personnalisable bien sur). Bonne chance;
Express Average_True_Range
Vars
series TR, ATR;
input $period_ATR(1, 100, 5);
numeric truehigh, truelow;
Calculation
if IsFirstBar() then
begin
TR = high - low;
end
else
begin
truehigh = close[1];
if truehigh < high then
truehigh = high;
truelow = close[1];
if truelow > low then
truelow = low;
TR = truehigh - truelow;
end
if IsFinalBar() then
begin
ExpMovingAverage(TR, ATR, $period_ATR);
end
interpretation
begin
if (ATR > ATR[1]) or (ATR > ATR[2]) or (ATR > ATR[3]) then
if (close > open) then
sentiment = 100;
else if (close < open) then
sentiment = 0;
end
plot (ATR, 16, 152, 197, 2);
Commentaire