Search in PendingOrders by Symbol and not using Symbol.Code

Created at 26 Jul 2019, 13:42
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!
AL

algodev853

Joined 26.07.2019

Search in PendingOrders by Symbol and not using Symbol.Code
26 Jul 2019, 13:42


Hi,

Is there any way to find a PendingOrder for certain symbol and not use Symbol.Code whitch is obsolete? In this case PendingOrder.Label or PendingOrder.Comment are not controlled by a cBot.

Best,

Rad


@algodev853
Replies

PanagiotisCharalampous
26 Jul 2019, 14:07

Hi Rad,

Use Symbol.Name

Best Regards,

Panagiotis


@PanagiotisCharalampous

algodev853
26 Jul 2019, 14:28 ( Updated at: 21 Dec 2023, 09:21 )

Hi Panagiotis,

I am not sure if I am missing something but for the PendingOrder there seem to be only SymbolCode property. Below you can see a picture of what I mean:

 

 

 

 

 

 

 

Best,

Rad


@algodev853

PanagiotisCharalampous
26 Jul 2019, 14:32

Hi Rad,

Here is how you should write it

var orders = PendingOrders.Where(x => x.SymbolCode == Symbol.Name);

Best Regards,

Panagiotis


@PanagiotisCharalampous

algodev853
26 Jul 2019, 14:35

Thank you, now I get it.

Best,

Rad


@algodev853