My custom Indicator is not consistent showing the graph on separate window. Help please

 

Hi people!

I'm looking for some help,

I'm creating my first custom indicators and experimenting with technical indicators and basic operations on my endeavor to find the holly grail, 

I'm using IStochastic and iSRI doing some basic formulas and operations and basically is the same for loop operator to graph both of them based on the :


for (int i=0; i<Bars; i++) 


Very simple.


The one created with iRSI works perfect, but the one created with iStochastic do diferent problems:

Wont update, so I have to compile again and again. Some times keeps updating fine, till I change time frame and came back is messed up

Some times just shows the graph from 0 to 200 bars or so only on one time frame, other times do that on all of them

Some times it just works fine...

I changed from  Bars to diferent numbers and do the same

for (int i=0; i<=1000000; i++)


Anybody know about this problem?


Thanks for the help

Files:
MQL4.jpg  164 kb
 
Topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I will move your topic to the MQL4 and Metatrader 4 section.
 
Thank you
Reason: