[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EquisMetaStock Group] Re: Gann Trend



PureBytes Links

Trading Reference Links

There are some differences in ver8 and earlier versions but the 
formula should work. Do you have the GANN-Trend formula installed? If 
so and you are still having problems can you be specific as to the 
problem.

P


--- In equismetastock@xxxxxxxxxxxxxxx, tradingau <no_reply@xxxx> 
wrote:
> Can someone shed some light on the formula below
> 
> Point 3b and 3c simply do not work for me. I am using ver8 and was 
> wondering if this particular formula works only for older versions.
> 
> Any help would be appreciated
> 
> Gann Swing Update
> 
> This is an update to Gann-Swing indicators I had posted several 
months
> back. Most of the code has been improved and I have modified the 
swing
> definition slightly.
> 
> Gann Weekly Expert Instructions
> 
> 1. First create a new expert and name it whatever you want.
> 2a. under "trends" tab put this code for bullish:
> ut:=FmlVar("GANN-Trend","TDV");
> uplot:=If(BarsSince(Ut=1)<
> BarsSince(Ut=-1),1,0);
> uplot=1;
> 2b. and this for bearish:
> dt:=FmlVar("GANN-Trend","TDV");
> dplot:=If(BarsSince(dt=1)>
> BarsSince(dt=-1),1,0);
> dplot=1;
> Then click on the "ribbon" option and turn off "Display Vertical 
> Lines", I
> also turn off
> the corner option.
> 3a. Under highlights tab create a new and call it "HiLo Change", 
> choose
> color, and enter this code:
> HLd:=If(CLOSE>Ref(Mov(H,3,S),-1),
> {then}1,
> {else}If(CLOSE<Ref(Mov(L,3,S),-1),
> {then}-1,
> {else}0));
> HLv:=ValueWhen(1,HLd<>0,HLd);
> HLv<>Ref(HLv,-1);
> 3b. Create new and call it "Up-Trend", choose color, and enter this 
> code:
> ut:=FmlVar("GANN-Trend","TD");
> uplot:=If(BarsSince(Ut=1)<
> BarsSince(Ut=-1),1,0);
> uplot=1;
> 3c. Create new and call it "Down-Trend", choose color, and enter 
this 
> code:
> dt:=FmlVar("GANN-Trend","TD");
> dplot:=If(BarsSince(dt=1)>
> BarsSince(dt=-1),1,0);
> dplot=1;
> 4a. Under "Symbols" tab create new and call it " UpSwing", enter 
this 
> code:
> FmlVar("GANN-Swing","SD2")=1;
> then under graphic choose "Buy Arrow", choose color (Dark Green), 
and 
> small
> size, then pick "Above Price Plot".
> 4b. Create new and call it "DownSwing", enter this code:
> FmlVar("GANN-Swing","SD2")=-1;
> then under graphic choose "sell arrow", choose color (Dark Red), 
and 
> small
> size, then pick "Below Price Plot".
> As for the HiLo ....just plot it as a regular indicator and choose 
> the last
> "style" option under "color/style" tab.
> 
> Note: For daily bar charts ribbon use these formulas:
> 
> 2a. ut:= FmlVar("GaW-Trend","TDV") ;
> uplot:=If(BarsSince(Ut=1)<
> BarsSince(Ut=-1),1,0);
> uplot=1;
> 
> 2b. dt:= FmlVar("GaW-Trend","TDV") ;
> dplot:=If(BarsSince(dt=1)>
> BarsSince(dt=-1),1,0);
> dplot=1;
> 
> from Adam Hefner.
> 
> ------------------------------------------------------
> name: GANN-HiLo
> 
> {HiLo 4/27/99}
> Lb:=Input("Look-Back Periods?",2,10,3);
> HLd:=If(CLOSE>Ref(Mov(H,Lb,S),-1),
> {then}1,
> {else}If(CLOSE<Ref(Mov(L,Lb,S),-1),
> {then}-1,
> {else}0));
> HLv:=ValueWhen(1,HLd<>0,HLd);
> HiLo:=If(HLv=-1,
> {then}Mov(H,Lb,S),
> {else}Mov(L,Lb,S));
> HiLo;
> ------------------------------------------
> name: GANN-Swing
> 
> {Gann-Swing 4/27/99}
> {Market swing is defined as:
> Up = 2 higher highs,
> Down = 2 lower lows.}
> Us:=BarsSince(Sum(H>Ref(H,-1),2)=2);
> Ds:=BarsSince(Sum(L<Ref(L,-1),2)=2);
> Hc:=HighestSince(1,Us=0,H);
> Lc:=LowestSince(1,Ds=0,L);
> Sd1:=If(Us=0,
> {then}If((L<>Lc) AND (Ref(L,-1)<>Lc),
> {then}1,
> {else}0),
> {else}If(Ds=0,
> {then}If((H<>HC) AND (Ref(H,-1)<>Hc),
> {then}-1,
> {else}0),
> {else}0));
> Sd2:=If(Sd1=1,
> {then} If(Ref(BarsSince(Sd1=1),-1) >
> Ref(BarsSince(Sd1=-1),-1),
> {then}1,
> {else}0),
> {else} If(Sd1=-1,
> {then}If(Ref(BarsSince(Sd1=1),-1) <
> Ref(BarsSince(Sd1=-1),-1),
> {then}-1,
> {else}0),
> {else}0));
> TD1:=ValueWhen(1,Sd2<>0,Sd2);
> Td1;
> --------------------------------------------
> name: GANN-Trend
> 
> {Gann-Trend 4/27/99}
> {Swing Direction}
> Sd:= FmlVar("GANN-Swing","TD1") ;
> {Swing Change High}
> Sch:=If(Sd=1 AND Ref(sd,-1)=-1,
> {then}1,
> {else}0);
> {Swing Change Low}
> Scl:=If(Sd=-1 AND Ref(Sd,-1)=1,
> {then}1,
> {else}0);
> {Peak Value}
> Pv:=If(Scl=1,
> {then}HighestSince(1,Sch=1,H),
> {else}0);
> {Trough Value}
> Tv:=If(Sch=1,
> {then}LowestSince(1,Scl=1,L),
> {else}0);
> {Trend Direction}
> Td:=If(H>ValueWhen(1,Pv>0,Pv),
> {then}1,
> {else}If(L<ValueWhen(1,Tv>0,Tv),
> {then}-1,
> {else}0));
> {UpTrend=1 DownTrend =-1}
> Tdv:=ValueWhen(1,Td<>0,Td);
> Tdv
> ------------------------------------------
> name: GaW-Swing
> 
> {Weekly Swing 4/27/99}
> {Market swing is defined as:
> Up = 2 higher highs,
> Down = 2 lower highs }
> {Weekly High/Low}
> Dw:=If(DayOfWeek()<=Ref(DayOfWeek(),-1),1,0);
> Wh:=If(Dw=1,
> {then}Ref(HighestSince(1,Dw=1,H),-1),
> {else}0);
> Wl:=If(Dw=1,
> {then}Ref(LowestSince(1,Dw=1,L),-1),
> {else}0);
> Hv1:=ValueWhen(1,Wh>0,Wh);
> Hv2:=ValueWhen(2,Wh>0,Wh);
> Hv3:=ValueWhen(3,Wh>0,Wh);
> Lv1:=ValueWhen(1,Wl>0,Wl);
> Lv2:=ValueWhen(2,Wl>0,Wl);
> Lv3:=ValueWhen(3,Wl>0,Wl);
> Us:=BarsSince((Hv1 > Hv2) AND (Hv2 > Hv3));
> Ds:=BarsSince((Lv1 < Lv2) AND (Lv2 < Lv3));
> Hc:=Ref(HighestSince(1,Us=0 AND Ref(Us,-1)>0,H),
> -1);
> Lc:=Ref(LowestSince(1,Ds=0 AND Ref(Ds,-1)>0,L),
> -1);
> {Swing direction Calculation}
> Sd1:=If(Us=0 AND Dw=1,
> {then}If((Lv1<>Lc) AND (Lv2<>Lc),
> {then}1,
> {else}0),
> {else}If(Ds=0,
> {then}If((Hv1<>Hc) AND (Hv2<>Hc),
> {then}-1,
> {else}0),
> {else}0));
> Sd2:=If(Sd1=1,
> {then} If(Ref(BarsSince(Sd1=1),-1) >
> Ref(BarsSince(Sd1=-1),-1),
> {then}1,
> {else}0),
> {else} If(Sd1=-1,
> {then}If(Ref(BarsSince(Sd1=1),-1) <
> Ref(BarsSince(Sd1=-1),-1),
> {then}-1,
> {else}0),
> {else}0));
> TD1:=ValueWhen(1,Sd2<>0,Sd2);
> TD1
> -------------------------------------------
> name: GaW-Trend
> 
> {Weekly Trend 4/27/99}
> {Swing Direction}
> Sd:= FmlVar("GaW-Swing","TD1") ;
> {Swing Change High}
> Sch:=If(Sd=1 AND Ref(sd,-1)=-1,
> {then}1,
> {else}0);
> {Swing Change Low}
> Scl:=If(Sd=-1 AND Ref(Sd,-1)=1,
> {then}1,
> {else}0);
> {Peak Value}
> Pv:=If(Scl=1,
> {then}HighestSince(1,Sch=1,H),
> {else}0);
> {Trough Value}
> Tv:=If(Sch=1,
> {then}LowestSince(1,Scl=1,L),
> {else}0);
> {Trend Direction}
> Td:=If(H>ValueWhen(1,Pv>0,Pv),
> {then}1,
> {else}If(L<ValueWhen(1,Tv>0,Tv),
> {then}-1,
> {else}0));
> {UpTrend=1 DownTrend =-1}
> Tdv:=ValueWhen(1,Td<>0,Td);
> Tdv


------------------------ Yahoo! Groups Sponsor ---------------------~-->
FREE Cell Phones with up to $400 Cash Back!
http://us.click.yahoo.com/_bBUKB/vYxFAA/i5gGAA/BefplB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/