How do I check whether 'Optimisation' or 'Forward Optimisation' is in progress? - page 7
![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
Forward=Custom, Optimisation=Disabled? - should this also be checked or just get the balance line and calculate the regression parameters?
Calculate the regression STRICTLY IF Forward=Cast, Optimization=Disabled. I.e. if it is a regular optimization or a run without forward we do nothing
There are no flags in MQL5.
Well, can the code just go into the ini-file and look at it?
I have done a similar check indirectly. The first trade is always a top up (it is the same on all runs). Therefore, I memorized HistoryDealGetInteger(ticket, DEAL_TIME) for the first trade in OnTester and wrote it into the frame. By this value, we can divide the entire set of runs inOnTesterPass into back and forward. If possible, pass the values for the required calculations from OnTester to OnTesterPass, while the calculation itself is already performed in OnTesterPass.
Well, can the code just go into the ini-file and look at it?
We need to collect regression and profit by forwards - hence the assumption that the ini-file will be visible.
And yes, by the way, maybe, when just optimizing without any forwards, OnTester runs only once - then no check is needed. The second initialization simply will not happen.
If possible, pass values for the required calculations from OnTester to OnTesterPass, and perform the calculation itself in OnTesterPass.
We need to collect regression and profit by forwards - hence the assumption that the ini-file will be visible.
And yes, by the way, maybe, when just optimizing without any forwards, OnTester runs only once - then no check is needed. The second initialization simply will not happen.
The topic here started with the fact that it is impossible to define backwards and forwards programmatically, which is the main issue of this topic. The ini can only be used to find out in which mode the tester is running.
It is not possible to define the boundary between the two programmatically. But I, for example, don't need a boundary, I need data. You said that OnTester's second initiation only works with forward data.