Can't change input parameters when debugging - ever (MQL5)

 

I can't remember if I ever could change the input parameters just before starting to debug. It seems that I can when using real-time data but not when using historical data (which I always use). But it's not a big deal because I thought I could just change the value in the source and recompile. But even if I change it, it still uses the input variable values from "long ago". 

The ways I've gotten around this and change the value of the variable are:

- change the variable name 

- hard-code the variable (don't make it an input variable)

- change the name of the program, compile it and then debug that program

- uninstall and reinstall MetaTrader 5? (I haven't done this)

Why is the value not changing when I recompile? What am I forgetting or doing wrong?

 
desertjedi:

I can't remember if I ever could change the input parameters just before starting to debug. It seems that I can when using real-time data but not when using historical data (which I always use). But it's not a big deal because I thought I could just change the value in the source and recompile. But even if I change it, it still uses the input variable values from "long ago". 

The ways I've gotten around this and change the value of the variable are:

- change the variable name 

- hard-code the variable (don't make it an input variable)

- change the name of the program, compile it and then debug that program

- uninstall and reinstall MetaTrader 5? (I haven't done this)

Why is the value not changing when I recompile? What am I forgetting or doing wrong?

You mean you see nothing here?


 

When I debug, I'm looking at the Strategy Tester Visualization screen...on which there is no Inputs tab. But if I look under this window at the actual MT5 client, I see the Inputs tab. And now that I'm looking at it, I see that my debug session is using the values from the Inputs tab and not the defaults in my source.

So, I'm guessing that a debug session in MT5 is simply a strategy test similar to a backtest but with breakpoints, etc. I had never seen that mentioned in the documentation I've read about debugging in MT5.  I just figured out a little while ago it was using the values from the Inputs tab but thanks for replying - it would have gotten me to understand. 

 
desertjedi:

When I debug, I'm looking at the Strategy Tester Visualization screen...on which there is no Inputs tab. But if I look under this window at the actual MT5 client, I see the Inputs tab. And now that I'm looking at it, I see that my debug session is using the values from the Inputs tab and not the defaults in my source.

So, I'm guessing that a debug session in MT5 is simply a strategy test similar to a backtest but with breakpoints, etc. I had never seen that mentioned in the documentation I've read about debugging in MT5.  I just figured out a little while ago it was using the values from the Inputs tab but thanks for replying - it would have gotten me to understand. 

I had such a problem and as you said i changed the input parameters in sterategy tester before using debug by historical data and problem solved.