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.

Reply via email to