tenlau:
Hello,
I try to code an simple EA
I observe that if an open position is closed by StopLoss "touching" PositionSelect() do not turn from true to false.
Also I observe that if position is closed by CTrade trade trade.PositionClose() than PositionSelect() do turn from true to false.
Please explain why this happens and how can be fixed (I mean to be able toset PositionSelect() to false when position is closed by StopLoss "touching")
Thanks in advance for help !
Can you post some code showing your issue ?
This is probably related to this My EA does a double entry

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
Hello,
I try to code an simple EA
I observe that if an open position is closed by StopLoss "touching" PositionSelect() do not turn from true to false.
Also I observe that if position is closed by CTrade trade trade.PositionClose() than PositionSelect() do turn from true to false.
Please explain why this happens and how can be fixed (I mean to be able toset PositionSelect() to false when position is closed by StopLoss "touching")
Thanks in advance for help !