looking at fib levels, page-25

  1. 25,374 Posts.
    lightbulb Created with Sketch. 3
    for Lindfield as promised


    Phew apparently this was sourced some 6 yrs ago on Reefcap

    and as Victor states he had originally posted it on Stock Central.....gosh that takes us back over 10 years...

    "the Indicator Formula for Metastock from Victor at Reefcap"

    ( now "The Chartist" )http://www.thechartist.com.au
    is
    ...................................
    t1:=H=Highest(HIGH);
    t2:=L=Lowest(LOW);
    t1:=t1 AND Cum(t1)=LastValue(Cum(t1));
    t2:=t2 AND Cum(t2)=LastValue(Cum(t2));
    price1:=H;
    price2:=L;
    e1pds:=LastValue(BarsSince(t1));
    e2pds:=LastValue(BarsSince(t2));
    x1:=If(e1pds>e2pds,t1,t2);
    x2:=If(e1pds>e2pds,t2,t1);
    y1:=If(e1pds>e2pds,price1,price2);
    y2:=If(e1pds>e2pds,price2,price1);
    y1:=ValueWhen(1,x1,y1);
    y2:=LastValue(ValueWhen(1,x2,y2));
    b1:=LastValue(BarsSince(x1));
    b2:=LastValue(BarsSince(x2));

    plot:=y1+BarsSince(x1)*(y2-y1)/(b1-b2);
    plot:=Ref(Ref(plot,-b2),b2);
    plotL:= y2+y1-y1;
    plotL:= Ref(Ref(plotL,-0),0);
    plotH:= y1;
    List:= LastValue(Cum(1))-1;

    If(Cum(1)<(List-Max(b1,b2)+Abs(b1-b2)), BarsSince(Cum(1)>(List-Max(b1,b2)+Abs(b1-b2))),(plotH*0+PlotL*8)/8);
    If(Cum(1)<(List-Max(b1,b2)+Abs(b1-b2)*7/8), BarsSince(Cum(1)>(List-Max(b1,b2)+Abs(b1-b2)*7/8)),(plotH*1+PlotL*7)/8);
    If(Cum(1)<(List-Max(b1,b2)+Abs(b1-b2)*6/8), BarsSince(Cum(1)>(List-Max(b1,b2)+Abs(b1-b2)*6/8)),(plotH*2+PlotL*6)/8);
    If(Cum(1)<(List-Max(b1,b2)+Abs(b1-b2)*5/8), BarsSince(Cum(1)>(List-Max(b1,b2)+Abs(b1-b2)*5/8)),(plotH*3+PlotL*5)/8);
    If(Cum(1)<(List-Max(b1,b2)+Abs(b1-b2)*4/8), BarsSince(Cum(1)>(List-Max(b1,b2)+Abs(b1-b2)*4/8)),(plotH*4+PlotL*4)/8);
    If(Cum(1)<(List-Max(b1,b2)+Abs(b1-b2)*3/8), BarsSince(Cum(1)>(List-Max(b1,b2)+Abs(b1-b2)*3/8)),(plotH*5+PlotL*3)/8);
    If(Cum(1)<(List-Max(b1,b2)+Abs(b1-b2)*2/8), BarsSince(Cum(1)>(List-Max(b1,b2)+Abs(b1-b2)*2/8)),(plotH*6+PlotL*2)/8);
    If(Cum(1)<(List-Max(b1,b2)+Abs(b1-b2)/8), BarsSince(Cum(1)>(List-Max(b1,b2)+Abs(b1-b2)/8)),(plotH*7+PlotL*1)/8);
    If(Cum(1)<(List-Max(b1,b2)), BarsSince(Cum(1)>(List-Max(b1,b2))),(plotH*8+PlotL*0)/8);
    plot;
    If(Cum(1)<(List-Max(b1,b2)+Abs(b1-b2)*(Sqrt(5)-1)/2), BarsSince(Cum(1)>(List-Max(b1,b2)+Abs(b1-b2)*(Sqrt(5)-1)/2)),(plotL*(Sqrt(5)-1)/2+PlotH*(Sqrt(5)-1)/2*(Sqrt(5)-1)/2));
    If(Cum(1)<(List-Max(b1,b2)+Abs(b1-b2)*(3-Sqrt(5))/2), BarsSince(Cum(1)>(List-Max(b1,b2)+Abs(b1-b2)*(3-Sqrt(5))/2)),(plotL*(3-Sqrt(5))/2+PlotH*(Sqrt(5)-1)/2));


    ........................
    You will need to register first but heres the thread
    http://www.thechartist.com.au/forum/ubbthreads.php?ubb=showflat&Number=23668&Searchpage=8&Main=2325&Words=fibonacci&Search=true#Post23668


    This Indicator set will show fibs trendline supports/Pivots and short an medium term fib sets....enjoy as they say.

    I actually saw a very nice Trading system chart template based on this short term fib overlay.. they had added a Parabolic SAR and an EMA I cant recall but suspect it was at least a 30 period..


    .............................
    heres Victors Trendline Indicator
    { Trend-lines }
    pp:= Input("Long=2,Med=1,Short=0.5",0.5,2,2);
    r0:= If(MP()>=Ref(MP(),-1),ATR(1),0);
    r1:= Log(If(r0>0,ATR(1),HIGH)/HIGH);
    r2:= Cum(r1)/Max(1,Cum(If(r0>0,1,0)));
    r3:= LastValue(100*Exp(LastValue(r2)))*pp;
    r4:= LastValue(PeakBars(2,H,r3))-LastValue(PeakBars(1,H,r3));
    r5:= (LastValue(Peak(1,H,r3))-LastValue(Peak(2,H,r3)))/r4; {slope}
    r6:= LastValue(Peak(2,H,r3))+(r5*(Cum(1)-LastValue(Cum(1)-PeakBars(2,H,r3))));
    r7:= If(Cum(1) < LASTVALUE(CUM(1)-PEAKBARS(2,H,R3)),
    BarsSince(Cum(1) >= LastValue(Cum(1)-PeakBars(2,H,r3))),r6);
    s0:= If(MP()<=Ref(MP(),-1),ATR(1),0);
    s1:= Log(If(s0>0,ATR(1),LOW)/LOW);
    s2:= Cum(s1)/Max(1,Cum(If(s0>0,1,0)));
    s3:= LastValue(100*Exp(LastValue(s2)))*pp;
    s4:= LastValue(TroughBars(2,L,s3))-LastValue(TroughBars(1,L,s3));
    s5:= (LastValue(Trough(1,L,s3))-LastValue(Trough(2,L,s3)))/s4; {slope}
    s6:= LastValue(Trough(2,L,s3))+(s5*(Cum(1)-LastValue(Cum(1)-TroughBars(2,L,s3))));
    s7:= If(Cum(1) < LASTVALUE(CUM(1)-TROUGHBARS(2,L,S3)),
    BarsSince(Cum(1) >= LastValue(Cum(1)-TroughBars(2,L,s3))),s6);
    r7;s7;

    ......................
    and here is the adjustable time period Fib Formula

    { Fibonacci Retracement Levels }
    pp:= Input("Long=2,Med=1,Short=0.5",1,2,2);
    r0:= If(MP()>=Ref(MP(),-1),ATR(1),0);
    r1:= Log(If(r0>0,ATR(1),HIGH)/HIGH);
    r2:= Cum(r1)/Max(1,Cum(If(r0>0,1,0)));
    r3:= LastValue(100*Exp(LastValue(r2)))*pp;
    r6:= LastValue(Peak(1,H,r3));
    r7:= If(Cum(1) < LASTVALUE(CUM(1)-PEAKBARS(1,H,R3)),
    BarsSince(Cum(1) >= LastValue(Cum(1)-PeakBars(1,H,r3))),r6);
    s0:= If(MP()<=Ref(MP(),-1),ATR(1),0);
    s1:= Log(If(s0>0,ATR(1),LOW)/LOW);
    s2:= Cum(s1)/Max(1,Cum(If(s0>0,1,0)));
    s3:= LastValue(100*Exp(LastValue(s2)))*pp;
    s6:= LastValue(Trough(1,L,s3));
    s7:= If(Cum(1) < LASTVALUE(CUM(1)-TROUGHBARS(1,L,S3)), BarsSince(Cum(1) >= LastValue(Cum(1)-TroughBars(1,L,s3))),s6);
    F1:= (Sqrt(5)-1)/2; {=0.618}
    F2:= 1/F1; {=1.618}
    z1:= PeakBars(1,H,r3);
    z2:= TroughBars(1,L,r3);
    z3:= LastValue(Min(z1,z2)/2);
    UPTarget:= Ref(s7*(1-F2)+r7*F2,-z3);
    DNTarget:= Ref(s7*F2+r7*(1-F2),-z3);
    UPTarget;
    r7;
    s7*F1*F1+r7*(1-F1*F1);
    (s7+r7)/2;
    s7*F1+r7*(1-F1);
    s7;
    DNTarget;
 
arrow-down-2 Created with Sketch. arrow-down-2 Created with Sketch.