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
ENUM_POSITION_TYPE
two values. and what is returned if there are no open positions?
I use the PositionType() method from the standard library.
Okay, I get it, PositionSelect() returns false, and PositionType() returns the type of the last position selected.
How do I get the total number of positions for a symbol?
PositionsTotal() returns the total number of positions for all symbols.
I need to know that there are no open positions for a symbol. How can I do this correctly?
There can only be one position per tool.
ENUM_POSITION_TYPE
two values. and what is returned if there are no open positions?
I use the PositionType() method from the standard library.
Okay, got it, PositionSelect() returns false, and PositionType() returns the type of the last position selected.
There is such a thing. It's called Fixed Chart Position
Which by default is on the left side in a corner.
Can it be set in ChartSet(Get) properties?
There is such a thing. It's called Fixed Chart Position
Which by default is on the left side in a corner.
Can it be set in ChartSet(Get) properties?
Either PositionSelect() or enumerate existing positions using PositionsTotal() and PositionGetSymbol()
That's exactly right. I only described the general approach, in response to the question about the possibility itself. ...And error handling - it is often encountered when calling one function or another. Routine, so to speak.
Look at the second method from the mentioned ones. An opinion was expressed here that it is universal in some way. The details were not mentioned.
PositionSelect() still needs to understand why it returns false. It turns out that there is no standard method to determine that there is no open position for a symbol?