Download MetaTrader 5
To add comments, please log in or register
Add our Facebook page to friends. Follow the latest news!
Quantum Capital International Group Ltd
215
Yang Chih Chou 2015.03.04 07:11 

does any one can help me to do 

i have two array , array A & array B 

if i want to save array A data to csv then read from csv and to write to array B

how can i code it,thank you!

that is my code blow 

thank you! 

"writefile"
handle=FileOpen(filename,FILE_CSV|FILE_READ|FILE_WRITE);
     
     FileWrite(handle,EntryTrade[0],TimeToStr(EntryTrade[1],TIME_DATE|TIME_SECONDS),EntryTrade[2],EntryTrade[3],EntryTrade[4],EntryTrade[5]
     ,EntryTrade[6],EntryTrade[7],EntryTrade[8],EntryTrade[9],EntryTrade[10],EntryTrade[11],EntryTrade[12],EntryTrade[13]);
     FileClose(handle);


"readfile"

handle=FileOpen(filename,FILE_CSV|FILE_READ);
     FileReadArray(handle,HoldingOrder,0,WHOLE_ARRAY);
     FileClose(handle);
sangmane
14
sangmane 2015.03.06 21:54  
handle=FileOpen(filename,FILE_CSV|FILE_READ); 

string holdingArray[14];

for (int i=0; i<ArraySize(holdingArray); i++) {

        holdingArray[i] = FileReadString(handle);

        if (FileIsEnding(handle)) break;

}

FileClose(handle); 
/
To add comments, please log in or register