How to find or select positions by label prefix ?
How to find or select positions by label prefix ?
06 Sep 2022, 08:00
I want to use Position.Find or Positions,FindAll function. Then i want to find label by prefix. For example i named my positions EURUSD_Buy EURUSD_Sell but i need to find all positions started with "EURUSD" prefix.
Replies
MongolTrader
06 Sep 2022, 08:55
RE:
PanagiotisCharalampous said:
Hi MongolTrader,
Use the below instead
Positions.Where(p => p.SymbolName == EURUSD_Buy)
Best Regards,
Panagiotis
I mean find by EURUSD prefix not full name search. It means select all positions started with "eurusd" preifx
@MongolTrader
PanagiotisCharalampous
06 Sep 2022, 09:57
Hi MongolTrader,
Then use Contains function instead
Positions.Where(p => p.SymbolName.Contains("EURUSD_Buy"))
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
06 Sep 2022, 08:23
Hi MongolTrader,
Use the below instead
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous