You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Why write ENUM_POSITION_TYPE before PositionGetInteger? After all, you believe that the PositionGetInteger function with the identifier POSITION_TYPE already returns the type ENUM_POSITION_TYPE.
No it doesn't, the compiler generates a type mismatch warning
Read the message you're replying to carefully, and in general, try to understand what you're talking about first.
Read carefully the message to which you are responding, and in general, first try to understand what the conversation is about.
Why waste your time getting into a conversation that is about nothing. Why do you sit in this thread and troll Michael.
You don't like his programming style or his presentation style. Why don't you open your own training thread
and show me your programming and presentation style.
Why waste your time getting into a conversation that is about nothing. Why do you sit in this thread and troll Michael.
You don't like his programming style or his presentation style. Why don't you open your own training thread
and show him your programming and presentation style.
If you did, you shouldn't be writing here right now... and argue. Before you write and argue, understand what you're talking about. If you do not want to read and understand, do not get involved.
Also, trolling here Michael (trying, but failing). He is wiggling, slipping, twisting, back and forth. And you are Mikhail's defender?
A stupid and empty argument is going on and nothing more.
Why are you sitting in this thread and trolling Michael.
No trolling. I'm going to be a cap. Because Mikhail says that the correct code is wrong.
It's not about correctness, it's about style.
I've already written:
But I think PositionGetInteger() always returns a value of type LONG, and it doesn't matter what was "inside" INTRGER or LONG.
The developers did it to avoid writing two functions.
That's why to getthe position's type(which is INTEGER) we should do it in the way I've written:
It's silly to do it like this:
long type =PositionGetInteger(POSITION_TYPE);
if (type == long(POSITION_TYPE_BUY)) - THIS IS RIGHT in its essence, but its style is totally BAD!
Because the functionreturnsENUM_POSITION_TYPE (see documentation) with the argumentPOSITION_TYPE, hence the host variable
must be of the same type.
It's not about correctness, it's about style.
I've already written:
But I think PositionGetInteger() always returns a value of type LONG, and it doesn't matter what was "inside" INTRGER or LONG.
The developers did it to avoid writing two functions.
That's why to getthe position's type(which is INTEGER) we should do it in the way I've written:
It's silly to do it like this:
long type =PositionGetInteger(POSITION_TYPE);
if (type == long(POSITION_TYPE_BUY)) - THIS IS RIGHT in its essence, but its style is totally BAD!
Because the functionreturnsENUM_POSITION_TYPE with the argumentPOSITION_TYPE, consequently the receiving variable
must be of the same type.
long and lon instead ofENUM_POSITION_TYPE andENUM_POSITION_TYPE
8 characters (which you can type with your eyes closed) instead of 36 characters (and in uppercase)! On top of that there's all sorts of information that doesn't make sense. This is not a good programming style - unnecessary writing and superfluous information.
long and lon instead ofENUM_POSITION_TYPE andENUM_POSITION_TYPE
8 characters (which you can type with your eyes closed) instead of 37 characters (and even in uppercase)! On top of that there's all sorts of information that doesn't make sense. This is not a good programming style - unnecessary writing and superfluous information.