Multiple instance At same time running ..

Created at 18 Sep 2022, 09:09
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!
DI

dilshandimuthu

Joined 18.09.2022

Multiple instance At same time running ..
18 Sep 2022, 09:09


How can we change the code c# to  add same cbot to mumultiple intance Same time ???? 

Please help me...


@dilshandimuthu
Replies

PanagiotisCharalampous
19 Sep 2022, 12:39

Hi dilshandimuthu,

You need to be more specific with your question. Which exact code do you want to change?

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

dilshandimuthu
20 Sep 2022, 22:02 ( Updated at: 20 Sep 2022, 22:04 )

RE: I want to calculate Sum(NetProfit) by SymbolName from All 'Running and Closed (Historical ) Trades . Please tell me how to productive code this

RE: I want to calculate Sum(NetProfit)    by SymbolName     from All   'Running and Closed (Historical ) Trades . Please tell me how to productive code this

 

 


@dilshandimuthu

PanagiotisCharalampous
21 Sep 2022, 09:44

Hi dilshandimuthu,

Try the below

var netProfit = Positions.Where(p => p.SymbolName == SymbolName).Sum(p => p.NetProfit) +  History.Where(h => h.SymbolName == SymbolName).Sum(h => h.NetProfit);

Best Regards,

Panagiotis 

Join us onTelegram andFacebook


@PanagiotisCharalampous