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

[amibroker] Re: Calculating statistical occurrences



PureBytes Links

Trading Reference Links

Here is an interesting selection method :
Run first the

Buy=Cross(StochD(),35);
Sell=Cross(65,StochD());// the trading rules
e1=LastValue(Equity());
e2=IIf(e1>10000,e1,0);// filter out the loosers
AddToComposite(e2,"~e2","c");
AddToComposite(e1>10000,"~profitables","v");
Buy=0;

for all stocks, n=1 last quotations, supposed, in settings, initial 
equity = 10000.
With the line
e2=IIf(e1>10000,e1,0); you filter out loosing stocks and with
AddToComposite(e1>10000,"~profitables","v"); you count the profitable 
ones.
Then select the top stocks with the exploration

Buy=Cross(StochD(),35);
Sell=Cross(65,StochD());
e1=LastValue(Equity());
e11=Foreign("~e2","c")/Foreign("~profitables","v");
f=1;
Filter=e1>f*e11;
AddColumn(e1,"e1");
AddColumn(e11,"e11");

for all stocks, n=1 last quotations.
In this exploration you ask, among the profitable stocks, these 
equities above the average.

Note1: If you see more than 10 stocks, increase f=1 to f=1.2 or f=1.5.
Note 2 : If you still see more than 10 stocks, then you have a great 
system and take action tomorrow morning without any further delay !!!
DT


--- In amibroker@xxxxxxxxxxxxxxx, "epintoem" <epintoem@xxxx> wrote:
> How would I go about Calculating the number of times a certain event
> happens with regard to a security.
> 
> the problem in this case is as follows:
> 
> In a security...I would like to determine how many times in its
> lifetime dit the next days high or low come to within say 20 cents 
of
> the previous days close. and mark that position on the chart.
> 
> TIA


------------------------ Yahoo! Groups Sponsor ---------------------~-->
FREE Cell Phones with up to $400 Cash Back!
http://us.click.yahoo.com/_bBUKB/vYxFAA/i5gGAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/