Issue with input parameters

 
Hello dear Dev.

I noticed something with my platform, and I wonder if someone has an explanation. 

After dropping an EA on the chart, you are asked to fill up the input parameters. 

Later on you can modify the value of input by following one of the two methods :

1. Re-attach the EA to the chart 
2. Double clicking on the blue hat (top tight corner of the chart, next to the EA name) 

The issue is the following : sometimes, when using the second method the change aren't apply. I know it because when using the EA afterwards, it react as if I didn't change the input values

So I'm forced to delete, then re-attach the EA(forced to use fisrt method) , in order to apply change that would be effective. 

The fisrt method is time consuming and doesn't allow for quick change. 

Do someone know why do the second method doesn't work sometimes? 

EDIT 1 : I noticed that in only happen with "input double" data 
 
Yerim Rayann Gon Diarra: Do someone know why do the second method doesn't work sometimes?

We can only guess since you haven't provided any code. You have global or static variables that you do not reset in OnInit.

Those are not assignments; they are initialization of a common (globally declared), or static variable(s) with a constant. They work exactly the same way in MT4/MT5/C/C++.

  1. They are initialized once on program load.

  2. They don't update unless you assign to them.

  3. In C/C++ you can only initialize them with constants, and they default to zero. In MTx you should only initialize them with constants. There is no default in MT5, or MT4 with strict (which you should always use).

    MT4/MT5 actually compiles with non-constants, but the order that they are initialized is unspecified and Don't try to use any price (or indicator) or server related functions in OnInit (or on load or in OnTimer before you've received a tick), as there may be no connection/chart yet:

    1. Terminal starts.
    2. Indicators/EAs are loaded. Static and globally declared variables are initialized. (Do not depend on a specific order.)
    3. OnInit is called.
    4. For indicators OnCalculate is called with any existing history.
    5. Human may have to enter password, connection to server begins.
    6. New history is received, OnCalculate called again.
    7. A new tick is received, OnCalculate/OnTick is called. Now TickValue, TimeCurrent, account information and prices are valid.
 
William Roeder #:

We can only guess since you haven't provided any code. You have global or static variables that you do not reset in OnInit.

Indeed there are global variables, there are also input type

But you answer confuse me, I don't get it 
Can you please give me a more clear explanation 
Sorry for bothering you 
Thanks you 
 
Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 
Yerim Rayann Gon Diarra #:
Indeed there are global variables, there are also input type

But you answer confuse me, I don't get it 
Can you please give me a more clear explanation 
Sorry for bothering you 
Thanks you 

then do as you were advised to do, since none of us are mind readers: post the code so we might be able to analyse it and give you a hint as to what is causing the issue. Otherwise we can only make guesses which just wastes all our time.