Download MetaTrader 5
To add comments, please log in or register
Examine the Top MetaTrader 5 signals. Choose the best one and subscribe to it!
Route206
211
Route206 2015.11.19 14:57 

Having problems with customer set inputs.

i read: https://docs.mql4.com/basis/variables/inputvariables but i cannot get it to work.

this is what i want to do: simply create long/short as part of drop down box during input...

#property strict
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   enum position
     {
      Long=1,
      Short=-1
     };

  input position direction=1;

//---
   return(INIT_SUCCEEDED);
  }
stanislass
61
stanislass 2015.11.19 15:37  

To be paced before "OnInit()", for example extern section.

Route206
211
Route206 2015.11.19 15:41  

Thanks... of course!
have been sitting behind this desk for too long ;-) 

/
To add comments, please log in or register