But sometimes it is missing some symbols on the position.
It's difficult to know what you are talking about ?
The problem was solved when I changed
These 2 statements are doing very different things.
Please, read the documentation carefully.
m_position.Symbol() : Simply gets the name of position symbol.
PositionGetSymbol() : Returns the symbol corresponding to the open position and automatically selects the position for further working with it using functions PositionGetDouble, PositionGetInteger, PositionGetString.
Please, read the documentation carefully.
m_position.Symbol() : Simply gets the name of position symbol.
PositionGetSymbol() : Returns the symbol corresponding to the open position and automatically selects the position for further working with it using functions PositionGetDouble, PositionGetInteger, PositionGetString.
How about
PositionGetString(POSITION_SYMBOL);
It makes me confused.
With mql4, only need OrderSymbol()
Everything you need to know is here:
Orders, Positions and Deals in MetaTrader 5
MetaQuotes, 2011.02.01 16:13
Creating a robust trading robot cannot be done without an understanding of the mechanisms of the MetaTrader 5 trading system. The client terminal receives the information about the positions, orders, and deals from the trading server. To handle this data properly using the MQL5, it's necessary to have a good understanding of the interaction between the MQL5-program and the client terminal.![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all,
I used this code for get the position information:
But sometimes it is missing some symbols on the position. I don't know why?
The problem was solved when I changed
m_position.Symbol()
to
PositionGetSymbol(i)
Is there a bug?