Type: Function, Name: VHF_ESD
Inputs: Length(NumericSimple);
Vars: Counter(0),
CloseDiff(0),
SumDiff(0);
CloseDiff = 0;
SumDiff = 0;
For Counter = 0 to Length — 1 Begin
CloseDiff = AbsValue(Close[Counter] — Close[Counter + 1]);
SumDiff = SumDiff + CloseDiff;
End;
If SumDiff = 0 Then SumDiff = 1;
VHF_ESD = (Highest(Close, Length) — Lowest(Close, Length)) / SumDiff;
Type: Indicator, Name: VHF Indicator
Inputs: Length(28);
Plot1(VHF_ESD(Length), «VHF»);