cTrader native indicator Crashed in Calculate

Created at 09 Oct 2020, 17:16
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!
SH

Shares4UsDevelopment

Joined 14.10.2018

cTrader native indicator Crashed in Calculate
09 Oct 2020, 17:16


I have only these 3 indicators in a Bot
            i_RSI = Indicators.RelativeStrengthIndex(Bars.ClosePrices, 14);
            i_EMA = Indicators.MovingAverage(Bars.ClosePrices, 14, MovingAverageType.Exponential);
            i_SMA = Indicators.MovingAverage(Bars.ClosePrices, 14, MovingAverageType.Simple);
 

No function calculate in the Bot itself.

Getting the error:
09/10/2020 14:12:27.507 | Crashed in Calculate with ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

 

No such thing in the bot so it must be in RelativeStrengthIndex or MovingAverage indicators.
Could you please check these ?

(No, I'm not allowed to send you the cBot code)
But this info should be sufficient for your developers.

*** UPDATE ***
Wrote my own RSI,EMA and SMA and replaced the other ones => EROR is GONE

placed them Back => Error is there again!

especially check your RSI that's most probably the problem.
Please update me if fixed!


@Shares4UsDevelopment
Replies

firemyst
11 Oct 2020, 16:36

RE:

Shares4UsDevelopment said:

 

(No, I'm not allowed to send you the cBot code)
But this info should be sufficient for your developers.

 

So you can't provide the cBot code, but you should be able to provide code that reproduces the problem.

Are you able to do that?

 


@firemyst

Shares4UsDevelopment
12 Oct 2020, 08:20

RE: RE:

So you can't provide the cBot code, but you should be able to provide code that reproduces the problem.
Are you able to do that?


Sorry I don't get time to do that.

Bossman says: "Point them to the error, but spend no time helping them to solve it, you've got other things to do.
It's their problem not yours. Just write your own indicators. If that works you've proven the error and let them solve it.
If they have an error in something as basic as an rsi or ema they need to solve it fast because it affects many and it 
points at bad programming/testing in the platform."

And actually I understand his point of view. He's not in the business of helping Spotware but in the business of writing code.

 


@Shares4UsDevelopment

PanagiotisCharalampous
12 Oct 2020, 08:51

Hi Shares4UsDevelopment,

Unfortunately there is not much we can do without some code to reproduce the problem.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

firemyst
12 Oct 2020, 08:58

RE: RE: RE:

Shares4UsDevelopment said:

Just write your own indicators. If that works you've proven the error and let them solve it.

If they have an error in something as basic as an rsi or ema they need to solve it fast because it affects many and it 
points at bad programming/testing in the platform."

In defense of @Panagiotis and @Spotware:

1) they have had EMAs, SMAs, and RSI in cTrader for years with no reported problems/issues. You're one person who has reported an issue out of thousands who use those indicators in their bots without any issues (myself included)

2) how do you know your replicated-indicators that you wrote are correct? They might not throw an error, but that doesn't prove they're right/working/calculating values correctly.

3) your boss is wrong when he/she says, "it affects many". Obviously not if you're the only individual who has ever reported the problem.

So it gets back to the point you need to write simplified code to prove there's an issue with cTrader since nobody else is/has.

 

 


@firemyst

PanagiotisCharalampous
12 Oct 2020, 09:03

Hi Shares4UsDevelopment,

It also sounds weird that you get time to rewrite the indicators but you don't get time to share the code with us, even privately, or write a simple cBot that reproduces the problem. 

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

Shares4UsDevelopment
12 Oct 2020, 10:28

RE: RE: RE: RE:

@firemyst said:

In defense of @Panagiotis and @Spotware:
I never mentioned Panagiotis? And I was not attacking Spotware I was trying to help them in getting a smooth bug-free system.

1) they have had EMAs, SMAs, and RSI in cTrader for years with no reported problems/issues. You're one person who has reported an issue out of thousands who use those indicators in their bots without any issues (myself included)
If one sees an issue and others don't it is unwise to state it is not there.
I've reported a severe error once before that no one was aware of (check 
http://ctrader.com/forum/calgo-support/23156) which resulted in a Spotware hotfix three weeks later, there the effort of stripping a bot was smaller than coding around it!
It looks like we're heavy users, stretching the platform to boundaries unknown ;-)

2) how do you know your replicated-indicators that you wrote are correct? They might not throw an error, but that doesn't prove they're right/working/calculating values correctly.
Come on, are you real?? RSI and MA's are no rocketscience!
I got the Spotware RSI and MA's out and wrote my own, now the Bot works. Need I say more!

3) your boss is wrong when he/she says, "it affects many". Obviously not if you're the only individual who has ever reported the problem.
If one sees an issue it is unwise to state it is not there because no one else is affected by it just for the reason that they not see nor care.

So it gets back to the point you need to write simplified code to prove there's an issue with cTrader since nobody else is/has.
I'll go with my Boss. He pays the bill!

@PanagiotisCharalampous said:

It also sounds weird that you get time to rewrite the indicators but you don't get time to share the code with us, even privately, or write a simple cBot that reproduces the problem. 

Writing 2 MA's and one RSI did not take long and it's all in 1 loop now, did not even had to spawn it.
Stripping a bot to code that throws the error but is clean enough to send into the world with permission of the company would have taken much longer. Furthermore a Non-Disclosure agreement prohibits me from sharing any code without prior company consent.


But, as I feel now, the best way is not to report errors anymore if you're prohibited from sharing your code.
In our company we're glad with every error that is reported and the time our customers spends in reporting them is valuated and appreciated. We ask them to help us if they can and reward them for it, but if they can't we understand that, they're in the money business, not in development, and it's our error, either in shielding the software from erroneous use or in our code. So it is our problem to solve.

 

 

 


@Shares4UsDevelopment