andwilson
Private Group
Posts: 43
Received Likes: 13
|
Post by andwilson on May 10, 2016 14:53:56 GMT
Tick backtesting with Amibroker version greater or equal 5.90 including version 6.13 results in an UNRELIABLE list of trades. Version 5.8 returns correct results !!!! Looks like the problem happens when trades have same entry time if so, any backtesting using periodicity N-Bar/N-Tick might be affected too. Something has changed in between version 5.80 and 5.90 that generates the problem. The problem is easy to reproduce if your time stamp tick data does not have miliseconds (HH:MM:SS), Do a backtest using a basic average cross system, like the one below, and you will find consecutives Shorts and Buys instead of seeing alternation VERSION 6.13 s32.postimg.org/45j7zn9ud/v613.jpgVERSION 5.8 s32.postimg.org/o68voocg5/ab580.jpgSetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) )); Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
SetOption("FuturesMode", True); PositionSize = MarginDeposit = 1; RoundLotSize = 1;
per1 = Param("MMe1",10,1,100,1); per2 = Param("MMe2",20,2,150,1);
MMe1 = EMA(Close,per1); MMe2 = EMA(Close,per2);
Plot(MMe1,"MMe1",colorGreen); Plot(MMe2,"MMe2",colorRed);
Buy = Cross( MMe1, MMe2 ); Short = Cross( MMe2, MMe1 ); Sell = Short; Cover = Buy;
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorGreen, 0,L, Offset=-45); PlotShapes(IIf(short, shapeDownArrow, shapeNone),colorRed, 0,H, Offset=-45);
|
|
andwilson
Private Group
Posts: 43
Received Likes: 13
|
Post by andwilson on May 10, 2016 23:51:07 GMT
Hi timestamp with miliseconds is not enough to garantee that ticks are unique. during a day , you can easily find many seconds with more than 3k ticksRegards
Regards
Anderson
Hello,
Yes I know, but a) timestamps in AmiBroker are down to microseconds (so you can have million of ticks per second) b) plugins automatically make all tick timestamps unique using tick number
Second thing is: if you want to use ASCII importer and $TICKMODE you must use use official version 6.10.
6.13 is in-development version and does not implement $TICKMODE due to recent changes.
Best regards, Tomasz Janeczko amibroker.com
|
|