Hi - I am running the backtester on a composite symbol I have created. This symbol only has Close price data. O=H=L=V=0;
To ensure that the backtester uses the correct prices for Buy/Sell, I have used the following code:
BuyPrice = C;
SellPrice = C;
ShortPrice = C;
CoverPrice = C;
SetBacktestMode( backtestRegular );
SetOption("FuturesMode", False);
SetOption("InitialEquity", 10000);
SetOption("AllowPositionShrinking", False);
SetOption("CommissionMode", 2);
SetOption("CommissionAmount", 2); // $2 per trade commission
SetOption("AllowSameBarExit", True);
SetOption("PriceBoundChecking", False);
SetPositionSize(100,spsPercentOfEquity);
The backtest works fine on symbols that have full OHLC data, but on the composite symbol it performs strangely - with just one trade:
Symbol Trade Date Price Ex. date Ex. Price % chg Profit % Profit Shares Position value Cum. Profit # bars Profit/bar MAE MFE Scale In/Out
~ARTINDEX_WL_039 Long (6) 27/02/2001 59.0956 28/02/2001 0 -100.00% -10002.00 -100.04% 169.183 9998.00 -10002.00 2 -5001.00 -100.00% 0.00% 0/0
Can anyone suggest a solution.
Thanks!
Posted by: tim_testpat@yahoo.co.uk
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (1) |
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/
EmoticonEmoticon