How to reach the working instances of the bot(s) from the indicator?

Created at 16 Dec 2021, 17:33
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!
BO

boris_k

Joined 14.12.2021

How to reach the working instances of the bot(s) from the indicator?
16 Dec 2021, 17:33


Hello,
The bot class has a public static member. Assume it is a counter the bot increases from time to time.
The only instance of the bot is working for simplicity.

I can add the reference to the bot assembly to the indicator of course.

How to access the instance of this counter from the indicator on a different chart?

It is possible to create the shared file in the memory, of course. The question is about accessing of the instance of the bot from the indicator on the different chart.

Regards,


 


@boris_k
Replies

amusleh
17 Dec 2021, 09:20

Hi,

No, you can't access a cBot from another indicator running on another chart.

But you can communicate with a cBot and indicator running on two different charts via .NET named pipe.

The .NET named pipe is the right solution for your problem, but you have other options too:

  • Local TCP client/server connection
  • Using a file

@amusleh

boris_k
17 Dec 2021, 10:43

RE:

Thank you for the answer,amusleh!
Are you from the cTrader support team?
 

 


@boris_k

amusleh
20 Dec 2021, 09:28

RE: RE:

boris_k said:

Thank you for the answer,amusleh!
Are you from the cTrader support team?
 

 

Hi,

Yes, I'm from Spotware support.


@amusleh

boris_k
21 Dec 2021, 12:16

RE: RE: RE:

Thank you!

 

 


@boris_k