Default location for Strategy Tester to write to is tester/files.
Default location for EA to write to is experts/files.
Have you looked in the right place?
CB
Default location for Strategy Tester to write to is tester/files.
Default location for EA to write to is experts/files.
Have you looked in the right place?
CB
Thanks Guys!
I was looking in the wrong place :) Followup question.. Everytime a Filewrite command sends something to write, it places the text entires on the same line, thus overwriting the previous data that was in there.. how do I fix that? Here's the simple EA I'm studying right now. :)
extern string Filename = "DataDump.csv";
void start()
{
Comment("Text ",Read());
Write();
}
//+------------------------------------------------------------------+
//| Write |
//+------------------------------------------------------------------+
void Write()
{
int handle;
datetime orderOpen=OrderOpenTime();
handle=FileOpen(Filename, FILE_CSV|FILE_WRITE, ',');
if(handle>0)
{
FileSeek(handle,0,SEEK_END);
FileWrite(handle, Bid);
FileClose(handle);
}
}
//+------------------------------------------------------------------+
//| Read |
//+------------------------------------------------------------------+
double Read()
{
int handle;
double Adjustment;
handle=FileOpen(Filename, FILE_CSV, ',');
if(handle>0)
{
Adjustment = (FileReadNumber(handle));
FileClose(handle);
}
return(Adjustment);
}
Replace:
handle=FileOpen(Filename, FILE_CSV|FILE_WRITE, ',');
with:
handle=FileOpen(Filename, FILE_CSV|FILE_READ|FILE_WRITE, ',');
CB
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I made a simple script to write high/low open/close candle values in a text file.. It doesn't work.. tester doesn't allow read/write to file ea's right? Someone please confirm :)
Have a great weekend!!