Download MetaTrader 5
To add comments, please log in or register
Ask your broker to open the official channel. Thousands of traders will read the news!
mar
1143
mar 2014.04.04 10:02 

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.

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.04.04 10:43  
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.
qjol
3243
qjol 2014.04.04 10:49  
have a look on the file: #include <Controls\ComboBox.mqh>
SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.04.04 10:53  
Let's do some codings, yeahhh... ! XD
mar
1143
mar 2014.04.04 10:58  
Wow... What the hell is ComboBox.mqh or better: how can I use this? I have never seen an mqh-File before..
qjol
3243
qjol 2014.04.04 11:05  
mar
1143
mar 2014.04.04 11:26  

I do :-)

Alain Verleyen
Moderator
28518
Alain Verleyen 2014.04.04 12:15  
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
/
To add comments, please log in or register