I expect getting help in translating that error code into a textual understandable error description, not for sure putting the source code of a program on a public forum…I don't think my concerns are strange, are they? :)
Well I wouldn't expect much help then, bceause you need to give a bit more for even Spotware to have something to investigate.
And not asking for whole code - just sample code that reproduces the issue.
yep…I get the point…unfortunately as i said before the problem seems to came out right after modifying a stop loss with an invalid price…so the piece of code is “simply” this, nothing strange:
it basically puts a BE stop loss. the strange part is that in the logs i can find more than 1 error referring to an invalid stop loss price but it only crashes at some point, not punctually at every occurence of the error. looks like it tolerate a variable amount of errors and then it gives up crashing.
let me know if the informations given can help you more…
you're probably doing something that the code, whether you know it or not, expects to have access to something on the chart, which it obviously doesn't since it's in non-visual mode.
oh…and how do they expect developers to fix their code?
actually no, i'm only reading an indicator, placing stop orders, moving SLs and TPs
the only other thing i noticed is that right before the crash i have an “Modifying position PID30 (SL: 1.07551, TP: 1.083) FAILED with error "InvalidStopLossTakeProfit"” error…but i have this error also a few other times a lot of time before the crash so I don't think that's the point
If you don't post any sample code that reproduces the problem, I don't know how you expect people to be able to help you further.
I expect getting help in translating that error code into a textual understandable error description, not for sure putting the source code of a program on a public forum…I don't think my concerns are strange, are they? :)
you're probably doing something that the code, whether you know it or not, expects to have access to something on the chart, which it obviously doesn't since it's in non-visual mode.
oh…and how do they expect developers to fix their code?
actually no, i'm only reading an indicator, placing stop orders, moving SLs and TPs
the only other thing i noticed is that right before the crash i have an “Modifying position PID30 (SL: 1.07551, TP: 1.083) FAILED with error "InvalidStopLossTakeProfit"” error…but i have this error also a few other times a lot of time before the crash so I don't think that's the point
There is no reason to install the platform multiple times. Just open as many instances of the platform as you need.
Best regards,
Panagiotis
Ok, thanks for the solution provided.
Actually there's a reason: if I install the bots locally on the cTrader specific instance (so without online sync), I would have no chance to get confused and run the bot on the wrong instance. I might also create a shortcut on the desktop with the name of the bot and i would know that in that instance I could run the bot without worring of run the wrong one. Also, the instance would remember the last broker account used and propose it to me already selected on startup.
Just forward this feedback to the deveolpers team for an evaluation, please :)
Hi there,
You don't need separate installations for this, you can use multiple profiles.
Best regards,
Panagiotis
Now this looks like what i was looking for. Thanks!
There is no reason to install the platform multiple times. Just open as many instances of the platform as you need.
Best regards,
Panagiotis
Ok, thanks for the solution provided.
Actually there's a reason: if I install the bots locally on the cTrader specific instance (so without online sync), I would have no chance to get confused and run the bot on the wrong instance. I might also create a shortcut on the desktop with the name of the bot and i would know that in that instance I could run the bot without worring of run the wrong one. Also, the instance would remember the last broker account used and propose it to me already selected on startup.
Just forward this feedback to the deveolpers team for an evaluation, please :)
Please contact your broker regarding execution issues.
Best regards,
Panagiotis
Hi, I've already submitted the problem to the borker (IC Markets) which redirected me to you because they said “The error does not provide more details in order to investigate further from our side”.
There not much information for us either. If you can share your source code and steps to reproduce this issue, we are happy to have a look
Problem is not systematic, it can't be reproduced. The bot works well except once every X days this problem occurs and must be a server side problem. It is just happened again (twice):
The only thing I can notice is that, the hour is almost the same.
The portion of code which closes pending orders is quite simple:
foreach (var order in PendingOrders) if ( order.Label == _BotLabel && order.SymbolName == SymbolName && order.Comment == Comment ) CancelPendingOrder(order);
Hi there,
It's hard to help you in the forum. The broker needs to check why the orders are not cancelled.
Best regards,
Panagiotis
Hi Panagiotis, what if I now have also some “EntityNotFound” error? Maybe you can dig further in this kind of issue?
This error means that you are trying to cancel an order thar does not exist anymore (probably cancelled already). Check your cBot's logic
I can imagine that the error means that but those orders were existing, I had to close them manually afterward when I noticed the errors…
Please contact your broker regarding execution issues.
Best regards,
Panagiotis
Hi, I've already submitted the problem to the borker (IC Markets) which redirected me to you because they said “The error does not provide more details in order to investigate further from our side”.
There not much information for us either. If you can share your source code and steps to reproduce this issue, we are happy to have a look
Problem is not systematic, it can't be reproduced. The bot works well except once every X days this problem occurs and must be a server side problem. It is just happened again (twice):
The only thing I can notice is that, the hour is almost the same.
The portion of code which closes pending orders is quite simple:
foreach (var order in PendingOrders) if ( order.Label == _BotLabel && order.SymbolName == SymbolName && order.Comment == Comment ) CancelPendingOrder(order);
Hi there,
It's hard to help you in the forum. The broker needs to check why the orders are not cancelled.
Best regards,
Panagiotis
Hi Panagiotis, what if I now have also some “EntityNotFound” error? Maybe you can dig further in this kind of issue?
Please contact your broker regarding execution issues.
Best regards,
Panagiotis
Hi, I've already submitted the problem to the borker (IC Markets) which redirected me to you because they said “The error does not provide more details in order to investigate further from our side”.
There not much information for us either. If you can share your source code and steps to reproduce this issue, we are happy to have a look
Problem is not systematic, it can't be reproduced. The bot works well except once every X days this problem occurs and must be a server side problem. It is just happened again (twice):
The only thing I can notice is that, the hour is almost the same.
The portion of code which closes pending orders is quite simple:
foreach (var order in PendingOrders)
if (
order.Label == _BotLabel
&& order.SymbolName == SymbolName
&& order.Comment == Comment
) CancelPendingOrder(order);
Please contact your broker regarding execution issues.
Best regards,
Panagiotis
Hi, I've already submitted the problem to the borker (IC Markets) which redirected me to you because they said “The error does not provide more details in order to investigate further from our side”.
Share your cBot code andsend 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
Ok sent…I sent it from another user's cTrader but please refer to me for follow up. Thanks you.
Hi there,
We need the troubleshooting for the session that experiences the problem. Can you please send it again?
Best regards,
Panagiotis
I've sent you the informations from the session which was recreated after the error…I think that's the only thing I could do, no? BTW, it's a randomic crash so I can't give you instructions on how to reproduce it…
I am a bit confused. You said you “sent it from another user's cTrader”. So I am not sure from where exactly you sent the troubleshooting. Your troubleshooting is missing the cBot code. Can you please share it here?
how can you be confused? the bot is running on another user's cTrader and i sent you the data from there…is this so strange? and i posted the entire bot in the message box which opens pushing ctrl+alt+shift+t. I'm obviously not publishing it here publicly, how can you ask me to do this?!
Share your cBot code andsend 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
Ok sent…I sent it from another user's cTrader but please refer to me for follow up. Thanks you.
Hi there,
We need the troubleshooting for the session that experiences the problem. Can you please send it again?
Best regards,
Panagiotis
I've sent you the informations from the session which was recreated after the error…I think that's the only thing I could do, no? BTW, it's a randomic crash so I can't give you instructions on how to reproduce it…
Share your cBot code andsend 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
Ok sent…I sent it from another user's cTrader but please refer to me for follow up. Thanks you.
If you are referring to the log, just use the Print("Write any string here") method.
Best regards,
Panagiotis
Correct me if I'm wrong: Print("") method ends up into “Algo” tab while I'm asking if is possibile to write in the “Journal” tab. Differences are:
journal tab's logs is piled up by month while algo's ones are piled up by bot/indicator activation
journal file path is always “C:\Users\username\Documents\cTrader\Journals\Spotware\Journal-YYYY-MM.txt” while algo file path is always unique per bot/indicator activation “C:\Users\username\Documents\cAlgo\Data\cBots\myBot\7c36a52f-2ab9-41db-a2c7-a5a2bfdb8c76\RealTime\log.txt” as I see a lot of UUIDs in the “myBot” folder
If there's no method to write into Journal logs, I'll obviusly go with the Algo logs…
Can you record a video demonstrating this happening? Also 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,
Panagiotis
sure, here you are:
it happens all the time…i'm sending the link of this post through the platform as per your indications
kyosuke
19 Feb 2025, 10:55
RE: RE: RE: RE: RE: bot crashes in backtest
firemyst said:
yep…I get the point…unfortunately as i said before the problem seems to came out right after modifying a stop loss with an invalid price…so the piece of code is “simply” this, nothing strange:
it basically puts a BE stop loss. the strange part is that in the logs i can find more than 1 error referring to an invalid stop loss price but it only crashes at some point, not punctually at every occurence of the error. looks like it tolerate a variable amount of errors and then it gives up crashing.
let me know if the informations given can help you more…
@kyosuke