Luca De Andrea:
You already asked this question a few days ago in another thread. Please do not duplicate questions.
Forum on trading, automated trading systems and testing trading strategies
Luca De Andrea, 2023.07.13 11:49
Anyone with this formula for the OnTester? Could be really useful.Testing Statistics (https://www.mql5.com/en/docs/constants/environment_state/statistics) doesn't provide yet this parameter that we can see in the Tester Report: Average Position Holding Time
Besides, your question was already answered in the same thread.
Forum on trading, automated trading systems and testing trading strategies
Ubzen, 2013.12.20 07:17
Sounds like (Sum_All_Closed_Positions (Position_Close_Time - Position_Open_Time)) / Total_Positions. What do you mean by Custom Max?You will have to calculate it yourself using 'Custom Max.' in OnTester().
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
In the Tester Report we have a lot of useful statistics, including the Average Position Holding Time.
Unfortunately, this parameter in not accessible with the Testing Statistics for the OnTester https://www.mql5.com/en/docs/constants/environment_state/statistics
Does anyone have a formula or idea on how to calculate it?
I think this can be very helpful to optimize some Scalping strategy.
Many thanks