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
I'm trying to find out the value of one lot with SymbolInfoDouble(Symbol(),SYMBOL_MARGIN_INITIAL),but the result is =0.Can you tell me what's wrong?
https://www.mql5.com/ru/forum/1111/page95#comment_14665
https://www.mql5.com/ru/forum/1111/page95#comment_14665
Good day! I am trying to make a distinction for a position - buy or sell. I am writing it this way. With what should it be compared? I do not see it in the help. There it really is not written, it is not false and True, it is some ENUM_POSITION_TYPE, I click on it and the link leads to the same table.
There is a table at the very bottom of the page
compare with
POSITION_TYPE_BUY for BUY and
POSITION_TYPE_SELL for SELL
Excuse me, let's say, a few lines above, I have an order selected, not a position. Here I use the PositionGetDouble function, what will happen? What will the function report, and will it report anything?
The function will give out something, but there is no guarantee, before using the PositionGetDouble function you should use PositionSelect(symbol)
if it hasn't been called before.
It looks like moving the cursor to the right line. If the cursor is already on the correct line (the situation when the PositionSelect(symbol) function was called earlier in the code and returned true), one can use the PositionGetXXX or PositionSetXXX functions immediately; if the cursor is on another line, it needs to be positioned first.
THANK YOU!!!