do not use if(CopyBuffer(.....) < 0)
try the code:
if(!CopyBuffer( etc etc...))
JacintoBelgium:
Why?!do not use if(CopyBuffer(.....) < 0)
try the code:
if(!CopyBuffer( etc etc...))
CopyBuffer returns an int value and what he did is right.
Despite of the error (that I guess that happens on first OnCalculate call) the indicator is working fine, right?
i realise that this is an old thread, but have same issue sometimes. Am i right in thinking that the code should say "<= 0", with the =? and that the error 4806 will go away?

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi guys,
I wrote a test indicator and every start I got an error message (CopyBuffer 4806 error), I don't know why and hope, You can help me to solve it.
The code:
Any idea?