PureBytes Links
Trading Reference Links
|
Von Hef wrote:
>
> Well,
> Here is my effort to code Larry Williams "Zero Balance" to MetaStock.
> There are some differences I should point out:
>
> Larry Williams uses High's and Low's in his calculations, and I used
> closing prices.
> Instead of plotting actual points, I found (for forecasting future
> values) that
> graphing the actual "Zero Balance" in a stairstep fashion works pretty
> well.
> I was also unable to calculate the "Important Recorded High's and
> Low's"
> in the same fashion as Williams, so I used 5% ZigZag in my
> calculations,
> which seems to give similar results.
>
> { ZB8 }
> IRH:=If((Zig(C,5,%)>Ref(Zig(C,5,%),-1))AND
> (Zig(C,5,%)>Ref(Zig(C,5,%),1)),
> {then}C,{else}0);
> IRL:=If((Zig(C,5,%)<Ref(Zig(C,5,%),-1))AND
> (Zig(C,5,%)<Ref(Zig(C,5,%),1)),
> {then}C,{else}0);
> ZB8:=If(BarsSince(IRH>0)<BarsSince(IRL>0),
> {then}(ValueWhen(1,IRL>0,C)+
> ValueWhen(2,IRH>0,C))
> -ValueWhen(3,IRH>0,C),
> {else}(ValueWhen(1,IRH>0,C)+
> ValueWhen(2,IRL>0,C))
> -ValueWhen(3,IRL>0,C));
> ZB8;
>
> One of the ways Williams teaches to use Zero Balance is to look for 3
> consecutive
> moves of ZB8 in the same direction (up or down, rather than up and
> down), he claims
> that many tops and bottoms can be detected this way. I have attached
> some graphs
> showing what he means.
>
>
>
>
> Does this work everytime? I dont know, I just developed the code last
> night,
> and I will test further. Could this next chart be signaling a market
> turn? Time
> will tell.
>
>
>
>
> ZB8 calculates the value Zero Balance point 8 should be,
> In other words the peak or trough of the close shown on the
> chart is where point 7 is calculated from, and the dashed line
> of ZB (that starts on the same day as a peak or trough ) is
> the projected value of the next peak or trough (ZB8). Williams
> claims that if the price is above ZB then it is "overbought",
> and if below ZB then "oversold". Williams seems to promote
> the 3 moves instead of overbought/oversold aspect.
> Now if you followed all that, this next formula will calculate the
> value of ZB point 9, keep in mind that this is plotting the ZB value
> that WILL be, a peak and trough in the future.
>
> { ZB9 }
> IRH:=If((Zig(C,5,%)>Ref(Zig(C,5,%),-1))AND
> (Zig(C,5,%)>Ref(Zig(C,5,%),1)),
> {then}C,{else}0);
> IRL:=If((Zig(C,5,%)<Ref(Zig(C,5,%),-1))AND
> (Zig(C,5,%)<Ref(Zig(C,5,%),1)),
> {then}C,{else}0);
> ZB9:=If(BarsSince(IRH>0)<BarsSince(IRL>0),
> {then}(ValueWhen(1,IRH>0,C)+
> ValueWhen(1,IRL>0,C))
> -ValueWhen(2,IRL>0,C),
> {else}(ValueWhen(1,IRL>0,C)+
> ValueWhen(1,IRH>0,C))
> -ValueWhen(2,IRH>0,C));
> ZB9;
>
> Perhaps there is a better way to do this.......... please feel free
> to comment,
> Adam Hefner
>
>
> [Image] [Image]
Adam,
I am not at all familiar with Metastock programming although I use
Metastock 6.5(6.52), but my question is: Why does the above code not
work on Financials such as Jap Yen, Swiss Franc, Br Pound, etc?
Is there another way to code this to work on Currencies?
Thanks
Randy
|