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

Dec 2001 Cotton



PureBytes Links

Trading Reference Links

Formula 1:Condition 1

cond1=c>ref(c,-1) and ref(c,-1)>ref(c,-2);
graph2=cond1;

The result is a black bar when cond1 is true.

Formula 2:Probability

d1=90;
cond1=c>ref(c,-1) and ref(c,-1)>ref(c,-2);
n1=sum(cond1,d1);
pr=100*n1/d1;
graph0=pr;
title="Cond1 Probability for "+date()+
" is "+writeval(pr,format=1.2)+" %"; 

You can read everyday the % of Cond1 occurrence the last d1 days.
You may change in Formula 2 the d1=90; with another time range.
You may write in the same, or in another formula an alternative
condition, as

d1=120;
cond1=c>ref(c,-1) and ref(c,-1)>ref(c,-2);
cond2=c<ref(c,-1) and ref(c,-1)<ref(c,-2);
n1=sum(cond1,d1);
n2=sum(cond2,d1);
pr1=100*n1/d1;
pr2=100*n2/d1;
graph0=pr1;
graph1=pr2;

I hope this helps the Ind. Builder part.
For exploration part you have already received the answer.

Let me please write a comment here.
For me it is hard to believe that you have a type in excel not
transferable into AFL, except some built-in excel functions
like "trend" etc. So, since you write types in excel, you will
increase your efficiency using AFL. Good luck !

Best Regards
Dimitris Tsokakis

------=_NextPart_001_0035_01C1175E.D3810FE0
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 size=2>Dear Anthony,<BR>Thank you for relpy.<BR>Your idea "to 
quantify market direction with several indicators"<BR>is nice.<BR>It was not 
clear to me that you ask for Probabilities.<BR>So, I retransmit the formulas for 
Indicator Builder:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>Formula 1:Condition 1</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>cond1=c&gt;ref(c,-1) and 
ref(c,-1)&gt;ref(c,-2);<BR>graph2=cond1;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>The result is a black bar when cond1 is true.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>Formula 2:Probability</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>d1=90;<BR>cond1=c&gt;ref(c,-1) and 
ref(c,-1)&gt;ref(c,-2);<BR>n1=sum(cond1,d1);<BR>pr=100*n1/d1;<BR>graph0=pr;<BR>title="Cond1 
Probability for "+date()+<BR>" is "+writeval(pr,format=1.2)+" %"; </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>You can read everyday the % of Cond1 occurrence the last d1 
days.<BR>You may change in Formula 2 the d1=90; with another time range.<BR>You 
may write in the same, or in another formula an alternative<BR>condition, 
as</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>d1=120;<BR>cond1=c&gt;ref(c,-1) and 
ref(c,-1)&gt;ref(c,-2);<BR>cond2=c&lt;ref(c,-1) and 
ref(c,-1)&lt;ref(c,-2);<BR>n1=sum(cond1,d1);<BR>n2=sum(cond2,d1);<BR>pr1=100*n1/d1;<BR>pr2=100*n2/d1;<BR>graph0=pr1;<BR>graph1=pr2;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>I hope this helps the Ind. Builder part.<BR>For exploration 
part you have already received the answer.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>Let me please write a comment here.<BR>For me it is hard to 
believe that you have a type in excel not<BR>transferable into AFL, except some 
built-in excel functions<BR>like "trend" etc. So, since you write types in 
excel, you will<BR>increase your efficiency using AFL. Good luck !</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>Best Regards<BR>Dimitris Tsokakis</FONT></DIV></BODY></HTML>

------=_NextPart_001_0035_01C1175E.D3810FE0--

Attachment:
gif00082.gif

Attachment: Description: "Description: GIF image"