Topic: error message
this keeps coming see attachment
Create and Test Forex Strategies
You are not logged in. Please login or register.
Forex Software → Premium Club → error message
this keeps coming see attachment
Thanks for the report, I'll look into the indicator.
Re-upload it from the repo again and report back if it works now (I couldn't replicate the error).
same indicator same error again
Footon, you can greatly improve the performance of this indicator.
Now, if we have 50000 bars and the indicator period is 500, it checks (50000-500)*500 = 24 750 000 times the signal conditions.
You can easily remove the loop-back cycle.
Instead of:
for (int iBar = firstBar; iBar < Bars; iBar++)
{
for (int l = 1; l <= Period; l++)
{
if (Close[iBar-l] > Open[iBar-l])
countup++;
...
...
}
You can calculate it with one pass with something like that:
for (int iBar = firstBar; iBar < Bars; iBar++)
{
if (Close[iBar-period] <= Open[iBar-period])
countup--;
if (Close[iBar] > Open[iBar])
countup++;
...
}
In that way you will calculate it with only 49 500 checks.
...
The error is division by zero. It looks like there are conditions where it happens. The solution is to check if the divisor is 0 prior to division.
same indicator same error again
What data do you use? Tell me timeframe and source of it.
Thanks for the tip, my brain is a little bit fried at the moment as I caught a cold or something, I'll review the code in a more clear state of mind later.
Footon, you can greatly improve the performance of this indicator.
Now, if we have 50000 bars and the indicator period is 500, it checks (50000-500)*500 = 24 750 000 times the signal conditions.
You can easily remove the loop-back cycle.
///
In that way you will calculate it with only 49 500 checks.
...
The error is division by zero. It looks like there are conditions where it happens. The solution is to check if the divisor is 0 prior to division.
Bloody flu, I made an error in the previous fix, you are absolutely correct Pradeep. Now it should be better. Reload from repo.
I'm working on solving this problem since yesterday, sorry for the trouble!
Uh, finally got that divide by zero under control, the answer was in front of me all the time, but I overlooked it for so long. The code is optimized (thanks to Miroslav and his brilliant solution, why didn't I come up with it myself ).
Report if problems of different sort pop out.
Forex Software → Premium Club → error message
Powered by PunBB, supported by Informer Technologies, Inc.