"maintenance mode / server down" several hours during trading session

Created at 17 Jul 2024, 14:45
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!
BE

bernhardCM

Joined 06.11.2023

"maintenance mode / server down" several hours during trading session
17 Jul 2024, 14:45


Hello,

 

Today, just during the day and trading sessions the cTrader Desktop, mobile App and Web App turned into maintenance mode. 

This is for a running cBot (in cTrader Desktop and I guess also the cloud was affected) not great and could result in destroying of the account balance. Of course errors could happen and the cTrader servers could get into trouble – which was probably the case, because I never saw this before, maintenance is usually in not trading times, e.g. weekends.

However, because of that I’m wondering how to handle such situations and protect the account for heavily loss.

In general I guess a StopLoss would be the best solution, unfortunately I don’t trust the StopLoss of cTrader because in Backtesting my StopLoss were once (really only 1 time) ignored and order was active over days, although it was heavily below the StopLoss on a long-position. Nevertheless to have at least a safety line, I will use StopLoss in the future, but not to work with, just as a worst case limit and hope it will be triggered if cTrader server is down.

Question:

  • Will the StopLoss be triggered when price will go below(long)/above(short), if the cTrader server is down? So will the StopLoss also handed over to the broker so that the broker will close the position?

Another issue to consider is, the cBot behaviour and it’s referenced custom indicators. On my chart I saw that the candles were refreshed and completed after connection established again. But what of the indicator-methods and cBot-methods were called is not clear. 

Questions:

  • cBots: once the connection was re-established, will the OnStart()-Method called again?
  • cBots: once the connection was re-established, will the OnTick()-Method called for each single tick of the disconnection gap which is probably now delivered?
  • cBots: once the connection was re-established, will the OnBar()-Method called for each single bar of the disconnection gap which is probably now delivered?
  • Indicators: Is there something special indicator methods (initialize?!, calculate?!) considered once the connection was re-established?
  • Could we test it in any way, maybe disconnect the local computer from the internet – should the behaviour the same? But maintenance message was probably sent by cTrader server, so I guess it’s not the same.

To make a final conclusion we should actually wait for the answers to the questions above … but I guess the cBot and indicator methods will be called, whether for ticks or bars only … so I will also ask my final questions 😊

  • How to prevent the cBot to execute orders which are based on past conditions and not valid anymore (if bot is called by history bars or ticks). Could that be prevented by a special flag? For indicators is “IsLastBar” available, which is not working for cBots. 
  • Would “IsLastBar” for indicators = “false” for all history bars and ticks after re-connection?
  • How to detect in cBots whether we just handle history bars and ticks or live bars and ticks?
  • And in general, is there any way to check in cBot automatically the connection of the server whether live, down, maintenance? If yes, we could set cBot in sleep mode until connection re-established and then it would be also needed to update/check positions, so to get notified of re-connection would be great.

 

Please apologize the long message, questions could be hopefully short with less effort answered.

 

Thank you so much!

 

Best regards,

Bernhard


@bernhardCM
Replies

canstren
17 Jul 2024, 16:54 ( Updated at: 18 Jul 2024, 05:55 )

Hello Bernhard,

This very question happened to me, I was in a trade I was just about to close when I suddenly got an Error message.. therefore I couldn't close it regardless of how many tries! Due to this I lost my whole prop firm account as my propfirm said I had breached the rules! 

So no, Ctrader doesn't have any stoploss or anything.. The only message was an error message and was like that for at least 7-8 minuter while I saw my whole account breaching the limit! 

As you said they are supposed to do the maintenance during non-trading hours but not this time and not even a warning!! 

 

CTRADER I urge you to contact me about this matter because this is not okay!

Regards Kai


@canstren

firemyst
18 Jul 2024, 02:43

A follow up question: if Spotware can send out these messages advising us maintenance is underway, how come they couldn't send users out a warning that maintenance was going to happen shortly, eg, in 30 minutes or something? 

This way users could adjust their positions take any necessary precautions they needed to like closing positions or adjusting stop losses. I find it totally unprofessional the way this ‘maintenance’ was handled yesterday.


@firemyst

PanagiotisCharalampous
18 Jul 2024, 06:27

Hi Bernhard

  • cBots: once the connection was re-established, will the OnStart()-Method called again?

No

  • cBots: once the connection was re-established, will the OnTick()-Method called for each single tick of the disconnection gap which is probably now delivered?

No, the cBot resumes from the new streamed tick

  • cBots: once the connection was re-established, will the OnBar()-Method called for each single bar of the disconnection gap which is probably now delivered?

No, the cBot resumes from the new streamed bar

  • Indicators: Is there something special indicator methods (initialize?!, calculate?!) considered once the connection was re-established?

On reconnection the indicator is reinitialized.

Best regards,

Panagiotis


@PanagiotisCharalampous

ncel01
18 Jul 2024, 07:15 ( Updated at: 18 Jul 2024, 07:22 )

I believe this was not an usual maintenance procedure but rather an “emergency”.

As far as I've noticed, scheduled maintenances only take place on weekends (for obvious reasons).


@ncel01

bernhardCM
18 Jul 2024, 07:38

RE: "maintenance mode / server down" several hours during trading session

PanagiotisCharalampous said: 

Hi Bernhard

  • cBots: once the connection was re-established, will the OnStart()-Method called again?

No

  • cBots: once the connection was re-established, will the OnTick()-Method called for each single tick of the disconnection gap which is probably now delivered?

No, the cBot resumes from the new streamed tick

  • cBots: once the connection was re-established, will the OnBar()-Method called for each single bar of the disconnection gap which is probably now delivered?

No, the cBot resumes from the new streamed bar

  • Indicators: Is there something special indicator methods (initialize?!, calculate?!) considered once the connection was re-established?

