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

RE: [amibroker] Re: Watchlist sorting



PureBytes Links

Trading Reference Links

I'm using Herman van den Bergen's code for generating random buys 
(thanks Herman):

Y = Random()*100; 
Buy = Cross(Y, 50);

For backtesting comparisons, I need precise numbers of random 
trades:  100, 200, 500 etc.  I searched the archives and tried 
adapting a suggestion Graham made in a somewhat related thread:  

Buy = Cross(Y, 50) AND cum(buy)<=5.

This generated an error message ("buy" undefined). Then my beginner's 
brain tried this:

Y = Random()*100; 
Cond1 = Cross(Y,50);
Cond2 = Cum(Cond1)<5;
Buy = Cond1 AND Cond2;

This reduced the total number of threads from 49,000+ to 396, but did 
not hit the number I specified (4).

At this point, I'm stuck. Help, anyone?

Thanks,
Wayne





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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