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

RE: [amibroker] Geom.profit



PureBytes Links

Trading Reference Links


Yassas 
Dimitris,
<FONT face=Arial color=#0000ff 
size=2> 
Is 
'gp' supposed to be a type of equity curve?  I got this from glancing at 
the chart - not from dissecting the code.
<FONT face=Arial color=#0000ff 
size=2> 
Peter 
Gialames

<FONT face=Tahoma 
size=2>-----Original Message-----From: Dimitris Tsokakis 
[mailto:TSOKAKIS@xxxx]Sent: Thursday, August 16, 2001 2:47 
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] 
Geom.profit
Bernard,
I do not know the use of this Geometric 
profit(call it gp),
but if you suppose 
for example that 
1. you buy when stochd() crosses 30<FONT 
face=Arial size=2> ascending 
2. you sell when stochd() crosses 70 
descending
3. you remove all excess signals
4. you initialize gp==1
then the following gives you the graph of this 
gp,
calculated on close basis (you buy and sell at 
close)
 
<FONT face=Arial 
size=2>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
<FONT face=Arial 
size=2>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
 
<FONT face=Arial 
size=2>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
 
 Your 
use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.