How do I write MT4 scripts that accept user input?

 

Hello,

Perhaps this question has already been answered, if so, please refer me to the forum post or community article that explains how to do it.

I want to write MT4 scripts that allow me to enter input before the script is executed.  Right now I am using EAs to perform this function.

Thanks in advance for any help that can be offered. 

 

Add the following line at the start of the Script . . .

#property show_inputs
 
RaptorUK:

Add the following line at the start of the Script . . .

 


Before the start() of the script, https://www.mql5.com/en/forum/141830

 

Thanks!  Such a simple solution, but I couldn't find it in the documentation.

 
scratchman:

Thanks!  Such a simple solution, but I couldn't find it in the documentation.

https://docs.mql4.com/basis/preprosessor/compilation
 

Thanks for the reference - I would never have thought to look at the preprocessor commands.