CopyBUfferMaM error =4806 - page 2

 
kodukoya #:
Yes I am sure I am getting the error with the code. I will try to reduce some of the craziness. I thought ChartIndicatorAdd was necessary to get the MA's on the chart. I can remove these

It's weird to have this error with this code. I noticed there is some regularity in the error in your log, around 45 to 50 seconds between each one, so it's not on every tick. Do you have other indicators running on the same chart or symbol ? Try to use it alone.

If you want to have the MA's on the chart, yes use ChartIndicatorAdd, but not on each tick, and what I meant is it's not necessary to use CopyBuffer().

 
Alain Verleyen #:

It's weird to have this error with this code. I noticed there is some regularity in the error in your log, around 45 to 50 seconds between each one, so it's not on every tick. Do you have other indicators running on the same chart or symbol ? Try to use it alone.

If you want to have the MA's on the chart, yes use ChartIndicatorAdd, but not on each tick, and what I meant is it's not necessary to use CopyBuffer().

Thank You Alain. Thanks for your feedback. I have tried to read up on CopyBuffer(), I thought it was necessary - I have read the function - but I can't see where it indicates its advantage - what is the advantage of using CopyBuffer? I thought I needed it to copy the data into the variables so that they may be used for my analysis. is that not the case?

 
kodukoya #:

Thank You Alain. Thanks for your feedback. I have tried to read up on CopyBuffer(), I thought it was necessary - I have read the function - but I can't see where it indicates its advantage - what is the advantage of using CopyBuffer? I thought I needed it to copy the data into the variables so that they may be used for my analysis. is that not the case?

Sure it's needed. Sorry I see now my last sentence was not clear, I just meant that when you are using iCustom and Copybuffer() to get indicator values, you don't have to use ChartIndicatorAdd().
 
Thank You Alain, you have been a great help