Live trades do not match those of the backtest
Forums › ProRealTime English forum › ProOrder support › Live trades do not match those of the backtest
- This topic has 30 replies, 5 voices, and was last updated 5 months ago by Tropic.
-
-
06/14/2024 at 12:16 AM #233851
Sorry guys but I don’t understand much of what you’re talking about. Thank you for your many replies but it seems like you’re going a bit “off topic”.
It seems to me that some of you keep telling me to start the backtest from the date the system is flat or from the moment I started putting the trading system live too, right? I did it and I repeat that in this case it works, the trades in live match with that of the backtest, even if I start it from a slightly earlier date, the problem is when I increase the duration of the backtest, I am interested in the one to 1kk bars, and that’s where it doesn’t work because the last trades that the backtest tells me are totally different from those I had live, I can’t.
I still can’t publish the code here because it is long and complex and it is not entirely mine so I think it is better to avoid it, but I assure you that the algo instructions are simple and correct and there are no conditions under which the trades it carries out depend on previous trades, from equity, gain or similar things . Furthermore, the trades I had live are almost totally different in every way from those in the backtest, they don’t even come close, different dates, different entry and exit times, longs that should actually be shorts, etc. It seems that they come from another algorithm, it is not clear where it comes from.
It almost seems that in reality IG does not have the correct data available for 1KK bars of the Nasdaq 1 min but it only holds it for about 50k bars maximum after which the backtest is not more reliable, could this be the problem?
Thank you
1 user thanked author for this post.
06/14/2024 at 7:59 AM #233854When you have a trade in Live that does not agree with a trade in backtest, was there a trade in backtest already open when the trade in Live executed / opened?
To assess above, use the most recent trades and post a screenshot(s) so we have something other than guesswork to try and help you.
1 user thanked author for this post.
06/15/2024 at 4:11 AM #233888@Tropic, apologies for the derailment …. I’d be keen on understanding what you’re seeing (interop processes) so if you could kindly reply to @GraHal perhaps they and others, (yes @PeterSt inclusive because it’s clear from there historical posts that they have been around the block a few times), could then try and nut out what’s going on.
06/15/2024 at 8:25 AM #233889Th thought slipped into my mind that possibly Tropit is using real Futures and that he backward passes roll over dates. This is not something which shows at first glance; but it would imply quite exactly the effect you’re observing, Tropit.
1 user thanked author for this post.
06/16/2024 at 10:53 AM #233917@inverse don’t worry, no problem, just talk about it here if it can help solve the problem.
@PeterSt In reality I am using a normal CFD account with IG so I don’t think they are futures, unless IG is doing some hidden trick whereby it replaces Nasdaq CFDs with Futures, I continue to become suspicious of IG’s ability to provide correct data that Now I expect everything.@GraHal
I can’t tell you if the backtest had trades already open while it was doing the live trades, unfortunately I noticed it a little late. Now I’ve stopped it from Live and won’t put it back into action until I fully understand what’s happening.
I’m sending you here the screen of the backtests that I also sent to IG technical support, maybe it’s a little difficult to see, sorry, you have to open it and zoom in.However, on the left there is the backtest in the period in which I had the system live, the trades all coincide correctly with the live ones.
On the left is the 1 million bar backtest.I have now noticed that among these trades there are also those he made live. But he adds others that he didn’t do live without understanding why.
Furthermore, I don’t know why during the period in which it was live it did all short trades, but now that I am continuing to test it in a demo account it tends to only do long trades and the 1 million bar backtest continues to not coincide adding other trades that he doesn’t do in the live demo. If needed, I’ll take a screenshot of this too.06/16/2024 at 10:59 AM #23391806/16/2024 at 11:01 AM #233920@inverse don’t worry, no problem, just talk about it here if it can help solve the problem.
@PeterSt In reality I am using a normal CFD account with IG so I don’t think they are futures, unless IG is doing some hidden trick whereby it replaces Nasdaq CFDs with Futures, I continue to become suspicious of IG’s ability to provide correct data that Now I expect everything.@GraHal
I can’t tell you if the backtest had trades already open while it was doing the live trades, unfortunately I noticed it a little late. Now I’ve stopped it from Live and won’t put it back into action until I fully understand what’s happening.
I’m sending you here the screen of the backtests that I also sent to IG technical support, maybe it’s a little difficult to see, sorry, you have to open it and zoom in.However, on the left there is the backtest in the period in which I had the system live, the trades all coincide correctly with the live ones.
On the left is the 1 million bar backtest.
I have now noticed that among these trades there are also those he made live. But he adds others that he didn’t do live without understanding why.
Furthermore, I don’t know why during the period in which it was live it did all short trades, but now that I am continuing to test it in a demo account it tends to only do long trades and the 1 million bar backtest continues to not coincide adding other trades that he doesn’t do in the live demo. If needed, I’ll take a screenshot of this too.
i mean “on the right” there is the 1 million barbacktest
06/16/2024 at 12:59 PM #233937Trades in a Table (as you posted above) is not a useful substitue for what I had planned to anlayse your problem.
If you have the System in your ‘Not Running’ section of ProOrder you can still see the most recent trade that the System and match that date / time with the same date / time in a backtest and then do a screenshot showing both Live and backtest trades.
When analysing a problem, I work with equity chart + positions and then ‘Cursor Detail’ to view exact price levels and indicator values etc.
I for you can provide above, I / we may see something that will help you; otherwise, I feel we are going round in circles and getting nowhere?
06/16/2024 at 1:29 PM #233945But he adds others that he didn’t do live without understanding why.
I checked again your Table of trades in your screenshot.
In Live (on the left) your trades have coincident trades with backtest (on the right).
In backtest (on the right) you have lots more trades that are NOT coincident with Live (on the left).
Do you agree with my statements above … simple answer Yes or No and then we can more forward in itterative mode? 🙂
06/16/2024 at 2:48 PM #23395206/17/2024 at 8:47 AM #233983Ok thanks, I still have the system in the “not running section” and the trades it tells me are the ones it made in live that I have already sent before, I don’t know if it should also tell me the ones it would have made if I had left it in run, after I stopped it, but I think not because I’m running it in demo and it carries out other trades for me. I’ll send you the screen, tell me if it’s ok or do you need other views.
Yes, I confirm that the live trades on the left have trades coinciding with the 1 million bar backtest on the right which adds others that do not coincide.
The spread I used for the backtest is 2 points
06/17/2024 at 8:58 PM #234015Is your backtest using a position size – for some of the trades – that is not allowed in Live? Result of this would be that some backtest trades match Live but not all backtest trades match Live?
I am near the end of my guesswork as to the cause of the problem.
Tropic have you come to any conclusions, ideas or even wild guesses as to the cause?Did you buy this Algo off MarketPlace?
06/18/2024 at 9:29 AM #23402906/18/2024 at 9:38 PM #234069Hi Grahal, yes the backtest code uses a fixed position size for all trades of 0.5. If I’m not mistaken the minimum size allowed on the Nasdaq is 0.25 so from this point it seems to cause no problems both in live and in the backtest it puts them all at 0.5 but in the backtest it adds others that aren’t there in live.
No, I didn’t buy this algo on the Marketplace and I checked the rejected/cancelled orders list and I’m sorry but there doesn’t seem to be any, not even in the period in which it was live.
I still can’t explain why what happened, apart from my suspicion that IG provides incorrect data in the 1min timeframe, unfortunately I can’t think of any other explainable conclusion for the moment, I’m sorry.
Another strange thing that I noticed is that the live trades he made noted that they all lasted only “1 number of bars” unlike the backtest ones, as if they were all the same length of 1 minute, but this is not true! Because entry and exit times of the trades in the order list say that in reality they all lasted more than 1 minute and each has a different duration…why this too?
06/19/2024 at 8:00 PM #234118all lasted more than 1 minute and each has a different duration…why this too?
Idea … double / treble check to make sure Backtest and Live are both running on 1 min TF.
-
AuthorPosts
Find exclusive trading pro-tools on