What does the name of the parameter cmd, in the Mql4 OrderSend function, means? - page 2

 
Roberto Jacobs:

cmd is command for trade operation OP_BUY or OP_SELL or others.

Finally someone understood my question! Thanks so much! "command" was the answer. 
 
amando:

Dont make your problem ours, read the manuel

Why don't you try to be more patient and educated with people? That's really a problem you have that you shouldn't bring to this forum!
 
joelanio: Why don't you try to be more patient and educated with people? That's really a problem you have that you shouldn't bring to this forum!
Why didn't you click on the link provided? You would have read that it is “trade operation OP_BUY or OP_SELL or others.” All Reberto did was quote the documentation for you. You wasted many peoples time because of your laziness. Why should we be patient with that.
 
William Roeder:
Why didn't you click on the link provided? You would have read that it is “trade operation OP_BUY or OP_SELL or others.” All Reberto did was quote the documentation for you. You wasted many peoples time because of your laziness. Why should we be patient with that.

Oh my goodness you keep not understanding what I asked lol. I think it's not me who is lazy.

 
joelanio:
Finally someone understood my question! Thanks so much! "command" was the answer. 

Maybe cmd is short for command, maybe not.

Is command any more meaningful than cmd?

No.

If you don't know how to use OrderSend(), you will still have to look down to the same line in the documentation to see what command means.

If you see a function

double GetValue(int x)
{
 return(High[x]);
}

Would you agonise over what x means?

I hope not!

 
Keith Watford:

Maybe cmd is short for command, maybe not.

Is command any more meaningful than cmd?

No.

If you don't know how to use OrderSend(), you will still have to look down to the same line in the documentation to see what command means.

If you see a function

Would you agonise over what x means?

I hope not!

Well, if you say that cmd maybe not be a short for command, the question remains, if someone knows it, please answer. I just want that you know that i know how to use the OrderSend() function and i know what the cmd parameters means (it never was my question).

And Yes, I would agonise about the meaning of the x! You know why? I am a programmer and i try to be a good one. In the university, my good teachers tought us that the name of the variables (and functions) ALWAYS has to mean something that is related to what it represents. That's the standards and it is used in all programming languages, including mql4. If it's not important for you and the others here, that's ok. you can go to the next thread of the forum. 

 

FYI I am a great believer in using meaningful variable names.

I just used this as an example, I would never use a function like this

double GetValue(int x)
{
 return(High[x]);
}

Why would anyone obsess about what x means when it is totally obvious from the body of the code?

You have totally missed my point. If cmd IS actually short for command, how does that help you? Command is no more meaningful than cmd, so you still have to read the documentation to know what it is.

joelanio:

Well, if you say that cmd maybe not be a short for command, the question remains, if someone knows it, please answer. 

What difference does it make? You have been told that the answer is in the documentation

  int      cmd,                 // operation 

and there it is, it means operation.

Then of course, this will beg another question, "What does operation mean?"

Cast your eyes down a whole 2 lines and there it is

OrderSend

cmd

[in]  Operation type. It can be any of the Trade operation enumeration.


Oh No! What's a trade operation?

This is getting tiresome now, there's a link to click on. But I click on the link and all my questions are answered.

joelanio: I just want that you know that i know how to use the OrderSend() function and i know what the cmd parameters means (it never was my question).

Yes, it was your question!

joelanio:
i would like to know what de name of the parameter cmd means. Can you help?

Seems that this has turned out to be a troll topic.

 
Keith Watford:

FYI I am a great believer in using meaningful variable names.

I just used this as an example, I would never use a function like this

Why would anyone obsess about what x means when it is totally obvious from the body of the code?

You have totally missed my point. If cmd IS actually short for command, how does that help you? Command is no more meaningful than cmd, so you still have to read the documentation to know what it is.

What difference does it make? You have been told that the answer is in the documentation

and there it is, it means operation.

Then of course, this will beg another question, "What does operation mean?"

Cast your eyes down a whole 2 lines and there it is

Oh No! What's a trade operation?

This is getting tiresome now, there's a link to click on. But I click on the link and all my questions are answered.

Yes, it was your question!

Seems that this has turned out to be a troll topic

For me, "what this parameter mean" is different of "what the name of this parameter means". If it wasn't clearly in the title, i explained it later and i don't know why you are making it a big deal. The documentation doesn't answer my question and that's it. 

int  OrderSend(
   string   symbol,              // symbol
   int      cmd,                 // operation
   double   volume,              // volume
   double   price,               // price
   int      slippage,            // slippage
   double   stoploss,            // stop loss
   double   takeprofit,          // take profit
   string   comment=NULL,        // comment
   int      magic=0,             // magic number
   datetime expiration=0,        // pending order expiration
   color    arrow_color=clrNONE  // color
   );

If you look better to the names of the parameters of the function, you will see that they are exacly the same of what they represent. Except the parameter cmd. So it's totally ok if one of my students ask me why they didn't simply put the word "operation" there, instead of "cmd". In this context (nomenclature) i can't answer that "cmd" means "operation". If i do it, the curious student will say "I know that it's the operation, but what the word 'cmd' is doing there?".

 
What a pointless and pedantic topic.
Reason: