Add reloaded functionality to working bot

Created at 20 Jul 2021, 09:30
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!
WM

wmclennan77

Joined 29.06.2021

Add reloaded functionality to working bot
20 Jul 2021, 09:30


Hi all,

I have written a bot that works well enough and have a question about making the bot more complete.

What kind of code should I write in case of cTrader disconnection? The bot might eventually go on a VPS where disconnection has a low probability, but as of right now I'm running the cBot from my home internet which drops on occasion. I'm aware of Bars.Reloaded, but have no idea where to start implementation.

I would just like to know how to not make the bot crash in the event of internet disconnection.

Kind regards,


@wmclennan77
Replies

PanagiotisCharalampous
20 Jul 2021, 09:37

Hi wmclennan77,

You can use the Server object. It provides all the information you need about your connection state.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous