Difference in outcome backtest and automated trading
Forums › ProRealTime English forum › ProOrder support › Difference in outcome backtest and automated trading
- This topic has 48 replies, 6 voices, and was last updated 10 months ago by MartinB.
-
-
01/16/2024 at 12:24 AM #226402
Thanks for your comment Grahal.
I deal live and at the same time I run the backtest live with the same spread, time zone, etc
My main issue is that I have days with 70 to 90 points difference between the two systems.
At the top of every hour, positions are taken in both systems always, but here starts the difference already despite the same spread, commission, etc
The rest of the differences are caused by the trailing stop as the live system is treating the trailing stop differently apparently, from the one in the backtest.
Maybe it has to do with the steps of the trailing stops. I can’t see the history of the steps taken in the backtest.
Do you know this perhaps?
Best regards,
Martin
01/16/2024 at 10:00 AM #226404What Instrument are you trading?
I can’t see the history of the steps taken in the backtest.
Use GRAPH to see the trailing stop in backtest.
https://www.prorealcode.com/documentation/graph/1 user thanked author for this post.
01/16/2024 at 12:04 PM #226418In your OP you state USD/JPY, the spread on Forex varies all day long linked to price action / volatility … post an example code snippett as to how you coded this variation into your System that you are backtesting?
Also when you say backtesting … do you mean …
- Backtesting on historical data only.
OR - Allowing the backtest engine / window to run forward and so test on Live data?
1 user thanked author for this post.
01/16/2024 at 11:45 PM #226447Hello Grahal,
I use both, backtesting and let the back engine run forward
I trade USD/JPY and EUR/USD, due to the low spread and the high volume
In the hours I trade, I use 1 pip spread for both currency pairs.
I use the standard Trailing stop from Prorealtime
I attached 3 ITF files, my original files ITF and ITF 1
ITF file 2 is send by Peter in an earlier post, but I was not able to test it yet.
I´m happy with my systems as it makes money in live trading, but looking at the corressponding backtests it should perform better.
As said earlier, I like to work with small stops and the corresponding small losses should be made up by a few bigger movements, at least that is the plan 😉
Maybe you can sent me with this info a new ITF file, with your thoughts to get the (forward) backtest in line with the live trades .
01/17/2024 at 9:22 AM #226451Add the Indicator Bid-Ask band to your Real Live running chart and you will see how often the spread on Forex ‘flash widens’.
You are trying to simulate an often ‘flash widen spread’ in Live by using a fixed 1 point spread in the backtest engine.
I will try / test out your .itf’s during today and get back to you.
01/17/2024 at 9:31 AM #226453you will see how often the spread on Forex ‘flash widens’.
You need to run the Live Chart on 5 seconds TF to see the ‘flash widen spread’ with the Bid-Ask band Indicator.
1 user thanked author for this post.
01/17/2024 at 9:47 AM #226454I backtested your .itf files and in both you have not ticked / enabled the ‘Tick by Tick mode’ and so the backtest results look too good to be true but in reality / Live running they will run very different from backtest.
The ‘Tick by Tick mode’ box is just below where you enter spread for backtest … tick / enable the box to get a true picture of results in backtest.
1 user thanked author for this post.
01/17/2024 at 12:30 PM #22646401/17/2024 at 12:33 PM #22646501/17/2024 at 12:46 PM #226466to flag the Tick by Tick mode? (on IB)
I dont use IB, so does above mean … make tick by tick mode box available to be ticked / enabled?
01/17/2024 at 12:52 PM #22646701/17/2024 at 12:56 PM #22646801/17/2024 at 3:23 PM #226469The short answer : indeed it has disappeared. However, the optimization result form still shows at the bottom “click a line to show the result including tick by tick data”. So I assume it still does so.
The longer answer is about what happens in the first place when there is no optimization result to click in/on. I wrote a text about it, but am reluctant to post it. It is too much of guessing and a larger discussion in the base (which often passed these forums) – usually talking about wrong results. It would require extensive testing again.
The ultra short answer : it is a bug that it’s left out now for PRT-IB. And where are the Release Notes ?
01/17/2024 at 3:53 PM #226473thank you for your answer. Many months ago I copied a strategy in prorealcode and I could see the difference with tick by tick enabled or not(excellent curve not enabled and curve going down with tick by tick enabled), because this strategy had the problem to open and close the trade in the same candle. I read you intervention and I tried to backtest this strategy yesterday (choosing a random parameter and putting it with from 0 to 10) and clicking on a result on the list, I’ve verified for sure that tick by tick does not work. So far there is no way to use it in IB, with or without parameters in optimization. According on how I build strategies, it shouldn’t affect it but it seems to me a big step back in the developing of proreal time for IB.
1 user thanked author for this post.
01/17/2024 at 5:50 PM #226474And thus it is a bug – and not a small one.
(excellent curve not enabled and curve going down with tick by tick enabled)
Yes, I know exactly what you mean. Your life would change from the imagination of going super rich, to going plain broke. 🙁
But this also means that the Tick column remains zero, while you (by now) know it can contain 100+ tick errors. Am I right ? I mean, it would contain many errors with that “excellent” curve.
V12 is unusable from all angles already. So now this.
Thanks a lot for you effort and posting ! - Backtesting on historical data only.
-
AuthorPosts
Find exclusive trading pro-tools on