PureBytes Links
Trading Reference Links
|
I prefer now log.scale. Now i have troubles to rewrite my trendline formulafor the log.scale.
As you see in the att.snapshot the lines are curved instead linear.
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,1) == 0;
xb = LastValue(ValueWhen(PS,x,1));
xa = LastValue(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(ValueWhen(PS,s1,1));
Ya = LastValue(ValueWhen(PS,s1,2));
ydSL = (yb-Ya)/xab;/*y(SL) daily change*/
SL = ydSL*(x-xa)+ya;
dRSL = ROC(SL,1); /* Roc SL (%)*/
Thomas Zmuck
------=_NextPart_001_002C_01C221D6.5F17D2F0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2716.2200" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I prefer now log.scale. Now i have troubles to
rewrite my trendline formula for the log.scale.</FONT></DIV>
<DIV><FONT face=Arial size=2>As you see in the att.snapshot the lines are curved
instead linear.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Firstly i have activated log.scale in the indicator
builder.</FONT></DIV>
<DIV><FONT face=Arial size=2>I have tried something, but without the correct
result.</FONT></DIV>
<DIV><FONT face=Arial size=2>I hope for help. In the zip file is the
AFL</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Here is the basic part from the
formula:</FONT></DIV>
<DIV><FONT size=2><FONT size=1>
<P></FONT><FONT color=#008000>/*SL = Support Line*/</P></FONT>
<P>PS = <FONT color=#0000ff>TroughBars</FONT>(s1,per,<FONT
color=#ff00ff>1</FONT>) == <FONT color=#ff00ff>0</FONT>;</P>
<P>xb = <FONT color=#0000ff>LastValue</FONT>(<FONT
color=#0000ff>ValueWhen</FONT>(PS,x,<FONT color=#ff00ff>1</FONT>));</P>
<P>xa = <FONT color=#0000ff>LastValue</FONT>(<FONT
color=#0000ff>ValueWhen</FONT>(PS,x,<FONT color=#ff00ff>2</FONT>));</P>
<P>xab= xb-xa;<FONT color=#008000>/*x distance between a and b*/</P></FONT>
<P><FONT size=2><FONT color=#008000>//a is the start and b is the end of the
support line</P></FONT></FONT>
<P>yb = <FONT color=#0000ff>LastValue</FONT>(<FONT
color=#0000ff>ValueWhen</FONT>(PS,s1,<FONT color=#ff00ff>1</FONT>));</P>
<P>Ya = <FONT color=#0000ff>LastValue</FONT>(<FONT
color=#0000ff>ValueWhen</FONT>(PS,s1,<FONT color=#ff00ff>2</FONT>));</P>
<P>ydSL = (yb-Ya)/xab;<FONT color=#008000>/*y(SL) daily change*/</P></FONT>
<P>SL = ydSL*(x-xa)+ya;</P>
<P>dRSL = <FONT color=#0000ff>ROC</FONT>(SL,<FONT color=#ff00ff>1</FONT>); <FONT
color=#008000>/* Roc SL (%)*/</P></FONT></FONT><FONT size=1></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thomas Zmuck</FONT></DIV></BODY></HTML>
------=_NextPart_001_002C_01C221D6.5F17D2F0--
Attachment:
zip00018.zip
Description: Zip compressed data
Attachment:
Attachment:
Description: "Description: PNG image"
Attachment:
Description: "png00002.png"
|