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.
Live MC Not Matching Simulated [SOLVED]
Live MC Not Matching Simulated
- Attachments
-
- Screen Shot 2016-05-06 at 1.32.10 PM.png
- (9.14 KiB) Downloaded 1736 times
Re: Live MC Not Matching Simulated
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.
Maybe there's a setting in PT that's off, optimize order flow?
I don't see any errors or rejected orders.
Re: Live MC Not Matching Simulated
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 ?
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 ?
Re: Live MC Not Matching Simulated
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;
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;
Re: Live MC Not Matching Simulated
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.
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.
- TJ
- Posts: 7752
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1034 times
- Been thanked: 2228 times
Re: Live MC Not Matching Simulated
Which MultiCharts verion you are using?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.
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.
Re: Live MC Not Matching Simulated
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!
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!
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: Live MC Not Matching Simulated
Hello shane1800,
I believe Alex is already working on this case. Please continue the discussion with him over the email.
I believe Alex is already working on this case. Please continue the discussion with him over the email.
Re: Live MC Not Matching Simulated [SOLVED]
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.
So now PT reports match the actual PT trades.
Re: Live MC Not Matching Simulated
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.
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.
Re: Live MC Not Matching Simulated
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.
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.
Re: Live MC Not Matching Simulated
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.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.