logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
dimpledbrain  
#1 Posted : Saturday, September 7, 2013 10:14:27 AM(UTC)
dimpledbrain

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/7/2013(UTC)
Posts: 17

Thanks: 5 times

Hi All,

I need you help guys. I'm trying to get cumulative volume based on zigzag indicator.

The zigzag formula that i m using is

{ High/Low ZigZag v2.0

Copyright © 2004-2008 Jose Silva.
For personal use only.
Not for re-sale or redistribution.
http://www.metastocktools.com }

{ User inputs }
change:=Input("ZigZag minimum reversal amount",.001,100000,5);
method:=Input("Method: [1]$ points, [2]% percent",1,2,2);
choose:=Input("ZigZag based on: [1]Hi/Lo, [2]Close",1,2,1);

{ ZigZag }
diffHi:=H-Ref(H,-1);
diffLo:=Ref(L,-1)-L;
x:=If(diffLo>diffHi,L,H);
zzPts:=
If(choose=1,Zig(x,change,$),Zig(C,change,$));
zzPer:=
If(choose=1,Zig(x,change,%),Zig(C,change,%));
zz:=If(method=1,zzPts,zzPer);

{ Plot on price chart }
zz{ High/Low ZigZag v2.0

Copyright © 2004-2008 Jose Silva.
For personal use only.
Not for re-sale or redistribution.
http://www.metastocktools.com }

{ User inputs }
change:=Input("ZigZag minimum reversal amount",.001,100000,5);
method:=Input("Method: [1]$ points, [2]% percent",1,2,2);
choose:=Input("ZigZag based on: [1]Hi/Lo, [2]Close",1,2,1);

{ ZigZag }
diffHi:=H-Ref(H,-1);
diffLo:=Ref(L,-1)-L;
x:=If(diffLo>diffHi,L,H);
zzPts:=
If(choose=1,Zig(x,change,$),Zig(C,change,$));
zzPer:=
If(choose=1,Zig(x,change,%),Zig(C,change,%));
zz:=If(method=1,zzPts,zzPer);

{ Plot on price chart }
zz

How do i plot the cumulative wave vol as per zig zag above (both % and $). And upwave and downwave volume can be differentiated by colour

many thanks. W

mstt  
#2 Posted : Saturday, September 7, 2013 5:24:25 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)

Hi W

Page 6 of the September 2012 issue of MSTT has a short article, including MetaStock code, that was in effect a response to a very similar question on this forum over a year ago. The link to the newsletter concerned is www.metastocktips.co.nz/mstt_sample_newsletter_sep_2012.pdf.

Hope this helps. The code will obviously need to be adapted to work with Jose's indicator, but I'm sure you'll learn a lot more by doing the adustments yourself rather than passing it over to someone else. Give it a try anyway. You will need the Forum DLL installed for my code to work. You can download the ForumDll_200 DLL from the Forum Files section. Rename the DLL to "Forum" or change my code to use the existing name.


Roy
dimpledbrain  
#3 Posted : Saturday, September 7, 2013 7:01:28 PM(UTC)
dimpledbrain

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/7/2013(UTC)
Posts: 17

Thanks: 5 times
ok many thanks :)
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.