Nuno Costa:
My function to count open positions is not working.
EDIT: In case it isn't obvious, I want to count a given type, either buy or sell positions.
This is how I am placing the trades:
This is how I am counting the positions:
Count returns 0, regardless if I use position_type or Order_type
Saw on another post the solution posted by @Vladimir Karputov. Problem is solved! Instead of using.
m_position.Type()
I should use
m_position.PositionType()
Thanks Vladimir!

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
My function to count open positions is not working.
EDIT: In case it isn't obvious, I want to count a given type, either buy or sell positions.
This is how I am placing the trades:
This is how I am counting the positions:
Count returns 0, regardless if I use position_type or Order_type