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

Geom.profit



PureBytes Links

Trading Reference Links

s0=cross(stochd(),30);
s1=cross(70,stochd());
g0=exrem(s0,s1);
g1=exrem(s1,s0);
buyp=valuewhen(g0==1,c,1);
sellp=valuewhen(g1==1,c,1);
prr=iif(g1==1,sellp/buyp,1);
pr=iif(isempty(prr),1,prr);
EnableScript("jscript");
<%
pr = VBArray( AFL( "pr" ) ).toArray();
gp=new Array();
gp[0]=1;
for(i=1;i<pr.length;i++)
{gp[i]=gp[i-1]*pr[i];}
AFL.Var("gp") =gp ;
%>
graph0=gp;

The scan for buy-sell arrows was
s0=cross(stochd(),30);
s1=cross(70,stochd());
g0=exrem(s0,s1);
g1=exrem(s1,s0);
buy=g0;
sell=g1;

and the functions to test each step I did are

maxgraph=8;
s0=cross(stochd(),30);
s1=cross(70,stochd());
g0=exrem(s0,s1);
g1=exrem(s1,s0);
buyp=valuewhen(g0==1,c/5,1);
sellp=valuewhen(g1==1,c/5,1);
prr=iif(g1==1,sellp/buyp,1);
pr=iif(isempty(prr),1,prr);
graph0=0.5*g0;
graph1=0.5*g1;
graph2=buyp;
graph2style=1;
graph3=sellp;
graph4=pr;
graph4barcolor=2;

graphed at "pi" graph.

Now, what is the use of this "gp". ?
What does the author says?
Thank you for the exercise.

Dimitris Tsokakis



------=_NextPart_001_0012_01C12638.5E5A8820
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>Bernard,</FONT></DIV>
<DIV><FONT face=Arial size=2>I do not know the use of this Geometric profit(call 
it gp),</FONT></DIV>
<DIV><FONT face=Arial size=2>but if you</FONT><FONT face=Arial size=2> suppose 
for example that </FONT><FONT face=Arial size=2></FONT></DIV>
<DIV><FONT face=Arial size=2>1. you buy when stochd() crosses 30</FONT><FONT 
face=Arial size=2> ascending&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2>2.&nbsp;you sell when stochd() crosses 70 
descending</FONT></DIV>
<DIV><FONT face=Arial size=2>3. you remove all excess signals</FONT></DIV>
<DIV><FONT face=Arial size=2>4. you initialize gp==1</FONT></DIV>
<DIV><FONT face=Arial size=2>then the following gives you the graph of this 
gp,</FONT></DIV>
<DIV><FONT face=Arial size=2>calculated on close basis (you buy and sell at 
close)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>s0=cross(stochd(),30);<BR>s1=cross(70,stochd());<BR>g0=exrem(s0,s1);<BR>g1=exrem(s1,s0);<BR>buyp=valuewhen(g0==1,c,1);<BR>sellp=valuewhen(g1==1,c,1);<BR>prr=iif(g1==1,sellp/buyp,1);<BR>pr=iif(isempty(prr),1,prr);<BR>EnableScript("jscript");<BR>&lt;%<BR>pr 
= VBArray( AFL( "pr" ) ).toArray();<BR>gp=new 
Array();<BR>gp[0]=1;<BR>for(i=1;i&lt;pr.length;i++)<BR>{gp[i]=gp[i-1]*pr[i];}<BR>AFL.Var("gp") 
=gp ;<BR>%&gt;<BR>graph0=gp;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>The scan for buy-sell arrows was</FONT></DIV>
<DIV><FONT face=Arial 
size=2>s0=cross(stochd(),30);<BR>s1=cross(70,stochd());<BR>g0=exrem(s0,s1);<BR>g1=exrem(s1,s0);<BR>buy=g0;<BR>sell=g1;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>and the functions to test each step I did 
are</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>maxgraph=8;<BR>s0=cross(stochd(),30);<BR>s1=cross(70,stochd());<BR>g0=exrem(s0,s1);<BR>g1=exrem(s1,s0);<BR>buyp=valuewhen(g0==1,c/5,1);<BR>sellp=valuewhen(g1==1,c/5,1);<BR>prr=iif(g1==1,sellp/buyp,1);<BR>pr=iif(isempty(prr),1,prr);<BR>graph0=0.5*g0;<BR>graph1=0.5*g1;<BR>graph2=buyp;<BR>graph2style=1;<BR>graph3=sellp;<BR>graph4=pr;<BR>graph4barcolor=2;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>graphed at "pi" graph.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Now, what is the use of this "gp". ?</FONT></DIV>
<DIV><FONT face=Arial size=2>What does the author says?</FONT></DIV>
<DIV><FONT face=Arial size=2>Thank you for the exercise.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Dimitris Tsokakis</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_001_0012_01C12638.5E5A8820--

Attachment:
gif00134.gif

Attachment: Description: "Description: GIF image"