Backtest data issue
Forums › ProRealTime English forum › ProBuilder support › Backtest data issue
- This topic has 6 replies, 3 voices, and was last updated 2 years ago by deltasystem.
-
-
06/10/2022 at 10:17 AM #195023
Hi,
I am new to PRT and have been back testing several strategies. I would like to understand which data the software uses to simulate the trades. Here an example. I created a very simple Algo where the the system should go long or short depending the direction of 2 indicator lines crossing each other. I am using a 1 hour time frame and I am also using a 25 point trailing stop loss which protects the loss amount and also is the target. All trades are opened and closed exactly on the hour in the back test (please also explain this to me if possible). How does the system calculate at which price the Stop loss is activated?
06/10/2022 at 10:26 AM #195027Hi there !
Without looking at your code, it is a bit difficult to guess what your issue is, assuming you have one. And explaining “all” is not possible. If you show your code (preferably by means of the blue button if it is visible (otherwise bad luck) and tell what you expect of it vs what you see happening, you hopefully will receive decent answers ?
Peter
PS: If you click on the attachment below, you will see that blue button I referred to.
06/10/2022 at 10:43 AM #195034hi Peter,
i poste the code on the other thread…
06/10/2022 at 11:37 AM #195041hey,
I have attached a screenshot of what I mean. How does back test calculate the trailing stop Loss? If I use tick data does it actually calculate exactly how the market moved even if I am using 1 hour candlesticks and testing 1 hour.
thanks!
06/10/2022 at 1:21 PM #195049If you use tick data, the backtest will check on all inferior timeframes when exactly the stoploss is triggered.
1 user thanked author for this post.
06/10/2022 at 1:33 PM #195054Yes it does. It is only that in Backtest you will see the Exit at the 1 hour level, while in reality it happened “underway” (like at 10:50 while you see that it happened on 11:00).
See that little green triangle ? that is where the trade happened in reality – thus in-bar (you can see the pin of the bar through the vertical line).
The second example shows live (this is the green triangle again) together with Backtest (brown). You can see a difference of less than a point (this is Nasdaq) between the two.
2 users thanked author for this post.
06/10/2022 at 4:15 PM #195082hey, thanks a lot for that explanation!
-
AuthorPosts
Find exclusive trading pro-tools on