short backtest history
Forums › ProRealTime English forum › ProOrder support › short backtest history
- This topic has 5 replies, 3 voices, and was last updated 1 week ago by
kanonmicke.
-
-
04/07/2025 at 2:11 PM #245677
This might be a very common question, im sorry, but I have searched and not found any answer.
Im backtesting a strategy using ProRealTime V12 on IG, live-account.
It seems I cannot get more then 10 hours of history for my backtest.
I have tried setting different “units” on the chart and I have
DEFPARAM PRELOADBARS = 200000
set in the beginning of the strategy.Is there another setting somewhere in ProRealTime that i need to se to be able to backtest more then 10 hours back?
04/07/2025 at 3:16 PM #24568704/07/2025 at 3:23 PM #245689Thank you for your reply.
I have seen that function and when I click it I cannot get more history, I can not choose 2 days ago or 1 week.
04/07/2025 at 3:30 PM #24569404/07/2025 at 5:31 PM #245702This may not be directly relevant to the answer, however it may help with some understanding, this is how I currently see it!
The price chart is populated with 500 default historical bars, plus, the number represented by the units size (which is how many are in the default display area).
I don’t know if this holds for all timeframes but, 1minute timeframe, 25units give 500+25 bars, with the barindex value running from 0 to 524.
The time period duration would be 1minute, and a bar refers to only time periods where their is a candle/’bar’ present.
In the back-test module, there’s the addition of preload bars, these come before the ‘historical’ bars, etc, and as mentioned above, the max preloadbars is 10000.
If set to the maximum, the preloadbars fall on barindex 0 – 9999 where barindex 10000 is the first bar of the chart.
This, first ‘chart bar’ is the beginning of where order can start, (the start of the back-test range), and the preloadbars only allow for calculated indicators to hold a valid value at that point, if needed.
A valid value depends on, how many bars/units are needed to calculate the indicators.
This means that if you need more than 10000 units to provide a valid calculation, on the first chart bar, your going to be dis-appointed somewhat.
Also, if you used the Timeframe command, the higher timeframe will need to use more of the default timeframe preloadbars for their indicator calculations.
Note, additional timeframes are limited to the number of defaults timeframes preloadbars, their pre-load-bars must fall within the default timeframes preloadbars scope.
Now, how many units a chart is set to, affects the range the back-test can represent, so even if preloadbars were set to 10000, there would only be 524 (order usable) bars in the chart, using this example.
Increasing the preloadbars only affects the pre-calculated indicator values portion, and not the back-test range.
Increasing the charts units, does provisionally, increase the back-test range, however, as pointed out above, the back-test range setting, if set to a smaller range, will take precedent.
So, not having having enough units can limit the back-test range, but also the back test range settings can also limit it.
The reverse is true also, trying to set a larger range setting may need more units added.
At 1minute timeframe, where each bar is 1minute, 524 bars / 60 = ~hours give an approximate range of 7 – 8 hours, depending on how many time periods don’t have a candle.
Also there’s limits on the number of back-test bars and a limit on how many of them can be tick-by-tick bars I believe, not sure of these limits, there may be differences with different PRT packages.
When the strategy goes live, I guess there’s only the preloadbars present, and the first live bar is the first possible start point where orders can be taken.
04/08/2025 at 6:30 AM #245717Thank you for your input.
I now realize I have to set the units before I go into the strategy (modify-mode) to change the time before backtest.1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on