PureBytes Links
Trading Reference Links
|
/*Response Test Lines*/
EnableScript("jscript");
<%
close = VBArray( AFL( "close" ) ).toArray();
s=new Array();
t=new Array();
s[0]=10;
t[0]=10;
for(i=1;i<close.length-100;i++)
{s[i]=10;}
for(i=close.length-100;i<close.length-90;i++)
{s[i]=1+s[i-1];}
for(i=close.length-90;i<close.length;i++)
{s[i]=20;}
AFL.Var("crash10") =s ;
for(i=1;i<close.length-100;i++)
{t[i]=10;}
for(i=close.length-100;i<close.length-80;i++)
{t[i]=0.5+t[i-1];}
for(i=close.length-80;i<close.length;i++)
{t[i]=20;}
AFL.Var("crash20") =t ;
%>
crash1=iif(cum(1)<lastvalue(cum(1))-99,10,20);
graph0=crash1;
graph1=crash10;
graph2=crash20;
graph2style=1;
Select Automatic Scaling, mark Limits and see the 3 test lines.
Dimitris Tsokakis
------=_NextPart_001_0016_01C131A2.CDEB56E0
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>We will use some Test Functions to check out
the</FONT></DIV>
<DIV><FONT face=Arial size=2>response of various moving averages.</FONT></DIV>
<DIV><FONT face=Arial size=2>1. "Crash1" : The test stock moved from 10to 20 in
one day.</FONT></DIV>
<DIV><FONT face=Arial size=2>2. "Crash 10" : The test stock moved from 10 to 20
in ten days.</FONT></DIV>
<DIV><FONT face=Arial size=2>3. "Crash 20" : The test stock moved from 10 to 20
in twenty days.</FONT></DIV>
<DIV><FONT face=Arial size=2>But before use these modules, let use try to create
them.</FONT></DIV>
<DIV><FONT face=Arial size=2>Select some stock with more than 100 data days and
paste in </FONT></DIV>
<DIV><FONT face=Arial size=2>Indicator Builder the formula</FONT></DIV>
<DIV> </DIV>
<DIV> <FONT face=Arial size=2>/*Response Test
Lines*/<BR>EnableScript("jscript");<BR><%<BR>close = VBArray( AFL( "close" )
).toArray();<BR>s=new Array();<BR>t=new
Array();<BR>s[0]=10;<BR>t[0]=10;<BR>for(i=1;i<close.length-100;i++)<BR>{s[i]=10;}<BR>for(i=close.length-100;i<close.length-90;i++)<BR>{s[i]=1+s[i-1];}<BR>for(i=close.length-90;i<close.length;i++)<BR>{s[i]=20;}<BR>AFL.Var("crash10")
=s
;<BR>for(i=1;i<close.length-100;i++)<BR>{t[i]=10;}<BR>for(i=close.length-100;i<close.length-80;i++)<BR>{t[i]=0.5+t[i-1];}<BR>for(i=close.length-80;i<close.length;i++)<BR>{t[i]=20;}<BR>AFL.Var("crash20")
=t
;<BR>%><BR>crash1=iif(cum(1)<lastvalue(cum(1))-99,10,20);<BR>graph0=crash1;<BR>graph1=crash10;<BR>graph2=crash20;<BR>graph2style=1;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Select Automatic Scaling, mark Limits and see the 3
test lines.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Dimitris Tsokakis</FONT></DIV></BODY></HTML>
------=_NextPart_001_0016_01C131A2.CDEB56E0--
Attachment:
gif00153.gif
Attachment:
Description: "Description: GIF image"
|