Position Counting code
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!
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