PureBytes Links
Trading Reference Links
|
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
Thomas
To: <A title=amibroker@xxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Tuesday, July 02, 2002 8:40
AM
Subject: [amibroker] Urgent! Help for
log.Scale on Trendline Detection Formula
Hello,
I prefer now log.scale. Now i have troubles to rewrite my
trendline formula for the log.scale.
As you see in the att.snapshot the lines are curved instead
linear.
Since the scale is logarithmic you
will have to incorporate a logarithmic transformation in your
formula.
Firstly i have activated log.scale in the indicator
builder.
I have tried something, but without the correct
result.
I hope for help. In the zip file is the AFL
Here is the basic part from the formula:
/*SL = Support Line*/
PS = TroughBars(s1,per,<FONT
color=#ff00ff>1) == 0;
xb = LastValue(<FONT
color=#0000ff>ValueWhen(PS,x,1));
xa = LastValue(<FONT
color=#0000ff>ValueWhen(PS,x,2));
xab= xb-xa;/*x distance between a and b*/
//a is the start and b is the endof the
support line
yb = LastValue(<FONT
color=#0000ff>ValueWhen(PS,s1,1));
Ya = LastValue(<FONT
color=#0000ff>ValueWhen(PS,s1,2));
ydSL = (yb-Ya)/xab;/*y(SL) daily change*/
SL = ydSL*(x-xa)+ya;
dRSL = ROC(SL,1);
/* Roc SL (%)*/<FONT
size=1>
Thomas ZmuckYour
use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
|