Don't forget to put FileClose(ReadOrdesrs) at the end.
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 everyone
first i most say that this forum is very helpful for me
thanks for all the members
second i can use help
i wrote this code & i cant fine the way to get last line into var
ReadOrdesrs = FileOpen(Symbol() + "_data.csv",FILE_CSV|FILE_READ|FILE_WRITE,',');
while (FileIsEnding(ReadOrdesrs)==false)
{
string sDateNTime = FileReadString(ReadOrdesrs);
string sType = FileReadString(ReadOrdesrs);
string sSize = FileReadString(ReadOrdesrs);
string sSymbol = FileReadString(ReadOrdesrs);
string sLastPrice = FileReadString(ReadOrdesrs);
string sSL = FileReadString(ReadOrdesrs);
string sTP = FileReadString(ReadOrdesrs);
if (FileIsEnding(ReadOrdesrs)==true)
break;
LastDateNTime = sDateNTime;
LastType = sType;
LastSize = sSize;
LastSymbol = sSymbol;
LastPrice = sLastPrice;
LastSL = sSL;
LastTP = sTP;
}
this is the csv i'm trying to read
Time,Type,Size,Symbol,Price,SL,TP
2010.02.01 01:00,sell,0.1,EURUSD,1.22118,0,1.21000
2010.02.24 15:48,buy,0.2,EURUSD,1.22018,0,1.23450
2010.02.24 22:52,buy,0.2,EURUSD,1.231,0,1.23650
2010.04.15 04:59,sell,0.4,EURUSD,1.27996,0,1.27000
2010.05.01 08:21,buy,0.1,EURUSD,1.25225,0,1.26500
2010.05.12 12:44,buy,0.1,EURUSD,1.20485,0,1.21000
2010.05.15 10:41,sell,0.4,EURUSD,1.2049,0,1.20000
2010.05.15 03:37,sell,0.6,EURUSD,1.27158,0,1.25000
2010.05.18 21:51,sell,0.6,EURUSD,1.21118,0,1.20000
2010.05.22 09:12,buy,0.2,EURUSD,1.2195,0,0.12300
if someone can tel me what code is missing or no good i'ill very thankful
how can write (change) in last line a stop loss after the file is made
thanks a lot
jol