Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I have searched far and wide for the answer to this question but still not found a conclusive answer. It appears the backtesting using any sort of Trailing Stop or Dollar Trailing appears to give a very unrealistic result within the bar. If for example I was using a 1 Hour chart and the data resolution is tick or 1 min data, the backtesting in Portfolio Trader will pick the most favourable conditions (shown in the attachment 1).
Also, if I am using a 1 Hour chart, the entries will be every hour, 11:00am, 12:00pm ect. but the stops or exits will sometimes be the same time, ie. Entry 11:00am & Exit 11:00am, realistically you would be expecting Entry 11:00am & Exit 11:24am (or something similar), therefore in Portfolio Trader I have no idea of when and how long the actual trades are? Attached below.
Hopefully I explained this well, I understand the concept of intrabar order generation also there appears to be a BarMagnifier (but not for Portfolio Trader). I have also tested this in Paper Trading, the trailing stops seem like they can behave more unpredictably than backtesting.
Basically I suspect my backtesting results are possibly too favourable for reality, and it has something to do with the resolution or how the backtesting engine works (I cannot find much information on this)
Thanks
Can you help answer these questions from other members on NexusFi?
Another screenshot that may show the example better. I'm going crazy trying to figure out if this situation could occur in real-life or is it too good to be true.
I have done some paper trading with the strategy, it is possible that the Trailing Stops are not behaving like in the back test.
How does the trailing stop know to take the exact high of the bar in real life? As there would be intrabar volatility on lower timeframes? My question is how can I test the trailing stops on lower resolutions for a more realistic backtest.
when using build in trailing stops (and other methods that can execute trades intrabar) without using the bar magnifier (with 1 tick resolution) the results will most likely not be correct (overly optimistic in general). This is caused because the platform would only know the Open, High, Low and Close of the bar, but not how it developed intrabar (without the bar magnifier).
I understand that tick data is limited, but you can likely prove if your system is overly optimistic by using a 1 minute resolution for the bar magnifier.
When using hourly data the bar's will only have hourly timestamps. Even if a trade is executed at 15:27, the trade will be shown on the 16:00 bar.
The missing bar magnifier in the Portfolio Trader is a problem (in my opinion) when you want to use the build in trailing stop for example and higher timeframes. This is a good way to produce great looking backtest results which will never be achievable in realtime.
Thanks very much for helping here. I have 1 minute data, how can I use the bar magnifier in Portfolio Trader, I cannot find it anywhere? Alternatively to that, I guess I could set the tradeable instrument to 1minute, and pull other data from hourly, daily ect - the problem with this is that MaxBars back gets annoying and the code stops being logical and easy to follow.
I have also setup paper trading with trailing stops, I have noticed they can get adjusted on a minute basis by default in real-time... which creates more confusion, as it live trading they seem to operate on a minute basis, but not in backtesting in Portfolio trader.
you won't be able to find the bar magnifier for the Portfolio Trader as there is none.
Your approach of using lower timeframes for Data1 and higher timeframes where you compute your
signals to be executed on Data1 is probably the best possible workaround.