Get user input for mql5 scripts
That is the natural behaviour of a script. Unlike an EA it is only executed once.
You can add inputs to be customised before your single run.
Example of a script that modifies the TP/SL:
input double InpStoploss = 0.0; //StopLoss Pips input double InpTakeProfit = 0.0; //TakeProfit Pips
Simply put "input" to be displayed in the window before it is executed.
I created a working script, but when I load it to the chart I don't get Input Window like I get loading an EA, It loads automatically with its defaults.
What should I do with it? I remember, I started learning mql5, and back then it always asked for submission with an input window.
you can add this on top
#property script_show_inputs
in case you want the confirmation window add this :
#property script_show_confirm
- www.mql5.com
I created a working script, but when I load it to the chart I don't get Input Window like I get loading an EA, It loads automatically with its defaults.
What should I do with it? I remember, I started learning mql5, and back then it always asked for submission with an input window.