{ Indicator }
Inputs:
UpColor(Black) , DnColor(Red) , vAvg.length(9) , vadjust(1.8) , VolAlert(false) , vChar("o"), offset(0.5) ;
Variables:
vol(0) , avgv (0) , volvlen(0) , barlength(0) ;
If BarType >= 2 then vol = Volume else vol = Ticks;
vol = volume ;
barlength = H - L ;
if vol > 0 and barlength > 0 then
volvlen = vol / barlength
else
volvlen = 0 ;
avgv = averageFc(volvlen, vAvg.length) ;
if volvlen > avgv * vadjust and O[1] > C[1] then
begin
Value1 = Text_New(D,T, Low - Range * offset, vChar ); // down bar
Value2 = Text_SetColor(Value1,UpColor);
If VolAlert = True then
begin
Alert("VolvLen down ");
End;
End;
if volvlen > avgv * vadjust and C[1] >= O[1] then
begin
Value1 = Text_New(D,T, High + Range * offset, vChar ) ; //up bar
Value2 = Text_SetColor(Value1,UpColor);
If VolAlert = True then
begin
Alert("VolvLen up ");
End;
End;
|