Point chart Backtest issue

Questions about MultiCharts and user contributed studies.
GuppyDRV
Posts: 57
Joined: 20 Jan 2017
Has thanked: 1 time
Been thanked: 2 times

Point chart Backtest issue

Postby GuppyDRV » 14 Jan 2021

Hello all,

I hope the new trading year is going great for everyone!

Quick question regarding some backtest behavior. After upgrading to MC 14 I was doing some reading on the blog about upgrade changes and enhancements to this and other versions. I’m in a grove with what I do so I seldom look outside of my comfort zone. I came across an enhancement some time ago reference tick by tick data replay for different chart types so I started to experiment with point charts. I use range elsewhere and have come to find MC references these charts by the name “Point”.

I have selected the regular chart type with resolution set to points. As per the update notes I read the bar magnifier down to one tick resolution is available for backtest and tick by tick playback is available as well. O.K. all good so far. I pulled some generic signals from internally within MC which were the MACD LE/SE signals. Just to make it interesting I added a data 2. So data 1 is a 4 point resolution and data 2 is a 12 point resolution (picked these at random just to generate a lot of trades). Data 1 does nothing but check for the close being higher than the open for the prior two bars. Don’t read into the logic as there is none. I just wanted to have a use for data 1. Data 2 is used to calculate the MACD. I put a quick time check so as to trade only within the RTH and that’s all it does. No one is retiring off this one!!!

I set up a chart using the CME Globex template, again provided within MC. I connected to the internal Sim account with the strategy set to IOG=True and Bar magnifier set to one tick with skip identical ticks “unchecked”and set out trading in SA mode. All good as it took lots of trades and appears on inspection to be working as planned. What I really wanted to find out was if after the close of the day and a quick re-load of the Chart that the backtest would resemble live trading. Not even close! Like it’s on a different planet.

I then thought...........I know maybe I should stop thinking so much, let’s try the same deal with playback mode. I set this up turned “Global mode” on and turned of skip identical ticks. Again not even on the same planet but interestingly enough exactly as it backtested. I tried various playback speeds and every combination of settings I could think of with the same results.

Now to my question. If tick by tick playback and Bar Magnifier set to 1 tick resolution aren’t capable of producing a similar result in backtest as live trading is the issue with something I’m doing or is there a setting or code change that I would have to make. I really need to understand this if I want to move some complex stuff over to point bars.

My understanding was that they are regular bar types with access to tick level data and intra bar time. What am I missing.

I’d post the code I used but it’s so simple stupid I didn’t think it was worth anyone’s time. If someone thinks it might help I’ll put it in a code box.

Thanks for the help!

GuppyDRV

hughesfleming
Posts: 275
Joined: 22 Apr 2014
Has thanked: 70 times
Been thanked: 72 times

Re: Point chart Backtest issue

Postby hughesfleming » 15 Jan 2021

I would try with just data1. If you add data2 and you don't set your barstatus to calculate end of bar you can in some cases get a very misleading back test.

regards,

Alex

GuppyDRV
Posts: 57
Joined: 20 Jan 2017
Has thanked: 1 time
Been thanked: 2 times

Re: Point chart Backtest issue

Postby GuppyDRV » 15 Jan 2021

Alex,

Thanks for the input. I did try inserting a Barstatus ( 1 ) = 2 and also Barstatus ( 2 ) = 2 just to see. No change whatsoever! Results are still totally different.

I’m starting to think it’s a Point resolution issue in general. In the same way a Renko chart will backtest incorrectly! I really thought since this is a regular bar type with access to tick level data that this would not be the case.

GuppyDRV

hughesfleming
Posts: 275
Joined: 22 Apr 2014
Has thanked: 70 times
Been thanked: 72 times

Re: Point chart Backtest issue

Postby hughesfleming » 15 Jan 2021

Interesting, I am not familiar with trying to auto trade with anything other than time bars. These days, I try and do everything with data1 and intrabar order generation. This is working for me.

Kind regards,

Alex

Gregorian
Posts: 23
Joined: 10 Jan 2018
Has thanked: 3 times
Been thanked: 7 times

Re: Point chart Backtest issue

Postby Gregorian » 15 Jan 2021

I have had the same experience with Point charts backtesting differently vs. forward testing. Kase charts do backtest consistently; perhaps you should try those instead.

hughesfleming
Posts: 275
Joined: 22 Apr 2014
Has thanked: 70 times
Been thanked: 72 times

Re: Point chart Backtest issue

Postby hughesfleming » 16 Jan 2021

Thanks for the feedback. How do you get around the lack of tick bar magnification with Kase bars? I have just assumed that these can't be back tested precisely? Have I missed something?

For example, I have a strategy for ES that runs on 10 minutes with tick magnification on. If I switch it to Kase at 10 minutes 5 point with intrabar order generation set to on I get this equity curve. Perhaps intrabar order generation is giving the overly optimistic test?
image_2021-01-16_064714.png
(57.17 KiB) Not downloaded yet

Gregorian
Posts: 23
Joined: 10 Jan 2018
Has thanked: 3 times
Been thanked: 7 times

Re: Point chart Backtest issue

Postby Gregorian » 16 Jan 2021

You are correct, tick level backtesting of Kase charts is not possible. Point Original charts suffer from the same limitation. The only solution I see is for MC to fix Point charts as you envisage.

hughesfleming
Posts: 275
Joined: 22 Apr 2014
Has thanked: 70 times
Been thanked: 72 times

Re: Point chart Backtest issue

Postby hughesfleming » 16 Jan 2021

To be honest, if you are using intrabar order generation, extensive forward testing is the only option regardless of bar type or bar magnification.


Return to “MultiCharts”