using ENUM as input

Back to topics list To post a new topic, please log in or register
avatar
63
Route206 2015.11.19 15: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);
  }
avatar
28
stanislass 2015.11.19 16:37 #
 

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

 

avatar
63
Route206 2015.11.19 16:41 #
 

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

Back to topics list  

To add comments, please log in or register