Download MetaTrader 5

using ENUM as input

To add comments, please log in or register
Route206
211
Route206  

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
81
stanislass  

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

Route206
211
Route206  

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

To add comments, please log in or register