Topics
Replies

firemyst
04 Sep 2024, 09:23

RE: RE: RE: RE: RE: RE: RE: When a bot was "unexpectedly terminated", cTrader shows the bot as still running

PanagiotisCharalampous said: 

firemyst said: 

PanagiotisCharalampous said: 

 

Hi firemyst,

It seems we have not received this email. Can you please resend it to community@ctrader.com?

Best regards,

Panagiotis

Resent as requested. PLease let me know if you received it. If not, I might have to send separate individual emails with all the info as I wonder if your email system might be blocking it or sending it to spam for some reason.

Hi firemyst,

Try my personal one as well pcharalampous@spotware.com

Best regards,

Panagiotis

 

Just wanting to confirm you've received the messages I've sent? If not, I think Spotware's email system is blocking them for some reason because all my initial messages got through to the Community team - obviously since they asked for the VPS' details to check out the issue.

 

Thank you

 


@firemyst

firemyst
03 Sep 2024, 11:47 ( Updated at: 03 Sep 2024, 12:24 )

RE: RE: RE: RE: RE: RE: RE: When a bot was "unexpectedly terminated", cTrader shows the bot as still running

PanagiotisCharalampous said: 

firemyst said: 

PanagiotisCharalampous said: 

 

Hi firemyst,

It seems we have not received this email. Can you please resend it to community@ctrader.com?

Best regards,

Panagiotis

Resent as requested. PLease let me know if you received it. If not, I might have to send separate individual emails with all the info as I wonder if your email system might be blocking it or sending it to spam for some reason.

Hi firemyst,

Try my personal one as well pcharalampous@spotware.com

Best regards,

Panagiotis

 

Done.

I've also sent a separate message with the email as a screen capture in case it has been filtered somewhere based on the text.

EDIT:

I just sent you a link too to the private YouTube video I uploaded show casing the issue.

 


@firemyst

firemyst
03 Sep 2024, 09:22 ( Updated at: 03 Sep 2024, 09:23 )

RE: RE: RE: RE: RE: When a bot was "unexpectedly terminated", cTrader shows the bot as still running

PanagiotisCharalampous said: 

 

Hi firemyst,

It seems we have not received this email. Can you please resend it to community@ctrader.com?

Best regards,

Panagiotis

Resent as requested. PLease let me know if you received it. If not, I might have to send separate individual emails with all the info as I wonder if your email system might be blocking it or sending it to spam for some reason.


@firemyst

firemyst
03 Sep 2024, 06:22

RE: RE: RE: When a bot was "unexpectedly terminated", cTrader shows the bot as still running

PanagiotisCharalampous said: 

firemyst said: 

PanagiotisCharalampous said: 

Hi firemyst,

Can we have the cBot that reproduces this problem?

Best regards,

Panagiotis

Any updates on this?

  1. I provided a private video link on YouTube demonstrating the issue;
  2. I provided access details to my VPS so the team can see it first hand.
  3. I provided .algo file and source code that reproduces the issue on the VPS
  4. I've provided plenty of details in this thread

Thank you.

Hi firemyst,

We were not able to reproduce this. You said that you will provide access to your VPS but we have not received anything yet.

Best regards,

Panagiotis

I sent the email last week:


@firemyst

firemyst
02 Sep 2024, 23:51

RE: When a bot was "unexpectedly terminated", cTrader shows the bot as still running

PanagiotisCharalampous said: 

Hi firemyst,

Can we have the cBot that reproduces this problem?

Best regards,

Panagiotis

Any updates on this?

  1. I provided a private video link on YouTube demonstrating the issue;
  2. I provided access details to my VPS so the team can see it first hand.
  3. I provided .algo file and source code that reproduces the issue on the VPS
  4. I've provided plenty of details in this thread

Thank you.


@firemyst

firemyst
30 Aug 2024, 01:01 ( Updated at: 30 Aug 2024, 05:10 )

RE: Bot crash trubleshot

PanagiotisCharalampous said: 

Hi there,

Share your cBot code and send us some troubleshooting information the next time this happens. Please paste a link to this discussion inside the text box before you submit it.

Best regards,

Panagiotis
 

HI @PanagiotisCharampous:

This is another thread where I'm clearly subscribed, but have received no email notifications of any replies again.

Screen capture showing I'm subscribed:

Before you say anything, there are no emails in any spam/junk folder either.

There's definitely an issue here. 

I've noticed so far on all the threads where this has happened, it has been on those where my posts were awaiting moderation before being posted.

 


@firemyst

firemyst
29 Aug 2024, 01:50 ( Updated at: 29 Aug 2024, 05:15 )

Okay. And? Without providing a screen capture showing your attempted orders or the results, I'm not sure how you're expecting anyone to be able to further assist you?


@firemyst

firemyst
29 Aug 2024, 01:49 ( Updated at: 29 Aug 2024, 05:15 )

It would be nice, but right now I don't believe there is any such functionality – it's a manual process.


@firemyst

firemyst
29 Aug 2024, 01:45 ( Updated at: 29 Aug 2024, 05:15 )

See this thread as well, as I'm having similar issues that gives the same error, and am hoping Spotware is actually investigating it:

https://ctrader.com/forum/ctrader-algo/44559/#post-112763

 


@firemyst

firemyst
28 Aug 2024, 08:03

RE: When a bot was "unexpectedly terminated", cTrader shows the bot as still running

PanagiotisCharalampous said: 

Hi firemyst,

Can we have the cBot that reproduces this problem?

Best regards,

Panagiotis

I have emailed the Community account with details for accessing my VPS so they can see the issue happening first hand. I've explained what to look for in the details of the email.


@firemyst

firemyst
28 Aug 2024, 02:49

