Just found out a workaround on Metatrader stuppidity no.???
if anyone uses arrays in code set as series, be sure to unset it as series before resizing if you want to save values stored in the array, in short
if you have anywhere in code something like this
PHP Code:
ArraySetAsSeries(Buffer,true);
later on the code
PHP Code:
ArrayResize(Buffer,Bars);
produces wrong array as result, you must use
PHP Code:
ArraySetAsSeries(Buffer,false);
ArrayResize(Buffer,Bars);
ArraySetAsSeries(Buffer,true);