**Fr4nz78:**

I've 3 different input parameters : P1 [1..10], P2 [1..10] and P3 [3..10]. The constraints are the following : P1 < P2 < P3.

Some potential solutions should be discarded right away when the constraints are not respected. For instance when P1 = 2, P2 = 1 and P3 = 4.

Is there a way to accomplish such thing with MetaTrader optimization ? (eventually using OnTesterPass function ?)

I'm losing a lot of time during my optimization because of that and I'd like to find a way to discard or skip directly the potential solution when the constraints are not respected.

Thanks for your help

Not possible inside MetaTrader.

You can build .set files with the exact parameters you need then call MT using a config file from the command line to run the tester.

See section "Running with a Custom Configuration File" sub-section "[Tester]."

https://www.metatrader5.com/en/terminal/help/start_advanced/start

- www.metatrader5.com

I've 3 different input parameters : P1 [1..10], P2 [1..10] and P3 [3..10]. The constraints are the following : P1 < P2 < P3.

Some potential solutions should be discarded right away when the constraints are not respected. For instance when P1 = 2, P2 = 1 and P3 = 4.

Is there a way to accomplish such thing with MetaTrader optimization ? (eventually using OnTesterPass function ?)

I'm losing a lot of time during my optimization because of that and I'd like to find a way to discard or skip directly the potential solution when the constraints are not respected.

Thanks for your help