Topics
Replies
userUser
02 Aug 2022, 18:03
RE:
PanagiotisCharalampous said:
Hi there,
Do you build your code in VS in Debug mode?
Best Regards,
Panagiotis
Dear Panos,
Yes, I build the code on VS 2019 Debug mode.
PS. The only thing that changed - cTrader updated to 4.2. On cTrader 4.1 was no optimization.
@userUser
userUser
02 Aug 2022, 18:00
RE:
K100 said:
Hi,
Since updating since yesterday. Code that was working fine is no longer, and i'm not sure why. Its so basic.
If i remove this snippet , indicator works. Any ideas ?
if (AUD[index] == double.NaN)
{
AUD[index] = 0;
IndicatorArea.DrawText("Text1", "AUD: " + index, index , 0, audColor);
}
else if (AUD[index] != double.NaN)
{
IndicatorArea.DrawText("Text1", "AUD: " + index, index , AUD[index], audColor);
}
Keep getting the following error.
"Crashed in Calculate with ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: y. Actual value was: NaN."
Thanks in advance
Try double.IsNaN(AUD[index]) == true or false
@userUser
userUser
05 May 2022, 12:50
RE:
amusleh said:
Hi,
Please follow this guide: Debugging - cTrader Automate API Documentation (spotware.github.io)
Hi Ahmad,
I am not a new with debugger. I use debugger with cTrader 4.1 and VS2019.
But there is some problem with cTrader 4.2 and VS2022. Symbols are not loading.
PS. I tried to start debugging in 2 ways :
(1) from VS2022 break point -> compile -> debug
(2) with System.Diagnostics.Debugger.Launch() method from cBot.
It doesn't work for both ways.
@userUser
userUser
18 Aug 2022, 22:47 ( Updated at: 21 Dec 2023, 09:22 )
RE:
Also, by design every trade is risking $1000 +/-1%.
This rule is respected in 4.1 (first screen).
But this rule is not respected in 4.2.20 (second screen). On 4.2.20 the error gets up to 300%. And this is the same 197k volume order described in the post above.
@userUser