PureBytes Links
Trading Reference Links
|
/*AFL code for Variable Moving Average
using Long Term Normalized Close*/
maxgraph=4;
X=CLOSE;
NormalizedX=100*(X-LLV(X,100))/(HHV(X,100)-LLV(X,100));
graph0=NormalizedX;
b=-2*((4*NormalizedX/100)-1);
m=ma(NormalizedX,15);
graph1=m;
graph1color=2;
graph0barcolor=3;
mvar=ma(NormalizedX,15+b);
graph2=mvar;
graph2style=1;
graph2color=8;
The resulting variable ma (red line) reduces lag of "common ma15" (black line) by 3 whole days,
whithout affecting low volatility periods.
Note that even the use of simple ma15 in NormalizedClose graph (blue line) reduces lag by one day.
Dimitris Tsokakis
------=_NextPart_001_0012_01C0F6B7.EC6405C0
Content-Type: text/html;
charset="iso-8859-7"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-7" http-equiv=Content-Type>
<META content="MSHTML 5.00.3013.2600" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>With the transformation of normalization, (#2530),
Normalized close oscillates </FONT></DIV>
<DIV><FONT face=Arial size=2>between 0 and 100.</FONT></DIV>
<DIV><FONT face=Arial size=2>Hence quantity b= -2*((4*NormalizedX/100)-1) moves
in the range -6...2.</FONT></DIV>
<DIV><FONT face=Arial size=2>Since we can use now variable moving average in
AFL, </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>/*AFL code for Variable Moving Average</FONT></DIV>
<DIV><FONT face=Arial size=2>using Long Term Normalized
Close*/<BR>maxgraph=4;<BR>X=CLOSE;<BR>NormalizedX=100*(X-LLV(X,100))/(HHV(X,100)-LLV(X,100));
<BR>graph0=NormalizedX;<BR>b=-2*((4*NormalizedX/100)-1);<BR>m=ma(NormalizedX,15);<BR>graph1=m;<BR>graph1color=2;<BR>graph0barcolor=3;<BR>mvar=ma(NormalizedX,15+b);<BR>graph2=mvar;<BR>graph2style=1;<BR>graph2color=8;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>The resulting variable ma (red line) reduces
lag of "common ma15" (black line) by 3 whole days, </FONT></DIV>
<DIV><FONT face=Arial size=2>whithout </FONT><FONT face=Arial
size=2>affecting low volatility periods.</FONT></DIV>
<DIV><FONT face=Arial size=2>Note that even the use of simple ma15 in
NormalizedClose graph (blue line) reduces lag by one day.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Dimitris Tsokakis</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> </FONT></DIV></BODY></HTML>
------=_NextPart_001_0012_01C0F6B7.EC6405C0--
Attachment:
gif00057.gif
Attachment:
Description: "Description: GIF image"
|