Hello everybody,
I'm a newbie on this forum. I've just started to develop my tools for trading in Meta Trader 4.
I'd like to write a script that will prompt user for data, i.e. open a window to input data.
For example: Script that will calculate max. lot size assuming x% risk of account for given SL. Script should open a window for data input to write different risk value in % i.e 2, 2.5, 3, 5, etc, and SL value.
I was searching in help, MQL4 Book and in forum topics, but I didn't find any function to open an input data window. Is it possible in MQL4?
Till now I wrote the risk % and SL values directly in script code, compile it and run. If I want calculate diffrent risk % for different SL I need to change values in the script code, compile and run again.
But I don't like it.
Do you have any idea for such a window like in the One-ClickTrading EA added to the last version of MetaTrader4?
On top of script, write #property show_inputs. Then write the extern input
#property show_inputs extern int My_Integer = 1; extern double Double_Bubble = 2.0; extern bool Bool_Linger = True; extern string Say_Something = "Thing";
I can't seem to figure out why this is happening with with the following two lines of code? Would appreciate some help. Thanks.
input double IntTPDeviations = 1.0;
input double IntSLDeviations = 1.0;
I can't seem to figure out why this is happening with with the following two lines of code? Would appreciate some help. Thanks.
input double IntTPDeviations = 1.0;
input double IntSLDeviations = 1.0;
The problem is not in these lines. To solve the problem, it is necessary to see the whole code.
How To Ask Questions The Smart Way. (2004)
Be precise and informative about your problem
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello everybody,
I'm a newbie on this forum. I've just started to develop my tools for trading in Meta Trader 4.
I'd like to write a script that will prompt user for data, i.e. open a window to input data.
For example: Script that will calculate max. lot size assuming x% risk of account for given SL. Script should open a window for data input to write different risk value in % i.e 2, 2.5, 3, 5, etc, and SL value.
I was searching in help, MQL4 Book and in forum topics, but I didn't find any function to open an input data window. Is it possible in MQL4?
Till now I wrote the risk % and SL values directly in script code, compile it and run. If I want calculate diffrent risk % for different SL I need to change values in the script code, compile and run again.
But I don't like it.
Do you have any idea for such a window like in the One-ClickTrading EA added to the last version of MetaTrader4?