Download MetaTrader 5

How to use enum to choose order type?

To add comments, please log in or register
Sherif Hasan
Sherif Hasan 2015.11.11 08:11 

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

can you share your suggetion!


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?

Edward Hirsch
Edward Hirsch 2015.11.11 09: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()
To add comments, please log in or register