Handle OnClosedPosition and SymbolInfo

Created at 13 Aug 2024, 14:43
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!
ST

stevenrm

Joined 16.04.2024

Handle OnClosedPosition and SymbolInfo
13 Aug 2024, 14:43


Hello everyone, I'm encountering an error when trying to handle a closed position. Can anyone help, please? Thank you in advance.

 

Member 'AdaptiveTrendBot.OnPositionClosed(Position)' overrides obsolete member 'Robot.OnPositionClosed(Position)'. Add the Obsolete attribute to 'AdaptiveTrendBot.OnPositionClosed(Position)'.

'SymbolInfo' is obsolete: 'Use 'Symbol' instead'

@stevenrm
Replies

PanagiotisCharalampous
13 Aug 2024, 15:54

Hi there,

As per the message, you are overriding an obsolete member. You should use the Position.Closed event instead.

Best regards,

Panagiotis


@PanagiotisCharalampous