Live MC Not Matching Simulated  [SOLVED]

Questions about MultiCharts and user contributed studies.
shane1800
Posts: 84
Joined: 28 Feb 2014
Has thanked: 5 times
Been thanked: 5 times

Live MC Not Matching Simulated

Postby shane1800 » 06 May 2016

Hi,

I have a live chart trading using an automated strategy that doesn't match what I think should have happened. Would love some advice on how to troubleshoot.

5 minute bars. The profit target order was hit and executed during the beginning of that bar. Then for the close, the strategy should have entered a short entry. Instead it did not at all.

On my simulated chart it shows it going through correctly, that 5 minute bar having a profit stop hit and then entering a new order on the close of the bar.

The attached picture is the simulated chart which is how it should look.

Thank you.
Attachments
Screen Shot 2016-05-06 at 1.32.10 PM.png
(9.14 KiB) Downloaded 1736 times

shane1800
Posts: 84
Joined: 28 Feb 2014
Has thanked: 5 times
Been thanked: 5 times

Re: Live MC Not Matching Simulated

Postby shane1800 » 06 May 2016

And the live strategy is in portfolio trader if that matters. And the strategy report in list of trades shows the correct trade matching the simulated chart.

Maybe there's a setting in PT that's off, optimize order flow?

I don't see any errors or rejected orders.

User avatar
syswizard
Posts: 295
Joined: 15 Dec 2012
Has thanked: 16 times
Been thanked: 28 times

Re: Live MC Not Matching Simulated

Postby syswizard » 08 May 2016

And the live strategy is in portfolio trader if that matters.
What happens when you run the strat outside of portfolio trader ?

shane1800
Posts: 84
Joined: 28 Feb 2014
Has thanked: 5 times
Been thanked: 5 times

Re: Live MC Not Matching Simulated

Postby shane1800 » 08 May 2016

When I run the strategy test outside of PT it matches the PT report so looks like the details are consistent but the live trades are not going trough correctly.

User avatar
syswizard
Posts: 295
Joined: 15 Dec 2012
Has thanked: 16 times
Been thanked: 28 times

Re: Live MC Not Matching Simulated

Postby syswizard » 09 May 2016

Can you post the lines of code that show the buy/sell orders ?
What happens if you change the code to trigger the buy/sell on the Open of the next bar instead of the Close of the current bar ?

shane1800
Posts: 84
Joined: 28 Feb 2014
Has thanked: 5 times
Been thanked: 5 times

Re: Live MC Not Matching Simulated

Postby shane1800 » 09 May 2016

That is a good question. I updated the code to buy on next bar at open and the strategy report shows about $1k less profit a year so ideally be good to do this as a last resort.


Profit target exit:

Setstopcontract;
If TradeTrigger = 1 and MarketPosition = 1 then
begin
SetProfitTarget(Entryprice * Percent_ProfitStrat1L * Bigpointvalue);
SetStopLoss(Entryprice * Percent_StopStrat1L * Bigpointvalue);



Short Entry:
Sell Short ( "Overvalued" ) ContractsTrading contracts this bar at close;

shane1800
Posts: 84
Joined: 28 Feb 2014
Has thanked: 5 times
Been thanked: 5 times

Re: Live MC Not Matching Simulated

Postby shane1800 » 09 May 2016

And also to mention I've used this strategy in TS without this issue for years. Maybe PT has an issue.

shane1800
Posts: 84
Joined: 28 Feb 2014
Has thanked: 5 times
Been thanked: 5 times

Re: Live MC Not Matching Simulated

Postby shane1800 » 10 May 2016

Ok this happened again today.

Actual trade PT sent in was 25 minutes later than it should have been. Strategy report showed it going in at the correct time.

So this is not an issue about two trades going in on the same bar anymore. PT just doesn't send in the trades on the right bar for some reason. Contacting support as losing real money on this issue.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Live MC Not Matching Simulated

Postby TJ » 10 May 2016

Ok this happened again today.