If you're writing the output from the bot itself, why not just write the bot's parameters as they currently are in the bot to the output file?

Why would you need to read the parameters of the saved cbotset file when the actual parameters in the bot could have been updated/changed without the cbotset file having been updated?


@firemyst

firemyst
27 Aug 2024, 06:39

RE: RE: I need a bot that closes all operations when the equity rises 20pips

robertocarlosyo said: 

firemyst said: 

Yes, it's possible. :-)

Do you know where I get it?

I didn't say there's already one out there.

However, you can code your own to do it. It's relatively straight forward and not too complex.


@firemyst

firemyst
27 Aug 2024, 00:53

RE: When a bot was "unexpectedly terminated", cTrader shows the bot as still running

PanagiotisCharalampous said: 

Hi firemyst,

Can we have the cBot that reproduces this problem?

Best regards,

Panagiotis

Any updates on this issue? 

I replaced the async call with the synchronous code below, and the issue still occurs for me: the bot instance is still marked as “running”, but it's not doing anything/logging, and/or crashes entirely with the error message above:

if (_p.Pips > MaxTrailingStopDistancePips + 2)
{
    //I tried replacing the async code with the following synchronous api call in the 
    //sample code I sent to Spotware, and the issue still occurs. 
    //Seems 1 instance of cTrader cannot handle 26 running instances of a cbot when using this call
    Print("Moving Stop Loss");
    ModifyPosition(_p,
        (_p.TradeType == TradeType.Buy ? s.Bid - (MaxTrailingStopDistancePips * s.PipSize) : s.Ask + (MaxTrailingStopDistancePips * s.PipSize)),
        _p.TakeProfit.GetValueOrDefault(),
        _p.HasTrailingStop
        );
        
    //ModifyPositionAsync(_p,  
    //    (_p.TradeType == TradeType.Buy ? s.Bid - (MaxTrailingStopDistancePips * s.PipSize) : s.Ask + (MaxTrailingStopDistancePips * s.PipSize)),
    //    _p.TakeProfit.GetValueOrDefault(),
    //    _p.HasTrailingStop,
    //    (TradeResult r) => {
            Print("Moved Stop Loss");
            _waitForAsyncTPToComplete = false;
    //    }
    //    );
    //_waitForAsyncTPToComplete = true;
}

@firemyst

firemyst
26 Aug 2024, 02:23

Yes, it's possible. :-)


@firemyst

firemyst
26 Aug 2024, 02:22

> “Can we use onBar() and onTick() at the same time?”

Yes.

Example where you don't need the OnBar method:

// define at class level
private int _currentIndex;
private int _previousIndex;

//set _currentIndex in OnStart
_currentIndex = _marketSeries.OpenTimes.Count;
_previousIndex = 0;

//Do the following in OnTick
if (_currentIndex != _previousIndex)
{
    //Call your OnBar Method
    YourCustomOnBarForBot([parameters if any]);

    //Update the previous index until it changes again
    _previousIndex = _currentIndex;
}

//if needed, continue with the ontick method
//Or, if you don't want to do anything else with the tick when 
//a new bar is formed, use an else clause
//else do the tick method when it's not the same tick a new bar is formed
else
{
}

@firemyst

firemyst
26 Aug 2024, 02:16

Thoughts are you need to add this to the “Suggestions” forum as Spotware doesn't come here looking for suggestions as this is for technical support.

 

If you really need it done, create your own bot that monitors your positions, and does the SL/TP accordingly as per your parameters.


@firemyst

firemyst
26 Aug 2024, 02:15

First, this needs to go in the “Suggestions” forum as Spotware doesn't look here for suggested improvements. This is for technical help.

 

Second, if it can't wait, I would write your own indicator that will do this for you. I agree cTrader's alerts are 3rd/4th class compared to other platforms out there like MT4 and ThinkTrader's. I don't think Spotware's priority at the moment is improving their alerting functionality as it hasn't changed much in the last 5-8 years. So yeah, probably best way to do this is write your own indicator that monitors prices for you and plays an alert sound meeting your requirements. 


@firemyst

firemyst
22 Aug 2024, 07:56 ( Updated at: 22 Aug 2024, 07:57 )

What do i do wrong?

You're using a Mac ;-)


@firemyst

firemyst
21 Aug 2024, 06:20

RE: When a bot was "unexpectedly terminated", cTrader shows the bot as still running

PanagiotisCharalampous said: 

Hi firemyst,

Can we have the cBot that reproduces this problem?

Best regards,

Panagiotis

Hi @PanagiotisCharalampous :

I've reproduced the issue again. It's in my log files:

I sent through a private YouTube video link to the Community Spotware email address referencing this thread so your team can watch the video and see exactly what's happening.

 

 


@firemyst

firemyst
20 Aug 2024, 04:55 ( Updated at: 20 Aug 2024, 05:13 )

RE: When a bot was "unexpectedly terminated", cTrader shows the bot as still running

PanagiotisCharalampous said: 

Hi firemyst,

Can we have the cBot that reproduces this problem?

Best regards,

Panagiotis

I have managed to create a cBot which caused this issue for me today. It doesn't print out the “Unexpectedly terminated” error, but the bot instances stop responding.

I'll email it through to the “community” email address shortly.

I had to let the bot run over the weekend and noticed certain symbols stopped ticking over today. 

My guess now is it's being caused by an async callback not working properly as when I added one into the code, that's when things broke. Eg, I stripped out all the code and started to gradually add things back in to see what would cause it to break.

I'll try and make notes of that in the code.

I discovered this issue by looking at the logs. I hav einformation printed out for every tick – some symbols like AUDUSD were still printing to the log today; others like AUDCHF stopped printing to the log yesterday. Both bot instances were running off the same bot code.


@firemyst