Passing values from one cBot to another.
Passing values from one cBot to another.
25 Aug 2020, 09:39
I was wondering if anyone knows how to pass data between two or more running cBots.
Eg. One cBot running on the AUDUSD symbol passing data to another cBot on NZDUSD to help in triggering an event.
Thanks.
Replies
patrock333
25 Aug 2020, 10:16
RE:
Thanks for the quick reply Panagiotis.
I thought about writing to file but then the cbots would have to check the file constantly and I am concerned about time delays.
I wasn't aware of pipes for C#. I will read up on it.
@patrock333
patrock333
29 Aug 2020, 05:28
RE: Using pipes.
PanagiotisCharalampous said:
Hi patrock333,
There are several ways you could achieve this like writing on a file or using pipes. You should select the best approach based on your own needs.
Best Regards,
Panagiotis
Hi Panagiotis.
Does cTrader impose any limitations on communication between cBots running on different accounts: 1) on the same computer running two instances of cTrader, or 2) on two different computers? I am trying to separate concerns for each cBot.
@patrock333
PanagiotisCharalampous
31 Aug 2020, 08:27
Hi patrock333,
No we do not impose any limitations.
Best Regards,
Panagiotis
@PanagiotisCharalampous
firemyst
31 Aug 2020, 16:23
RE:
patrock333 said:
I was wondering if anyone knows how to pass data between two or more running cBots.
Eg. One cBot running on the AUDUSD symbol passing data to another cBot on NZDUSD to help in triggering an event.
Thanks.
Static variables would work wonders for you.
Static variables are shared across multiple instances of the same indicator on different charts, so hopefully they would also be shared between bot instances of the same bot.
However, they probably won't be shared between different bots.
It'll save the hassle and slowness of reading/writing files to/from the file system.
@firemyst
PanagiotisCharalampous
25 Aug 2020, 10:00
Hi patrock333,
There are several ways you could achieve this like writing on a file or using pipes. You should select the best approach based on your own needs.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous