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

[amibroker] historic random odds



PureBytes Links

Trading Reference Links

Hi,
i am trying to do something that i think is rather simple, but having a heck of a time doing so in Amibroker.  Basically i want to figure out the historic percentage of the market closing 1 OR 2 days after any given day. the code is below:

FixedDollarAmount = 1000;
SetBacktestMode( backtestRegularRawMulti ); 
buy = c; 
sell = c > valuewhen(buy, c);
applystop(stoptypeNBar, stopmodeBars, 2);
PositionSize = FixedDollarAmount;

The system should buy EVERY day, and sell the next day if it's a higher close or always exit on the 2nd day.

I want this to run as a backtest so i can see the percentage of win vs loss.  The problem is, it runs fine, but the percentages are way off when tested against Yahoo's data from 1/1/1999 to current day.  I know the historic odds of a close 1 or 2 days later is around 68%, however my backtest is returning 51%.

Can anyone tell me see any issues with my script or what may be going on here?
initially i thought the system may be running out of cash, as it uses the default 100,000.  But that does not seem to be the case.

thank you.



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

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/