How do I check whether 'Optimisation' or 'Forward Optimisation' is in progress? - page 7

 
Dmitry Fedoseev:
Forward=Custom, Optimisation=Disabled? - should this also be checked or just get the balance line and calculate the regression parameters?
Calculate the regression multiplied by the net profit STRICTLY IF Forward=Cast, Optimization=Disabled. I.e. if it is ordinary optimization or run without forward we do nothing
 
Youri Tarshecki:
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.
 
Dmitry Fedoseev:
There are no flags in MQL5.

Well, can the code just go into the ini-file and look at it?

 
Stanislav Korotky:
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.
Do back and forwards have a different ticket for the first trade?
 
Youri Tarshecki:
Well, can the code just go into the ini-file and look at it?
That's what I was asking - should I only build a balance line and use it to calculate the regression, or should I define "Forward=Custom, Optimization=Optimized"?
 

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.

 
Stanislav Korotky:
If possible, pass values for the required calculations from OnTester to OnTesterPass, and perform the calculation itself in OnTesterPass.
How is this better?
 
Youri Tarshecki:

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.

This topic started with the fact that you can't define back and forward programmatically, that's the main question of this thread. You can only find out in which mode the tester is running.
 
Dmitry Fedoseev:
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 impossible to programmatically determine the boundary between one and the other. But I, for example, don't need a boundary, I need data. You said that OnTester's second initiation only works with forward data.
 
Youri Tarshecki:
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.
Yes. So I need to take out "forward" option position from the initiation and also check tester's working mode - simple testing or optimization. So, that function should work only during simple testing and when forward is selected?