How to use enum to choose order type?

Back to topics list To post a new topic, please log in or register
avatar
273
sheriffonline 2015.11.11 09:11
 

I want to add the parameter to choose ordertype using enum or any easy funtions available!

can you share your suggetion!

OrderType
StopOrder
LimitOrder


I want to do the following. currently i use both parameter, eg: StopOrder=true ; LimitOrder=false;

If user choose StopOrder only pending order StopOrders

if user choose LimitOrder only pending order with LimitOrders.

but i would like to user could be able to choose by dropdown box?

can anyone share your idea?

avatar
1172
sxTed 2015.11.11 10:49 #
 
enum menu0 {
   menu0_0,   // Triple click on row tagged >> to access menu
};
input menu0  Note=menu0_0;
enum menu1 {
   menu1_0=OP_BUYLIMIT,  // buy limit pending order >>
   menu1_1=OP_SELLLIMIT, // sell limit pending order >>
   menu1_2=OP_BUYSTOP,   // buy stop pending order >>
   menu1_3=OP_SELLSTOP,  // sell stop pending order >>
};
input menu1 OrderType=menu1_0;

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
  Print("OrderType=",OrderType);
//---
   
//---
   return(INIT_SUCCEEDED);
  }

Back to topics list  

To add comments, please log in or register