Crashed in OnTick with OverflowException: Negating the minimum value of a twos complement number is invalid.

Created at 14 Aug 2018, 00:17
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!
.I

.ics

Joined 10.03.2015

Crashed in OnTick with OverflowException: Negating the minimum value of a twos complement number is invalid.
14 Aug 2018, 00:17


Hi all,

Today, I had a rare crash during forward testing of an algo on a demo account:

Crashed in OnTick with OverflowException: Negating the minimum value of a twos complement number is invalid.

Does anyone experienced this error already in the past? Or does know what this possibly means?
Code hasn't been touched since migration from calgo 2.0 to ctrader 3.0 (automate). Never had this type of crash in calgo 2.0.

Google is pointing that it could be related to using Math.Abs, which i indeed use in the algo:
https://stackoverflow.com/questions/6265381/c-sharp-short-error-negating-the-minimum-value-of-a-twos-complement-number-is-i

Thanks in advance.


@.ics
Replies

PanagiotisCharalampous
14 Aug 2018, 09:11

Hi .ics

Are you able to reproduce this error? If yes, please share some code that will allow us to reproduce it as well.

Best Regards,

Panagiotis


@PanagiotisCharalampous

.ics
22 Aug 2018, 02:40

Hi Panagiotis,

So far, i haven't been able to reproducde this problem. Yet, a couple of hours ago i experienced again this type of crash during forward testing.

I logged a shift-ctrl-alt-t, and added the link of this post into the description. Not sure if this provides added value to your team.

Greetings


@.ics

PanagiotisCharalampous
22 Aug 2018, 09:36

Hi .ics,

This is a .Net exception and it is probably an issue with your code. If you can share your code, then maybe we can provide some advice. 

Best Regards,

Panagiotis


@PanagiotisCharalampous