Hi Guys
Has anybody got the new ‘Tick by Tick Backtester’ who might be able to help please?
I have a System that is giving weird results.
RESULTS A: The Trade highlighted is the issue Trade!
[attachment file=14160]
[attachment file=”67 Bars Equity Curve.jpg”]
Code to Produce Results A:
(Note : OR POSITIONPERF < – 0.004 is ‘Commented Out of the Code’)
DEFPARAM CUMULATEORDERS=FALSE
Hi = HIGHEST[225](HIGH[1])
Lo = LOWEST[180](LOW[1])
//Go Long
IF high>Hi and close>open and range>range[1] and open>((high+low)[1]/2) THEN
BUY 1 Contract AT MARKET
endif
//Go Short
If Low<Lo and close<open and range>range[1] and open<((high+low)[1]/2) THEN
sellSHORT 1 Contract at market
endif
//Exit Long
IF LONGONMARKET AND (BARINDEX - TRADEINDEX ) = 460 OR POSITIONPERF > 0.025 THEN
sell AT MARKET
ENDIF
//OR POSITIONPERF < - 0.004
//Exit Short
IF SHORTONMARKET AND (BARINDEX - TRADEINDEX ) = 385 OR POSITIONPERF > 0.016 THEN
EXITSHORT AT MARKET
ENDIF
//OR POSITIONPERF < - 0.004
RESULTS B
[attachment file=14162]
[attachment file=14163]
Code to Produce Results B:
(Note : OR POSITIONPERF < – 0.004 is ‘Inserted In the Code’)
DEFPARAM CUMULATEORDERS=FALSE
Hi = HIGHEST[225](HIGH[1])
Lo = LOWEST[180](LOW[1])
//Go Long
IF high>Hi and close>open and range>range[1] and open>((high+low)[1]/2) THEN
BUY 1 SHARE AT MARKET
endif
//Go Short
If Low<Lo and close<open and range>range[1] and open<((high+low)[1]/2) THEN
sellSHORT 1 SHARE at market
Endif
//Exit Long
IF LONGONMARKET AND (BARINDEX - TRADEINDEX ) = 460 OR POSITIONPERF > 0.025 OR POSITIONPERF < - 0.004 THEN
sell AT MARKET
ENDIF
//Exit Short
IF SHORTONMARKET AND (BARINDEX - TRADEINDEX ) = 385 OR POSITIONPERF > 0.016 OR POSITIONPERF < - 0.004 THEN
EXITSHORT AT MARKET
ENDIF
My concern is …
Results A … for the Trade on 29 Sep 16 @ 08.30 I can see 67 bars (with OR POSITIONPERF < – 0.004 commented out of the code).
BUT
Results B … the Trade on 29 Sep 16 @ 08.30 I can see 0 bars (with OR POSITIONPERF < – 0.004 inserted in the code).
Okay we all know about ‘0 bars Issue’ but not 67 / multiple bars becoming 0 bars??
You will note from the ‘GRAPH Variables’ that the Trade on 29 Sep 16 @ 08.16 also hit the POSITIONPERF < – 0.004 (see the GRAPH variable at the bottom of the Equity Curves .jpgs above) but this Trade @08.16 was NOT reduced to 0 bars (as was the Trade on 29 Sep 16 @ 08.30).
The above anomaly set my alarm bells ringing … does the PRT Platform have another ‘hidden weakness’ which the new ‘Tick by Tick’ engine may NOT rectify??
So … I put this System up for analysis, mainly using the new ‘Tick by Tick’ engine, but also – out of interest – to see if you get the same weird results with the Trade on 29 Sep 16 @ 08.30.
I am with IG and the above is a spreadbet on the DAX @ £1 per point UK Summer Time.
Hope above makese sense, if not just say.
GraHal
PS Have I attached files incorrectly? Is there any way to embed the .jpgs in the text? In my opinion (?) it breaks the reading flow having to scroll down, find the .jpg reference, open, view then scroll back up to where you left off reading the text.