- Kid68: But return a value is SL of Last Position.
You set your variable to zero and, thus, will never find a lower stop loss. You don't return the last position SL, you return zero.
double MinSLSell = DBL_MAX;
-
if(PositionSelectByTicket(PositionGetTicket(i)))
You call getTicket. That selects that position. Why are you selecting it again?
I already fix.
Thanks.

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 want find minium SL of Positions sell. I have code:
But return a value is SL of Last Position.
Help me.