Positions.Modified event

Created at 10 Apr 2019, 02:17
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!
AN

Anka Software

Joined 06.11.2014

Positions.Modified event
10 Apr 2019, 02:17


Adding a Positions.Modified event handler, causes the robot to hang in backtester.


@Anka Software
Replies

firemyst
10 Apr 2019, 08:35

RE:

Anka Software said:

Adding a Positions.Modified event handler, causes the robot to hang in backtester.

 

Just for clarification, would you be able to post the sample of your code that adds the handler so the rest of us can see how you're doing it?

Ex:

 protected override void OnStart()
        {
            //Events
            Positions.Opened += Positions_Opened;
            Positions.Closed += Positions_Closed;
            //blah blah blah
        }

 


@firemyst

Anka Software
10 Apr 2019, 16:46

protected override void OnStart()

       {

           //Events

           Positions.Modified += OnPositionModified;

           //blah blah blah

       }

  private void OnPositionModified(PositionModifiedEventArgs args)
        {
          ..
        }


@Anka Software