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

Re: Statistics with Amibroker



PureBytes Links

Trading Reference Links

--- In amibroker@xxxx, "David Holzgrefe" <dtholz@xxxx> wrote:
> Hmm so many user now coming out with excellent and new ways to apply
> AFL codes * phww my head is spinning trying to comprehend them all.
> 
> its stuck me that the explorer could be used to find many 
reoccurring
> conditions .. eg how many times the cross(ema(close,10),ema
(close,21)
> occurred and the following days where bullish .
> 
> 
> could some one get me started on my next little learning process
> using the explore function to compare the occurrences of ma crossed
> 
> I've written a few but the results aren't coming forward
> 
> how would I add the number of true statements and false statements 
to
> get a % correct ?
> 
> I've looked at the code posted by TSOKAKIS but can's seem to put it
> to use in the was id like
> 
> 
> Thanks in advance David
> 
> 
> --- In amibroker@xxxx, TSOKAKIS@xxxx wrote:
> > . What an excellent "EXPLORE" in 3.58 !!
> > Here we are able to test the reliability of a stochk versus
> > various technical analysis criteria !!
> > Example: How many "bullish Doji" were confirmed and
> > became "Morning Stars" in the past history of a certain stock?
> > The answer is
> >
> > COND1=IIF((ABS(C-O)<0.1*ABS(H-L))AND(C<ref(L,-1)),1,0);
> > COND11=IIF(REF(COND1,-1)>0 AND C>REF(C,-1) AND C>O and o>ref(c,-
> > 1),1,0);
> > filter=cond11==1;
> > numcolumns = 3;
> > column0 = close;
> > column1=cum(cond11);
> > column2=100*CUM(COND11)/cum(cond1);
> > column0name = "Close";
> > column1name="confirm";
> > column2name="%";
> > column1format = 1.0;
> >
> > Press "EXPLORE"
> > and in "%" column you get the percentage of confirmed Doji in
> the
> > whole past history of a stock !!!
> > Magnificent!! I will never pay attention to "DIAS" Doji, the %
> was
> > 8%.!! I will be a close friend of "TITK", it is 66% reliable.!!
> 
> 
> ----- Original Message -----
> From: <TSOKAKIS@xxxx>
> To: <amibroker@xxxx>
> Sent: Sunday, May 20, 2001 2:57 AM
> Subject: [amibroker] Reliability versus Technical Indicators
> 
> 
> > . What an excellent "EXPLORE" in 3.58 !!
> > Here we are able to test the reliability of a stochk versus
> > various technical analysis criteria !!
> > Example: How many "bullish Doji" were confirmed and
> > became "Morning Stars" in the past history of a certain stock?
> > The answer is
> >
> > COND1=IIF((ABS(C-O)<0.1*ABS(H-L))AND(C<ref(L,-1)),1,0);
> > COND11=IIF(REF(COND1,-1)>0 AND C>REF(C,-1) AND C>O and o>ref(c,-
> > 1),1,0);
> > filter=cond11==1;
> > numcolumns = 3;
> > column0 = close;
> > column1=cum(cond11);
> > column2=100*CUM(COND11)/cum(cond1);
> > column0name = "Close";
> > column1name="confirm";
> > column2name="%";
> > column1format = 1.0;
> >
> > Press "EXPLORE"
> > and in "%" column you get the percentage of confirmed Doji in 
the
> > whole past history of a stock !!!
> > Magnificent!! I will never pay attention to "DIAS" Doji, the % 
was
> > 8%.!! I will be a close friend of "TITK", it is 66% reliable.!!
> >
> >
> >
> >
> > Your use of Yahoo! Groups is subject to 
http://docs.yahoo.com/info/terms/
> >
> >/* Attention Mr David Holzgrefe :
After defining cross condition, you have to define what you want as 
bullish, related to % gain and time to get it. I give you here an 
example with 10% the first 20 days after cross happened. The routine 
counts only the first time of occurence.The statictics is over the 
whole history of the stocks under examination.*/
maxgraph=4;
d=cross(ema(close,20),ema(close,50));
d1=ref(d,-20);
v1=valuewhen(d==1,c,1);
t1=barssince(d==1);
cf=iif(t1<20 and c>1.1*v1,3,0);
cf1=iif(cf>ref(cf,-1),cf,0);
cf2=hold(cf1>0,19);
cf3=iif(cf2>ref(cf2,-1),1,0);
graph3=cf3;
filter=d==1;
graph0=d;
graph1=cum(d);
graph2=cum(cf3);
graph2style=1;
numcolumns=2;
column0=cum(d);
column0name="times";
COLUMN1=CUM(cf3);
column1name="confirm";
COLUMN1FORMAT=1.0;
column0format=1.0;
BUY=D==1;
SELL=cf3==1;
/* the above formula is working in EXPLORE mode and graphed in 
Indicator Builder. 
Have a nice day,
Dimitris Tsokakis*/