On reconnection the indicator is reinitialized.

Best regards,

Panagiotis

Hi Panagotis,

thanks for your reply! Information about further processing after re-connection seems to be clear.

How about?

  • Will the StopLoss (or Trailing StopLoss) be triggered when price will go below(long)/above(short), if the cTrader server is down? So will the StopLoss also handed over to the broker so that the broker will close the position?
  • Is there any way to check in cBot automatically the connection of the server whether live, down, maintenance? To get notified after re-connection would be also great.

With these information I would be fully satisfied :-)

Thank you so much!

Best regards,

Bernhard


@bernhardCM

bernhardCM
18 Jul 2024, 07:38

RE: "maintenance mode / server down" several hours during trading session

Hi Panagotis,

thanks for your reply! Information about further processing after re-connection seems to be clear.

How about?

  • Will the StopLoss (or Trailing StopLoss) be triggered when price will go below(long)/above(short), if the cTrader server is down? So will the StopLoss also handed over to the broker so that the broker will close the position?
  • Is there any way to check in cBot automatically the connection of the server whether live, down, maintenance? To get notified after re-connection would be also great.

With these information I would be fully satisfied :-)

Thank you so much!

Best regards,

Bernhard


@bernhardCM

bernhardCM
18 Jul 2024, 07:38

RE: "maintenance mode / server down" several hours during trading session

Hi Panagotis,

thanks for your reply! Information about further processing after re-connection seems to be clear.

How about?

  • Will the StopLoss (or Trailing StopLoss) be triggered when price will go below(long)/above(short), if the cTrader server is down? So will the StopLoss also handed over to the broker so that the broker will close the position?
  • Is there any way to check in cBot automatically the connection of the server whether live, down, maintenance? To get notified after re-connection would be also great.

With these information I would be fully satisfied :-)

Thank you so much!

Best regards,

Bernhard


@bernhardCM

bernhardCM
18 Jul 2024, 07:38

RE: "maintenance mode / server down" several hours during trading session

Hi Panagotis,

thanks for your reply! Information about further processing after re-connection seems to be clear.

How about?

  • Will the StopLoss (or Trailing StopLoss) be triggered when price will go below(long)/above(short), if the cTrader server is down? So will the StopLoss also handed over to the broker so that the broker will close the position?
  • Is there any way to check in cBot automatically the connection of the server whether live, down, maintenance? To get notified after re-connection would be also great.

With these information I would be fully satisfied :-)

Thank you so much!

Best regards,

Bernhard


@bernhardCM

bernhardCM
18 Jul 2024, 07:38

RE: "maintenance mode / server down" several hours during trading session

Hi Panagotis,

thanks for your reply! Information about further processing after re-connection seems to be clear.

How about?

  • Will the StopLoss (or Trailing StopLoss) be triggered when price will go below(long)/above(short), if the cTrader server is down? So will the StopLoss also handed over to the broker so that the broker will close the position?
  • Is there any way to check in cBot automatically the connection of the server whether live, down, maintenance? To get notified after re-connection would be also great.

With these information I would be fully satisfied :-)

Thank you so much!

Best regards,

Bernhard


@bernhardCM

bernhardCM
18 Jul 2024, 07:38

RE: "maintenance mode / server down" several hours during trading session

Hi Panagotis,

thanks for your reply! Information about further processing after re-connection seems to be clear.

How about?

  • Will the StopLoss (or Trailing StopLoss) be triggered when price will go below(long)/above(short), if the cTrader server is down? So will the StopLoss also handed over to the broker so that the broker will close the position?
  • Is there any way to check in cBot automatically the connection of the server whether live, down, maintenance? To get notified after re-connection would be also great.

With these information I would be fully satisfied :-)

Thank you so much!

Best regards,

Bernhard


@bernhardCM

bernhardCM
18 Jul 2024, 07:38

RE: "maintenance mode / server down" several hours during trading session

Hi Panagotis,

thanks for your reply! Information about further processing after re-connection seems to be clear.

How about?

  • Will the StopLoss (or Trailing StopLoss) be triggered when price will go below(long)/above(short), if the cTrader server is down? So will the StopLoss also handed over to the broker so that the broker will close the position?
  • Is there any way to check in cBot automatically the connection of the server whether live, down, maintenance? To get notified after re-connection would be also great.

With these information I would be fully satisfied :-)

Thank you so much!

Best regards,

Bernhard


@bernhardCM

bernhardCM
18 Jul 2024, 07:40

sorry ...

reply button gave me no response that message was sent, please ignore double posts :-(


@bernhardCM

PanagiotisCharalampous
18 Jul 2024, 08:54

RE: RE: "maintenance mode / server down" several hours during trading session

bernhardCM said: 

Hi Panagotis,

thanks for your reply! Information about further processing after re-connection seems to be clear.

How about?

  • Will the StopLoss (or Trailing StopLoss) be triggered when price will go below(long)/above(short), if the cTrader server is down? So will the StopLoss also handed over to the broker so that the broker will close the position?
  • Is there any way to check in cBot automatically the connection of the server whether live, down, maintenance? To get notified after re-connection would be also great.

With these information I would be fully satisfied :-)

Thank you so much!

Best regards,

Bernhard

Hi again,

Will the StopLoss (or Trailing StopLoss) be triggered when price will go below(long)/above(short), if the cTrader server is down? So will the StopLoss also handed over to the broker so that the broker will close the position?

No, if the server is not working, there is nothing to process it.

Is there any way to check in cBot automatically the connection of the server whether live, down, maintenance? To get notified after re-connection would be also great.

Use Server.IsConnected

Best regards,

Panagiotis


@PanagiotisCharalampous