[amibroker] Re: Random Entries and Exits?

2010-07-11 Thread spacebass5000
this is what I have ended up using... - start code - SetTradeDelays(1,1,1,1); BuyPrice = O; SellPrice = O; ShortPrice = O; CoverPrice = O; // want to hold for a random period no longer than 50 days MaxHoldDays = 50; RandomNum = floor(Random() * 100); while(LastValue(RandomNum, False) > MaxHo

Re: [amibroker] Re: Random Entries and Exits?

2010-07-07 Thread Howard B
Greetings -- Tomasz has added the Mersene Twister algorithm for generation of random numbers since my book Quantitative Trading Systems was printed. See the AmiBroker help files for mtrandom for details. mtrandom is a better algorithm than the one distributed with most language packages, includi

Re: [amibroker] Re: Random Entries and Exits?

2010-07-07 Thread Howard B
Greetings -- This is the code being referred to from my book, Quantitative Trading Systems. Thanks, Howard //EnterAtRandom.afl // //Entry a position at the close of a random bar. // //A random entry for use as a benchmark. // //Expect this entry to mirror the buy and hold. //

Re: [amibroker] Re: Random Entries and Exits?

2010-07-07 Thread reinsley
Hi, I don't know the last author. Best regards |_SECTION_BEGIN("ct1"); /* Coin Toss model , it has nothing to do with Technical OR Fundamental Analysis It has nothing to do with entry or exit rules. Here One books profits and losses at a predefined percent. This Model was Insp

[amibroker] Re: Random Entries and Exits?

2010-07-06 Thread spacebass5000
wow, how did I miss this... i have read and reread this book many times. thanks for the reminder!!! --- In amibroker@yahoogroups.com, "notanaiqgenius" wrote: > > If you happen to have Howard Bandy's book, Quantitative Trading Systems, you > can see page 91-92 for an example of random entrie

[amibroker] Re: Random Entries and Exits?

2010-07-06 Thread notanaiqgenius
If you happen to have Howard Bandy's book, Quantitative Trading Systems, you can see page 91-92 for an example of random entries (but not exits). (Sorry, I'm not going to post the code here out of respect for Howard's work.) --- In amibroker@yahoogroups.com, "spacebass5000" wrote: > > Hey all,

[amibroker] Re: Random Entries and Exits?

2010-07-06 Thread Mike
Try this: SetTradeDelays( 1, 1, 1, 1 ); SetPositionSize(2, spsPercentOfEquity); BuyPrice = O; SellPrice = O; Buy = mtRandomA() <= 0.4; // 40% chance of buy Sell = mtRandomA() <= 0.2; // 20% chance of sell Mike --- In amibroker@yahoogroups.com, "spacebass5000" wrote: > > Hey all, >