TREND TERRITORY 2

TREND TERRITORY 2

Type : Indicator, Name : TrendArea_2 Indicator

inputs: ThresholdArea(25),FastLen(15),
SlowLen(50);

vars: BarCount(0),SlowMA(0),FastMA(0),
color(0),area(0);

SlowMA = average(close,SlowLen);
FastMA = average(close,FastLen);

{ see if we have a new possible trend starting }
if FastMA crosses above SlowMA or
FastMA crosses below SlowMA then
BarCount = 0;

BarCount = BarCount + 1;

{ multiply each individual area by its barcount }
area = BarCount * (FastMA — SlowMA);

color = IFF(area > area[1] and area > 0,green,yellow);
if color = yellow and area < area[1] then
color = DarkGreen;
color = IFF(area < area[1] and area < 0,red,color);
if color = yellow and area > area[1] then
color = DarkRed;

plot1(area,»Area»,color);
plot2(0,»zero line»);
plot3(ThresholdArea,»+Thresh»);
plot4(-ThresholdArea,»-Thresh»);

Подписаться
Уведомить о
0 комментариев
Межтекстовые Отзывы
Посмотреть все комментарии