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

[amibroker] Re: Random Data Generator



PureBytes Links

Trading Reference Links

John, run following exploration with a single stock over all its bars.

----------------------------------

ticker = "~Random";

ro = Random() * 10;
rh = ro + (Random() * ro);
rl = ro - (Random() * ro);
rc = rl + (Random() * (rh - rl));

atcFlag = atcFlagResetValues | atcFlagCompositeGroup | 
atcFlagTimeStamp | atcFlagEnableInBacktest | atcFlagEnableInExplore;

AddToComposite(ro, ticker, "O", atcFlag);
AddToComposite(rh, ticker, "H", atcFlag);
AddToComposite(rl, ticker, "L", atcFlag);
AddToComposite(rc, ticker, "C", atcFlag);

Filter = False;
AddColumn(C, "C");

------------------------------

Jitu

--- In amibroker@xxxxxxxxxxxxxxx, "Dave Merrill" <dmerrill@xxxx> 
wrote:
>   I am looking for o/h/l/c  Can Ami produce that? How?
> haven't tried it, but how about something like this: choose a high 
and a low
> for each day by adding a random amount (ranging both positive and 
negative)
> to the previous day, then choose opening and closing values as 
random
> numbers between the high and low?
> 
> dave


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/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/