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; }
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 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,