Script: OrderType as option in a pulldown menu possible?

 

Hey coders,

I want to do an order script. Right now I use the numbers 0-5 in the options to determine the type of order. Is it somehow possible to use a pulldown menu in the options from that I can choose OP_BUY, OP_SELL ... ? Sometimes the numbers are confusing because I not always know in a second what for example number 3 or 4 is.

 
mar:

Hey coders,

I want to do an order script. Right now I use the numbers 0-5 in the options to determine the type of order. Is it somehow possible to use a pulldown menu in the options from that I can choose OP_BUY, OP_SELL ... ? Sometimes the numbers are confusing because I not always know in a second what for example number 3 or 4 is.


Use OP_BUY / OP_SELL / etc instead of numbers.
 
have a look on the file: #include <Controls\ComboBox.mqh>
 
Let's do some codings, yeahhh... ! XD
 
Wow... What the hell is ComboBox.mqh or better: how can I use this? I have never seen an mqh-File before..
 
 

I do :-)

 
mar:

Hey coders,

I want to do an order script. Right now I use the numbers 0-5 in the options to determine the type of order. Is it somehow possible to use a pulldown menu in the options from that I can choose OP_BUY, OP_SELL ... ? Sometimes the numbers are confusing because I not always know in a second what for example number 3 or 4 is.

Use something like :

enum TYPE_ORDER
  {
   BUY,
   SELL,
   BUYLIMIT,
   SELLLIMIT,
   BUYSTOP,
   SELLSTOP
  };

#property show_inputs

input TYPE_ORDER operation = BUY;      // Order type