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

Re: Geom.profit



PureBytes Links

Trading Reference Links

Hi Peter,
As I wrote, the quantity is unknown to me.
Perhaps Bernard has more info.
Dimitris Tsokakis
--- In amibroker@xxxx, "Peter Gialames" <investor@xxxx> wrote:
> Yassas Dimitris,
> 
> Is 'gp' supposed to be a type of equity curve? I got this from 
glancing at
> the chart - not from dissecting the code.
> 
> Peter Gialames
> -----Original Message-----
> From: Dimitris Tsokakis [mailto:TSOKAKIS@x...]
> Sent: Thursday, August 16, 2001 2:47 AM
> To: amibroker@xxxx
> Subject: [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 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)
> 
> 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
> 
> 
> 
> Yahoo! Groups Sponsor
> 
> 
> 
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.