@ambrogio Wow i feel like a real chop, thanks, clearly working late nights on this has made my eyes lazy and missed such a small error.
Best posts made by JamesDaly
-
RE: Each trade with trailing block only trailing two trades HELPposted in Questions & Answers
-
RE: How to read Multi column and row CSV file and search each lineposted in Questions & Answers
just to let you know i came right
string line_read[6][31]; //assign array of string that will store 6 columns 29rows of csv data
int row=1,col=0,i=0; //column and row pointer for the array
int j=0;
while(i<5)
{
i++; //Increment variable
handle=FileOpen(tempFileName,FILE_CSV|FILE_READ|FILE_ANSI,","); //comma delimiter
if(handle>0)
{
while(true) //loop through each cell
{
CurrencyPair=(string)FileReadString(handle);
BuyOrSell=(string)FileReadString(handle);
Bias=(double)FileReadString(handle);
TP=(double)FileReadString(handle);
Risk=(double)FileReadString(handle);
ATR=(double)FileReadString(handle);
//if (i==3)break;
if (StringFind(Symbol(),CurrencyPair,0)>-1)break;
//string temp = FileReadString(handle); //read csv cell
if(FileIsEnding(handle)) break; //FileIsEnding = End of File
if(FileIsLineEnding(handle)); //FileIsLineEnding = End of Line
//i=i+1;
}FileClose(handle); break;}
else
{
if(j == 5)
{
Comment("File "+tempFileName+" not found, the last error is ", GetLastError());
}
Sleep(1000); //1 Second
}
}