Array indexing and resizing an AS_SERIES array
Why not just try it ?
Exactly
bool resize_vector(double& arr[], int nRows, string msg){ if(ArrayResize(arr, nRows) >= nRows) return true; DisableTrading( "ArrayResize("+nRows+") Failed: "+_LastError + " " + msg); return false; } bool resize_buffer(double& buffer[], int nRows, string msg){ // This enlarges the deque and shifts values B[2]=B[1]; B[1]=B[0]; B[0]=? bool isSeries = ArrayGetAsSeries(buffer); ArraySetAsSeries(buffer, !isSeries); resize_vector(buffer, nRows, msg); ArraySetAsSeries(buffer, isSeries); return true; }
hi friend,
I've set an array to AS_SERIES indexing by using the ArraySetAsSeries(... ,True) and now I want to resize the mentioned array and add a new element to the very first index - at the extreme right side- of my array. would it be possible to do so? or the only way is that I change it into NORMAL INDEXING style and resize it so that the new index would be located at the extreme right side of the array and the again change the array into AS_SERIES style ?
thanking in advance for your kind guidance,