Thank you for contacting Spotware. If you are looking to delete your demo accounts, you can use the link below. Please make sure you have closed all your positions and canceled all your orders before deleting your accounts.
You didn't respond to the poster's concerns about cTrader and cBots freezing on users. Is @Spotware actually aware of and investigating this issue?
Or do you need to see a video of it happening?
Hi firemyst,
Sorry I responded to the wrong post. Could you pleasesend 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,
I have sent an email to community @ spotware with a private youtube link where the issue can be viewed, steps on how to reproduce, and a zip archive with an algo file, cs file, cbotset file, and a README file with all the information that should be needed to reproduce.
Strong suggestion: I would have some overlapping logger going on, because when cTrader freezes, it's toast. There's no way to get into anything in it, including any logging tabs or other areas.
Thank you for contacting Spotware. If you are looking to delete your demo accounts, you can use the link below. Please make sure you have closed all your positions and canceled all your orders before deleting your accounts.
You didn't respond to the poster's concerns about cTrader and cBots freezing on users. Is @Spotware actually aware of and investigating this issue?
Or do you need to see a video of it happening?
Hi firemyst,
Sorry I responded to the wrong post. Could you pleasesend 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,
I can't do the trouble shooting information. cTrader COMPLETELY freezes. The only way to do anything is to kill it in task manager.
That's the problem. Something in this latest release causes it to complete freeze up, yet leaving the rest of the computer responsive.
Thank you for contacting Spotware. If you are looking to delete your demo accounts, you can use the link below. Please make sure you have closed all your positions and canceled all your orders before deleting your accounts.
Your code will crash because if there's no label, “Label” will be null. Also, if you have no position, you're telling the code to look through the Positions collection, which will be null. So you need to check to make sure you actually have at least one open position first.
I have developed hundreds of strategies and almost all of them need a fixed timezone regardless where the cBot is running.
So just program in something like the following to get the time based on a fixed time zone and compare whatever actions you need that are time based agains the _Dt datetime variable instead. This has been available since .Net 3.5 I think:
Datetime _Dt = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(Server.TimeInUtc, "Eastern Standard Time"); //or use DateTime.Now in the API call to get the time if more appropriate
Decisions need to be taken at specific times no matter if the code is executed in London, New York or Beijing.
Then if the programmer isn't going to get time based on a specific time zone, they can have it coded in the bot to look at specific times with the C# UTC setting such as getting the time in UTC time and adding an offset. For example:
//if you know the specific time, add it to UTC
TimeSpan LocalUTCTimeSpanOffset = new TimeSpan(2, 0, 0);
DateTime _Dt = Server.TimeInUtc + LocalUTCTimeSpanOffset;
//or if the user knows what time they want things to happen in a specific time zone:
Datetime _Dt = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(DateTime.UtcNow, "Eastern Standard Time");
//then just compare _localDt to the specific time they need things to happen
//or the user specifies the timezone in the directive tag as is currently implemented
Using the above, you have the best of both worlds – implementing the above, users can have their bots make decisions at specific times as they see fit regardless of what timezone cTrader or the server is set to and the code is running in;
when no time zone is provided in the directive and the bots are being run somewhere locally via cTrader, use the timezone the user set in cTrader so those people who travel from Spain (UTC + 2) to London (UTC + 1) to New York (UTC - 4) and back can update their cTrader setting and have the logs and other info with timestamps without having to recompile and redeploy code.
It uses your cBot's timezone. If there isn't one set, it's UTC+0
Well, that's annoying. According to the way it's implemented, if I wanted any cBot to log in local time for the time zones I go through because I travel often, I would have to update, recompile, and redeploy the bot every single time I cross a timezone to update the bot instances with the timezone I'm in?
Who decided that?! O.M.G. face palm
cTrader can certainly determine if the cBot is running locally (and not in the cloud), and can also determine if there's a timezone set or not.
If I start a cBot on a VPS that's set for my local time zone running an instance of cTrader bot locally (not in the cloud) set to the current timezone I want to use, then why doesn't the bot, by default if no time zone is specified and it's running locally, use the local time zone?!
It makes more sense to use the timezone the user has selected in cTrader in than a default UTC+0.
This is not something that works out of the box, automatic timezone detection needs to be developed. Feel free to post a suggestion in the Suggestions and we will consider it for future releases.
This really shouldn't have to be a suggestion.
Seriously, who releases software so that when a user changes time zones, the user needs to recompile and redeploy their code to pick up the new time zone?
When a bot is loaded, and before it's started, cTrader should already know if a timezone is specified or not from the bot's header directive.
If there is none specified, Spotware should read the timezone the user sets in cTrader itself.
Otherwise, what's the point of having that?
Again, facepalm
I'll save Spotware's team 10 seconds with this link:
It uses your cBot's timezone. If there isn't one set, it's UTC+0
Well, that's annoying. According to the way it's implemented, if I wanted any cBot to log in local time for the time zones I go through because I travel often, I would have to update, recompile, and redeploy the bot every single time I cross a timezone to update the bot instances with the timezone I'm in?
Who decided that?! O.M.G. face palm
cTrader can certainly determine if the cBot is running locally (and not in the cloud), and can also determine if there's a timezone set or not.
If I start a cBot on a VPS that's set for my local time zone running an instance of cTrader bot locally (not in the cloud) set to the current timezone I want to use, then why doesn't the bot, by default if no time zone is specified and it's running locally, use the local time zone?!
It makes more sense to use the timezone the user has selected in cTrader in than a default UTC+0.
Speaking of issues, look how much more memory this new version requires. I used to be able to run 2 copies of version 4.18 on a VPS with 4GB of ram and still have plenty of memory space left over.
Now when I start 2 copies of cTrader 5.0.xx on a VPS with 4GB of ram, there's only like 740k of memory left. The VPS hasn't changed, so it can't be blamed on Windows.
firemyst
03 Jun 2024, 13:09 ( Updated at: 04 Jun 2024, 05:26 )
RE: RE: RE: My ctrader freeze when i'm using my cbot
PanagiotisCharalampous said:
I have sent an email to community @ spotware with a private youtube link where the issue can be viewed, steps on how to reproduce, and a zip archive with an algo file, cs file, cbotset file, and a README file with all the information that should be needed to reproduce.
Strong suggestion: I would have some overlapping logger going on, because when cTrader freezes, it's toast. There's no way to get into anything in it, including any logging tabs or other areas.
@firemyst