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

Re: [amibroker] Re: Trendline



PureBytes Links

Trading Reference Links

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/

--------------8142C6C7E049770126A37770
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Dimitri :
<p><u><b><i>thank you</i></b> </u>. This helps in the formula that I am
Working on.
<p>Also,<b>........</b>.Is it possible to stop the line from going past
the two points as shown in the image file.?
<p>And,<b>........</b> Do you have to use ( per = ) , percent change, in
the formula for Trendline Detection. ?
<p>DIMITRIS TSOKAKIS wrote:
<blockquote TYPE=CITE>the difference between ( x ) and ( a ) is&nbsp; endS-endR
<p>--- In amibroker@xxxx, Anthony Faragasso &lt;ajf1111@xxxx> wrote:
<br>> Dimitri:
<br>>
<br>> That was Much easier to move the line form peaks and troughs, I was
<br>able
<br>> to get the line to ( x ) and ( a );
<br>> now, how do you find the difference between ( x ) and ( a ) ;&nbsp;
(x =
<br>> 22.45) and (a = 38.38) in the formula;
<br>>
<br>> Thank you in advance, Dimitri; But more questions abound.
<br>> Anthony
<br>>
<br>> Dimitris Tsokakis wrote:
<br>>
<br>> > A better form /*TRENDLINE*/maxgraph=8;graph0 =
<br>> > c;graph0style=64;graph0barcolor=1;
<br>> > x = cum(1);per = 3;
<br>> > s1=l;s11=h;
<br>> > RANKt=1;
<br>> > RANKp=1;
<br>> > pS = troughBars( s1, per, 1 ) == 0;
<br>> > endt= lastvalue(ValueWhen( pS, x, RANKt ));/*trough time*/
<br>> > pR = PEAKBars( s11, per, 1 ) == 0;
<br>> > endt1= lastvalue(ValueWhen( pR, x, RANKp ));/*peak time*/
<br>> > dt=iif(endt-endt1>0,endt-endt1,endt1-endt);
<br>> > endS = lastvalue(ValueWhen( pS, s1, RANKt ) );/*trough value*/
<br>> > endR = lastvalue(ValueWhen( pR, s11, RANKp ) );/*peak value*/
<br>> > aS=iif(endt-endt1>0,(endS-endR)/dt,-(endS-endR)/dt);/*slope*/
<br>> > bS=iif(endt-endt1>0,endS,endR);/*beta*/
<br>> > TR=aS*(x-max(endt,endt1))+bS;/*TRENDLINE EQUATION*/
<br>> > graph1 = iif(x>min(endt,endt1)-10,tr,-1e10);
<br>> > graph3=zig(s11,per);
<br>> > graph3barcolor=9;
<br>> > graph4=zig(s1,per);
<br>> > graph4barcolor=0; RANKt and RANKp is the rank of the trough,
<br>> > respectively the peakcounting from the end of data. For
<br>> > exampleRANKt=2, RANKp=3 means the second trough and the third
<br>peak.For
<br>> > verification, I added the respective zig functions.Hoping now that
<br>> > wrapping will not mix troughs and peaksDimitris Tsokakis
<br>> >
<br>> >
<br>> >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Yahoo! Groups Sponsor
<br>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[Image]
<br>>
<br>> >
<br>> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
<br>Service.
<p>------------------------ Yahoo! Groups Sponsor ---------------------~-->
<br>Do you need to encrypt all your online transactions? Secure corporate
intranets? Authenticate your Web sites? Whatever
<br>security your site needs, you'll find the perfect solution here!
<br>http://us.click.yahoo.com/wOMkGD/Q56CAA/yigFAA/dkFolB/TM
<br>---------------------------------------------------------------------~->
<br>&nbsp;
<br>&nbsp;
<p>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/</blockquote>
</html>

--------------8142C6C7E049770126A37770--

Attachment: Description: ""