Remove figures from arrays

 
I have a question I use the below code to remove certain figures from arrays from a specific index. How can I make the code work for arrays example RunningTrades[].symbol
         void RemoveIndexFromArray(string &MyArray[],int index)
            {
               string TempArray[];
               
               ArrayCopy(TempArray,MyArray,0,0,index);
               ArrayCopy(TempArray,MyArray,index,(index+1));
               
               ArrayFree(MyArray);
               ArrayCopy(MyArray,TempArray,0,0);
            }
         
 
Moses Adala Munyenye:
I have a question I use the below code to remove certain figures from arrays from a specific index. How can I make the code work for arrays example RunningTrades[].symbol

for arrays in arrays ? same thing , send the array . If .symbol is an array too 

RemoveIndexFromArray(RunningTrades[0].symbol,i);
 
Moses Adala Munyenye:
        void RemoveIndexFromArray(string &MyArray[],int index)

Instead of hard coding the datatype, make it a template. Instead of copying three times, just move them down.

         template<typename T>
         void RemoveIndexFromArray(T &MyArray[],int index)
            {
               for(int iLast=ArraySize(myArray)-1; index < iLast; ++index) MyArray[index] = MyArray[index+1];
               ArrayResize(myArray, iLast);
            }
 
Noted and thanks for the help and advice this is solved