and anything returns not positive, always considered failed. It is because we want to get the ticket number, not bool statement.
What do you mean by anything returns not positive? The logic behind my original coding with:
bool Buy_Ticket = OrderSend(........) > 0;
if (Buy_Ticket){
...
}
was that all successful OrderSend() should return ticket no. > 0, thus bool Buy_Ticket will be true. To my understanding, it's basically the same treatment as:
int Buy_Ticket = OrderSend(........);
if (Buy_Ticket > 0){
....
}
IMO both method stated in my previous post works the same, as supported by my test results here. However I'm still learning to how code better while working on my trading skills.
I use int to declare
int Buy_Ticket;and anything returns not positive, always considered failed. It is because we want to get the ticket number, not bool statement.I use int to declare
and anything returns not positive, always considered failed. It is because we want to get the ticket number, not bool statement.What do you mean by anything returns not positive? The logic behind my original coding with:
was that all successful OrderSend() should return ticket no. > 0, thus bool Buy_Ticket will be true. To my understanding, it's basically the same treatment as:
Is that what you're trying to say?
Yes. That one.
IMO both method stated in my previous post works the same, as supported by my test results here. However I'm still learning to how code better while working on my trading skills.