Download MetaTrader 5

iCustom BUG!!!

To add comments, please log in or register
Bogdan Alin Baltatu
Bogdan Alin Baltatu 2014.11.13 06:04 
We experienced strange indicator calling problems. Our indicator call was with the same parameters, from within a OnTimer event set at one second. To us it seemed that, only we changed a certain parameter, the indicator started to get initialized again and again, even faster than the timer delay. Due to a coincidence, we blamed usage of that parameter in the code, and it took quite some time to sort it out.

It turned out it was not the parameter, but an iCustom bug. Meaningly, when iCustom receives at least 10 parameters *in this case*
the indicator will be continuously loaded; therefore, in a 9-parameter case like this:

input string LicenseKey = "" ;
input int Fast_EMA_period = 7;
input int Slow_SMA_period = 14;
input int Sstoch_K_period = 14;
input int Sstoch_D_period = 9;
input int Sstoch_slowing_period = 9;
input int Bullish_threshold = 30;
input int Bearish_threshold = 70;
input int Confirmation_period = 10;

with a calling line: 


the indicator loads a single time;

however, adding 

input int AvoidDoubleSignalsOnADistanceOfBars=10;

as the 10th parameter, and having the iCustom call


will produce a reload of the indicator at least each time the execution reaches it, if not even faster.

The problem surfaced as we used the last parameter with a different value than the one from the compiled code; we thought it was something about it. Was pretty strange, using other parameters changed (and we tried with the previous parameters), did not cause this bug to emerge. And as it can be seen, in both call cases, the first parameter, the string, is different than the compiled code (empty string), but doesn't make the bug to appear.

We would like to see this bug sorted out, as it is pretty shadowy; changing names and types of parameters may hide this bug, making it harder to detect.
SYED NAUFAL GADDAFI 2014.11.13 06:11  
Sort out problem when the said indicator is not attached here ? Nobody will do it.
Bogdan Alin Baltatu
Bogdan Alin Baltatu 2014.11.13 07:13  
Expert and....
Bogdan Alin Baltatu
Bogdan Alin Baltatu 2014.11.13 07:14  
Bogdan Alin Baltatu
Bogdan Alin Baltatu 2014.11.14 07:36  
Some news about iCustom bug?
Carl Schreiber
Carl Schreiber 2014.11.14 08:31  
Some news about iCustom bug?

The indicator you attached is not the indicator that causes the problem - so what do you expect?

My crystal ball felt down yesterday and now has a flaw, but next week I'll go shopping at Diagon Alley. So at the moment I am very limited to help you :(

Bogdan Alin Baltatu
Bogdan Alin Baltatu 2014.11.14 10:44  

 Check the link below and exercise a bit more caution before mocking people online. It's very possibly this bug not to be present on your end, but it doesn't mean that it couldn't be present anywhere else.

Carl Schreiber
Carl Schreiber 2014.11.14 10:56  

may be if you set:


in OnInit() to e.g. 20 the indicator is loaded only every 20 seconds.

It seems that OnTimer is different than OnTick().

Bogdan Alin Baltatu
Bogdan Alin Baltatu 2014.11.14 11:42  
The question is not about how the timer fires.
When the timer fires, the indicator is calculated, and value displayed
But that happens in the Experts tab. However, in the Journal tab, "loaded successfully" must appear only once.
If you put the last parameter in iCustom call to be 10 (its default value) *or* you use the commented out iCustom call while commenting out last parameter in the indicator, AvoidDoubleSignals... , the indicator will load only once.
Carl Schreiber
Carl Schreiber 2014.11.14 12:22  

1) If I apply an indicator either me myself or by a call of my EA I see that in the Expert-Tab and the Journal-Tab!

2) If the problem depends on a specific value of the indicator: ten or not ten: That is the question, we can't help  if you only provide a 'naked' indicator!

James Hodges
James Hodges 2014.11.15 09:45  

It is reloading it because you are not calling the indicator by its default parameters.

If you change the parameter in the indicator so that 7 is the default.

It will work fine but with a non-default call it will load anew on each call every second.

Set the timer on 5 seconds and you will see it reload every 5 seconds.


To add comments, please log in or register