During the execution of the tester record values provided by the expert

 
I think it might be confusing what I'm looking for,
During the execution of the tester and the expert provides some values I would like to get these values from outside the tester and then use them, my intention is to use them in the optimization example before starting the execution of each frame of the optimization a variable has to start with different values every frame and is this possible?
 
Lip Ramos:
I think it might be confusing what I'm looking for,
During the execution of the tester and the expert provides some values I would like to get these values from outside the tester and then use them, my intention is to use them in the optimization example before starting the execution of each frame of the optimization a variable has to start with different values every frame and is this possible?

Are you looking for a way to bridge the values from MT5 Tester to a separate optimization, not necessarily within the same EA code?

 
Oleksandr Medviediev #:

Are you looking for a way to bridge the values from MT5 Tester to a separate optimization, not necessarily within the same EA code?

"Thank you for responding, I am looking for a way to capture within the same code example: at the end of the period during which the robot is running, I wanted to somehow record a value and in a new test use that value and so on. I tried using the external global variable in the terminal but it didn't update, I tried writing to a txt file and it also didn't work."
 

Within the same code try this:

  1. Declare a custom variable to store the value to capture.
  2. At the end of the EA/tester execution, update the value of this custom variable with the desired value.
  3. In the next test/execution access the value of this custom variable and use it as needed.

Example:

// Declare a custom variable to store the value
double captured_value = 0.0;

// EA/Tester code
void OnTick() {
    // Perform trading logic, calculations, etc.

    // At the end of the execution, update the captured_value
    captured_value = someValueCalculatedDuringExecution;
}

// In the next test/execution
void OnInit() {
    // Access the previously captured value and use it
    double previous_value = captured_value;
    // Use previous_value in your logic
}

Just curious, what's your strategy and what are you aiming to achieve.
 
Alexandre Medviediev # :

Dentro do mesmo código tente isto:

  1. Declare uma variável personalizada para armazenar ou valor a ser capturado.
  2. Ao final da execução do EA/testador, atualize o valor desta variável personalizada com o valor desejado.
  3. No próximo teste/execução acesse o valor desta variável customizada e utilize-a conforme necessário.

Exemplo:


Só por curiosidade, qual é a sua estratégia e o que você pretende alcançar.
“Upon further consideration, I think my idea is irrelevant because I was wanting to use it in the optimization of the tester, foregoing the use of input selection to optimize parameters and modify the initial values of variables within the code during optimizations."