Robot still modify close position

Created at 03 Dec 2012, 15:25
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
PH

phamvanthanh

Joined 07.10.2012

Robot still modify close position
03 Dec 2012, 15:25


Hi Support,

It seems there is something wrong with platform. The robot still modify closed position. I can't understand somehow this happens. 

 

 


@phamvanthanh
Replies

rkokerti
03 Dec 2012, 15:29

I also experienced the same thing


@rkokerti

admin
03 Dec 2012, 16:22

If you are using OnPositionClosed and if you have a global field of type Position similar to the sample robots, the global field position will need to be set to null in the OnPositionClosed event. For your convenience we will implement funtionality to do this automatically so that you do not have to worry about such issues.

 


@admin

Uche
05 Dec 2012, 10:00

you can add this code:

protected override void OnPositionClosed(Position closedPosition)

        {            

            position = null;

        


@Uche