Is it possible to check if ctrader is connected or not, or have action on reconnect trough c#?
Created at 23 Jul 2023, 03:25
Is it possible to check if ctrader is connected or not, or have action on reconnect trough c#?
23 Jul 2023, 03:25
Dear,
Is it possible to check if ctrader is connected or not, or have action on reconnect trough c#?
Edit: This is because the timer actions repeat indefinitely, since, in such as the below example, _interval1 doesn't get updated. I'm trying to avoid this situation if for some reason the network is not connected.
private void Timer_TimerTick()
{
if (_interval1.AddSeconds(Interval1) < Server.Time)
{ Print("Interval 1 Triggered"); _interval1 = Server.Time; }
}
source: cTrader Forum - use multiple timers and events OnTimer ()
Kind regards,
PanagiotisChar
24 Jul 2023, 06:10
Hi there,
Here you go
https://help.ctrader.com/ctrader-automate/references/Application/IServer/?h=isconn#isconnected
Aieden Technologies
Need help? Join us on Telegram
@PanagiotisChar