The second indicator shows in a separate panel the total volume on up and down waves similar to Weiss, and you can change tot he average volume per up and down wave similar to Tim Ord's work.
{Wave Indicator}
[citation
="
For Total volume interpretations refer David Weiss’s Weiss Wave,
WeissonWyckoff.com; for Average Volume interpretations refer Tim Ord, The
Secret Science of Price and Volume, Wiley Trading 2008; For earlier Swing Volume accumulation
indicator refer to Jose Silva’s Volume
- Up/Down Swing Average indicator http://trader-online.tk/MSZ/e-!-v.html
"]
[target=Price]
{I have found that most ASX stocks up and down
moves “vibrate” to settings of between 3 to 5, and 7}
Vib:=input("Vibration", 4, .001,
100);
z:=Zig(If(Outside() AND Ref(H,-1)>Ref(H,-2),H,If(Outside() AND Ref(L,-1)<Ref(L,-2),L,If((Outside() OR Inside()) AND C>O,H,If((Outside() OR Inside()) AND O>C,L,If(H>Ref(H,-1),H,If(L<Ref(L,-1),L,If(Ref(H,-1)>Ref(H,-2),H,If(Ref(L,-1)<Ref(L,-2),L,C)))))))),Vib,%);
ispeak
:= z>hist(z,1) and z>future(z,1);
istrough
:= z<hist(z,1) and z<future(z,1);
[linestyle=Solid; color=Red]
z;
[color=Green]
[linestyle=Text; textalign=Above,Center; color=Red]
if(isPeak, " " + z, undefined);
High;
[linestyle=Text; textalign=Below,Center;color=Green]
if(isTrough, "" + z, undefined);
Low;
{This section colours up wave bars green and down
wave bars red}
[target=Price; linestyle=PriceColor]
Trendup:=Z>ref(z,-1);
Trendown:=Z<ref(z,-1);
[color=Green; name=Trendup]
Trendup;
[color=Red; name=TrendDown]
Trendown;
[color=white]
{Wave Total or Average Volume Indicator. Set vibration to same as used in wave
indicator}
[citation
="
For Total volume interpretations refer David Weiss’s Weiss Wave,
WeissonWyckoff.com; for Average Volume interpretations refer Tim Ord, The
Secret Science of Price and Volume, Wiley Trading 2008; For earlier Swing Volume accumulation
indicator refer to Jose Silva’s Volume
- Up/Down Swing Average indicator http://trader-online.tk/MSZ/e-!-v.html
"]
Vib:=input("Vibration", 4, .001,
100);
z:=Zig(If(Outside() AND Ref(H,-1)>Ref(H,-2),H,If(Outside() AND Ref(L,-1)<Ref(L,-2),L,If((Outside() OR Inside()) AND C>O,H,If((Outside() OR Inside()) AND O>C,L,If(H>Ref(H,-1),H,If(L<Ref(L,-1),L,If(Ref(H,-1)>Ref(H,-2),H,If(Ref(L,-1)<Ref(L,-2),L,C)))))))),Vib,%);
ispeak
:= z>hist(z,1) and z>future(z,1);
istrough
:= z<hist(z,1) and z<future(z,1);
UpZig:=Z>ref(z,-1);
DownZig:=Z<ref(z,-1);
{The next section shows the total or average volume
for each up or down waves. (The part of
the formula can be easily adapted to most other indicators by defining the
parameters for the BuyVol and downvol from any other indicator. For instance if the indicator was a
crossover of the close the set up is BuyVol =c>Ma(c,30,s) and Down
Vol<Ma(c,30,s) or see adaption to HA Volume indicator)}
v1:=input("1=Total volume on wave
or 2=Average volume on wave", 2, 1, 2);
[linestyle=Bar; width=4]
[name=Buy Vol; color=Green]
Buyvol:=
Upzig;
BuyVol2:=If(BuyVol,+1*v,0);
TotalBuyVol:=If( BuyVol ,+1*v+prev(BuyVol2),0);
Buybars:=barssince(Buyvol2=0);
if(v1=2,TotalBuyVol,undefined);
if(v1=1,TotalBuyVol/buybars,undefined);
[name=Sell Vol; color=Red]
Sellvol:=
Downzig;
SellVol2:=If(SellVol,+1*v,0);
TotalSellVol:=If( SellVol ,+1*v+prev(SellVol2),0);
Sellbars:=barssince(Sellvol2=0);
if(v1=2,TotalSellVol,undefined);
if(v1=1,TotalSellVol/Sellbars,undefined);
{This section shows horizontal line for comparison purposes
from latest total or average volume calculation}
[width=1]
[name=Total Sell Vol; Linestyle=Dash; color=Black]
if(v1=2,lastvalue( TotalSellVol),undefined);
if(v1=1,lastvalue( TotalSellVol/Sellbars),undefined);
[name=Total Buy Vol; Linestyle=Dash; color=Blue]
if(v1=2,lastvalue( TotalBuyVol),undefined);
if(v1=1,lastvalue(TotalBuyVol/Buybars),undefined);