BIG CALL FUNCTION PROBLEM
Forums › ProRealTime English forum › ProRealTime platform support › BIG CALL FUNCTION PROBLEM
- This topic has 32 replies, 7 voices, and was last updated 1 month ago by
nevtek.
-
-
06/06/2025 at 10:36 AM #248009
https://www.prorealcode.com/topic/htf-indicator-call-bug-in-backtest-code/#post-247994
You can see here aswell!
06/06/2025 at 10:42 AM #24801106/06/2025 at 11:12 AM #248012Hi,
Just to clarify…
You’re using “ignore1hourtimeframe” in the line “ignore1hourtimeframe, cb2 = CALL “indicator21″”…
Are you sure you’re allowed or able to use this? Where does it come from?
Also, cb2 = average[200](Close), but cb2 isn’t used in any specific condition.
So you’re just calling an average with: ignore1hourtimeframe, cb2 = CALL “indicator21”.06/06/2025 at 2:54 PM #248014I think I know where the issue lies…
The Call instruction is only executed on the close of the candle…
When you use UpdateOnClose, both systems behave the same and there are no differences in the outcomes…
If you don’t use UpdateOnClose, the system with the built-in indicator will check every five minutes (orTimeFrame(Default)
) whether the conditions are met, while the system using the Call instruction has to wait for the result of the condition from the hourly chart (TimeFrame(1 hour)
)…
You can also see this in the backtest results: when a position is closed, the system with the built-in indicator enters a new position after five minutes, while the system with the Call instruction only re-enters after an hour…
In live trading, the code is always executed on the close of the candle, so there is no difference there…
In short: the Call instruction is not executed on every tick, but always on the close of the candle…
06/06/2025 at 5:26 PM #24801506/06/2025 at 5:34 PM #248016You can do it with any indicator and try. I just came up with a random one.
If you do not use updateonclose the backtest is shown wrongly. It does not matter what the indicator is.
And once again this has not been a issue for over 6 years of using multi timeframe. I litterelly tested over 10 systems even systems imported with correct backtest, which now shown wrong.
And there is nothing wrong with the calling I just did. I have been calling indicator for years even before on a version you could just have same ignore variable across different timeframes. After that the new version of PRT encourage you to rename it on a new timeframe.
You can name it ignore1, ignore2 etc. It does not work on ANY CODE which it has done for mulitple years, something has changed over the last week/weeks. I just wrote that code to show a simple explanation of it.
06/06/2025 at 5:38 PM #24801706/06/2025 at 6:34 PM #24801806/06/2025 at 6:55 PM #248019phoentzs this is not about forgeting. This has never been a problem for several years. I noticed it 2 days ago when backtesting a system and I was shocked by the results. Then I started testing all my systems with calling indicators. All systems that have been totally fine over the years (but changed totally now). It is a serverside problem on PRT, not about forgetting updateonclose.
It is only happening when CALL the indicator. If you have the same system without call function from indicator, you get another backtest result WITHOUT updateonclose.
Also PRT seem to have commented it on being adressed, so how come you still point at the updateonclose?
06/06/2025 at 7:02 PM #248020https://www.prorealcode.com/topic/htf-indicator-call-bug-in-backtest-code/#post-248010 You can try yourself (:
06/06/2025 at 7:05 PM #248021I’m not familiar with the calling function of external indicators… I simply don’t use it. I only use indicators, or let’s say, trading decisions, within a system. And if you omit “updateonclose,” you get a completely different result. But it’s always been that way.
06/06/2025 at 7:06 PM #24802206/06/2025 at 7:08 PM #24802306/06/2025 at 7:10 PM #24802406/06/2025 at 7:14 PM #248025 -
AuthorPosts
Find exclusive trading pro-tools on