DBS-WHERE

DBS-WHERE

Type : Indicator, Name: DBS-Where

Inputs: Ceil(60), Flr(20);

Vars: X(0), Y(0), ZDelta(0), VarA(0), VarB(0), OldVarA(0),
TopB(0), LowB(0), Where(0), WhereH(0), WhereL(0);

Y = X;
X = Stddev(Close, 30);
ZDelta = (X — Y) / X;

If CurrentBar = 1 then
VarA = 20;

OldVarA = VarA;
VarA = OldVarA * (1 + ZDelta);
VarA = MaxList(VarA, Flr);
VarA = MinList(VarA, Ceil);
VarB = VarA * 0.5;

TopB = Highest(High, VarA)[1];
LowB = Lowest(Low, VarA)[1];
WhereH = (High — LowB) * 100 / (TopB — LowB);
Where = (Close — LowB) * 100 / (TopB — LowB);
WhereL = (Low — LowB) * 100 / (TopB — LowB);

If WhereH > 67 Then Where = WhereH;
If WhereL < 33 Then Where = WhereL;

Plot1(Where, «%-Where»);
Plot2(100, «Upper»);
Plot3(0, «Lower»);

Николай Солабуто
Оцените автора
Николай Солабуто
Добавить комментарий