CopyBuffer returns -1
The following script return -1 (instead of 2) if the graph period is different from 10 minutes
especially when I just changed timeframe
It's possible that a handle of type double could cause that problem because it gets stored as NNN.999999999 and gets truncated down to NNN. It should be type int.
Paul
- 2012.06.14
- Paul
- paulsfxrandomwalk.blogspot.com
Hello¨Paul,
Thanks for your remark
I changed the handle declaration to Int instead of Double.
But it makes no difference (still returns -1) when I change to a time frame different from 10 minutes (at least until a new candle shows up)
Daniel
You need to wait for indicator calculating.
while(!IsStopped()) { if(BarsCalculated(handBoll)>0) break; Sleep(5); }
The following script return -1 (instead of 2) if the graph period is different from 10 minutes
especially when I just changed timeframe