PositionGetDouble(POSITION_VOLUME) does not update after SL order
Hi all,
Any idea why PositionGetDouble(POSITION_VOLUME) does not update its value after being stopped by SL order ?
Sorry but your question is not clear ? If SL was reached, there is no more position.
Yes ... the SL order was reached. The next OnTick(), I was expecting the ContratosAtual=PositionGetDouble(POSITION_VOLUME) changed to 0 (zero) but instead, it remains with the same value as it was before.
So my question is do I have run any Refresh() command ?
Yes ... the SL order was reached. The next OnTick(), I was expecting the ContratosAtual=PositionGetDouble(POSITION_VOLUME) changed to 0 (zero) but instead, it remains with the same value as it was before.
So my question is do I have run any Refresh() command ?
Your PositionSelect() should return false if you don't have a position. If you don't have a position there is no point the check POSITION_VOLUME.
If your PositionSelect() returns true, and so the volume is unchanged, that means the terminal is not yet aware your position was closed.
Your PositionSelect() should return false if you don't have a position. If you don't have a position there is no point the check POSITION_VOLUME.
If your PositionSelect() returns true, and so the volume is unchanged, that means the terminal is not yet aware your position was closed.
Thank you
Hi all,
Any idea why PositionGetDouble(POSITION_VOLUME) does not update its value after being stopped by SL order ?