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

Re: [amibroker] Re: Trendline



PureBytes Links

Trading Reference Links

Dimitri;

Thank you for your support with the trendline and also with crossover.

Anthony

DIMITRIS TSOKAKIS wrote:

> 1.
> The calibration is in
> graph1 = iif(x>min(endt,endt1)-10,tr,-1e10);
> where I ask the line to be visible 10 bars before the first point.
> You may decrease 10
> 2.
> The use of per is to detect peaks and troughs
> --- In amibroker@xxxx, Anthony Faragasso <ajf1111@xxxx> wrote:
> > Dimitri :
> >
> > thank you . This helps in the formula that I am Working on.
> >
> > Also,.........Is it possible to stop the line from going past the
> two points as shown in the image file.?
> >
> > And,........ Do you have to use ( per = ) , percent change, in the
> formula for Trendline Detection. ?
> >
> > DIMITRIS TSOKAKIS wrote:
> >
> > > the difference between ( x ) and ( a ) is endS-endR
> > >
> > > --- In amibroker@xxxx, Anthony Faragasso <ajf1111@xxxx> wrote:
> > > > Dimitri:
> > > >
> > > > That was Much easier to move the line form peaks and troughs, I
> was
> > > able
> > > > to get the line to ( x ) and ( a );
> > > > now, how do you find the difference between ( x ) and ( a ) ;
> (x =
> > > > 22.45) and (a = 38.38) in the formula;
> > > >
> > > > Thank you in advance, Dimitri; But more questions abound.
> > > > Anthony
> > > >
> > > > Dimitris Tsokakis wrote:
> > > >
> > > > > A better form /*TRENDLINE*/maxgraph=8;graph0 =
> > > > > c;graph0style=64;graph0barcolor=1;
> > > > > x = cum(1);per = 3;
> > > > > s1=l;s11=h;
> > > > > RANKt=1;
> > > > > RANKp=1;
> > > > > pS = troughBars( s1, per, 1 ) == 0;
> > > > > endt= lastvalue(ValueWhen( pS, x, RANKt ));/*trough time*/
> > > > > pR = PEAKBars( s11, per, 1 ) == 0;
> > > > > endt1= lastvalue(ValueWhen( pR, x, RANKp ));/*peak time*/
> > > > > dt=iif(endt-endt1>0,endt-endt1,endt1-endt);
> > > > > endS = lastvalue(ValueWhen( pS, s1, RANKt ) );/*trough value*/
> > > > > endR = lastvalue(ValueWhen( pR, s11, RANKp ) );/*peak value*/
> > > > > aS=iif(endt-endt1>0,(endS-endR)/dt,-(endS-endR)/dt);/*slope*/
> > > > > bS=iif(endt-endt1>0,endS,endR);/*beta*/
> > > > > TR=aS*(x-max(endt,endt1))+bS;/*TRENDLINE EQUATION*/
> > > > > graph1 = iif(x>min(endt,endt1)-10,tr,-1e10);
> > > > > graph3=zig(s11,per);
> > > > > graph3barcolor=9;
> > > > > graph4=zig(s1,per);
> > > > > graph4barcolor=0; RANKt and RANKp is the rank of the trough,
> > > > > respectively the peakcounting from the end of data. For
> > > > > exampleRANKt=2, RANKp=3 means the second trough and the third
> > > peak.For
> > > > > verification, I added the respective zig functions.Hoping now
> that
> > > > > wrapping will not mix troughs and peaksDimitris Tsokakis
> > > > >
> > > > >
> > > > > Yahoo! Groups Sponsor
> > > > [Image]
> > > >
> > > > >
> > > > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > > Service.
> > >
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/