Actual trade PT sent in was 25 minutes later than it should have been. Strategy report showed it going in at the correct time.

So this is not an issue about two trades going in on the same bar anymore. PT just doesn't send in the trades on the right bar for some reason. Contacting support as losing real money on this issue.
Which MultiCharts verion you are using?

Do you have multi-time frame in your data?

Who is your broker/data provider?

This sentence makes no sense to me. Please explain further.
>Actual trade PT sent in was 25 minutes later than it should have been. Strategy report showed it going in at the correct time.


You are only giving partial information; they are not sufficient for any type of analysis.
Please post reports with date and time. Please post logs. Please use print for debugging.

shane1800
Posts: 84
Joined: 28 Feb 2014
Has thanked: 5 times
Been thanked: 5 times

Re: Live MC Not Matching Simulated

Postby shane1800 » 11 May 2016

I'm on build 12587

I have multi-time frame on, 5 minute bars as data1 and daily as data2.

Rithmic / Dorman.

To explain further. "Actual trade PT sent in was 25 minutes later than it should have been. Strategy report showed it going in at the correct time."

I have 4 strategies in PT trading the same symbol for the same futures account. Under list of trades in performance report in PT it shows a trade should have been made at 650. PT put that trade in at 715. There are no errors or warnings or anything unusual I can see as to why that keeps happening.

These same strategies put in the correct order at 650 in TS.

I hope that helps.


What I'm trying now is in PT not using a custom continuous futures contract but using just the current contract symbol. Maybe PT was not getting the bars in time as profit targets and stops work.

And in portfolio settings I put initial capital to $1b to make sure that doesn't interfere. I only generate trades once a week so will wait and see if that helps.

Thank you for looking and helping!

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Live MC Not Matching Simulated

Postby Henry MultiСharts » 13 May 2016

Hello shane1800,

I believe Alex is already working on this case. Please continue the discussion with him over the email.

shane1800
Posts: 84
Joined: 28 Feb 2014
Has thanked: 5 times
Been thanked: 5 times

Re: Live MC Not Matching Simulated  [SOLVED]

Postby shane1800 » 24 May 2016

Just to give an update on this I changed the PT symbol from a custom continues futures symbol (Rithmic) to just the current months future symbol and trades started to go through on time rather than several bars later.

So now PT reports match the actual PT trades.

User avatar
syswizard
Posts: 295
Joined: 15 Dec 2012
Has thanked: 16 times
Been thanked: 28 times

Re: Live MC Not Matching Simulated

Postby syswizard » 27 May 2016

So Shane - does this end up being a Rhythmic bug ?
What have you concluded ?

I am curious, why were you using a custom symbol for live trading anyway ?
I could see it for backtesting purposes.

shane1800
Posts: 84
Joined: 28 Feb 2014
Has thanked: 5 times
Been thanked: 5 times

Re: Live MC Not Matching Simulated

Postby shane1800 » 27 May 2016

Hi,

I'm guessing there's an issue with PT and continuous symbols but not wanting to test this issue with live money so tabling it for now. Ideally PT would offer merged data.

I like being able to see the whole history of my trading portfolio over several years while live trading for risk management.

Rithmic single futures symbols are working well.

I use a custom futures symbol for living trading as I look at many bars back and my backtesting is based on many years of a continuous symbol. If my strategy is just using a single symbol and needing to look at 45 days of intraday data it will look at the wrong symbol for last month etc.

User avatar
syswizard
Posts: 295
Joined: 15 Dec 2012
Has thanked: 16 times
Been thanked: 28 times

Re: Live MC Not Matching Simulated

Postby syswizard » 30 May 2016

Hi,

I'm guessing there's an issue with PT and continuous symbols but not wanting to test this issue with live money so tabling it for now. Ideally PT would offer merged data.
Oh, I agree with this. I wonder if you can "fake PT out" by using a valid "old" symbol (say ESM0) and set the expiration date to June of 2016. ESM0 of course would contain the continuous futures prices for March 2010 thru 1st week of June 2016.


Return to “MultiCharts”