alpha

  1. 25,374 Posts.
    lightbulb Created with Sketch. 2
    have you tried this auto 1/8ths it includes 38.2 and 61.8 lines.
    Its from Victor at Reefcap

    takes a few arguements out of the equation
    damnit...lol
    john


    .................

    t1:=H=Highest(HIGH);
    t2:=L=LLV(Ref(C,-1),50);
    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));
 
arrow-down-2 Created with Sketch. arrow-down-2 Created with Sketch.