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

Re: [amibroker] Urgent! Help for log.Scale on Trendline Detection Formula



PureBytes Links

Trading Reference Links


yes, i know
 
I have tried to change the line:

ydSL = (yb-Ya)/xab;/*y(SL) daily change*/<FONT 
color=#008000>
to
ydSL = (yb  /  Ya)/xab;/*y(SL) daily 
change*/
SL = ydSL*(x-xa)+ya;
 
but this seems not to be the right. 
hmm?
 
 
Thomas Zmuck
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
wavemechanic 

To: <A title=amibroker@xxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 
Sent: Tuesday, July 02, 2002 3:55 
PM
Subject: Re: [amibroker] Urgent! Help for 
log.Scale on Trendline Detection Formula

 
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
Thomas 
To: <A title=amibroker@xxxxxxxxxxxx 
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 end of 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 Yahoo! 
Terms of Service. Your use of Yahoo! Groups 
is subject to the Yahoo! Terms of 
Service.