u can do something like this
//+------------------------------------------------------------------+ //| user_selection.mq4 | //| Copyright © 2010, MetaQuotes Software Corp. | //+------------------------------------------------------------------+ #property copyright "Copyright © 2010, MetaQuotes Software Corp." #property link "http://www.metaquotes.net" #include <WinUser32.mqh> bool something; //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { //---- int ret=MessageBox("Select The value for something \n\nOK = true \nCANCEL = false \n \n\"NOTE\" Pressing ESC Or X = false", "Question", MB_OKCANCEL|MB_ICONQUESTION); if (ret == IDOK) { something = true; } if (ret == IDCANCEL) { something = false; } //---- return(0); } //+------------------------------------------------------------------+ //| expert deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { //---- if (something) //do x if (!something) //do y //---- return(0); } //+------------------------------------------------------------------+
yes it can be a way to make something with interactivity...but i explained myself wrong : i just want to be able to browse in a list of things before running a backtest, so this would be trough an ext variable, in the ea setup menu...
maybe it will be clearer like this :
there are ext variables like
ext bool blabla = true;
and you can choose true or false...in a scrolling list. this is the scrolling list i want to customize!
so i would like something like
ext string currency = "eurusd" OR "eurjpy" OR "eurgbp"
leading to a list of possibilities before running a backtest!
FWIW I use the following method for picking which price to use. Could be changed to Pair1EURUSD_2EURJPY_3EURGBP
extern int Price_0COHLMedTypWgt6=PRICE_TYPICAL;
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hi!
when you use extern variables, its often to input a number or to set a bool true or false. in my case, id prefer to let the user choose between some options, like a menu. so i would like to define the different possibilities he'll be able to choose, like a string that allows only 3 possibilities. i've never saw anything like this in the doc or in any mq4 file, but i suppose its not hard to set up for a skilled mql developper...so, could anyone help?