In my EA testing, I want to write all Buy and sell events in a file. Here is what I did, But it is writing only one line instead of two or more. FileWrite() inside OnTick() funstion is not being executed.
Any suggestion?
Thanks.
int handle = FileOpen("OrdersReport.csv", FILE_WRITE|FILE_CSV, "\t");
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hi,
In my EA testing, I want to write all Buy and sell events in a file. Here is what I did, But it is writing only one line instead of two or more. FileWrite() inside OnTick() funstion is not being executed.
Any suggestion?
Thanks.
int handle = FileOpen("OrdersReport.csv", FILE_WRITE|FILE_CSV, "\t");void OnTick()
int OnInit()
{ if(handle==INVALID_HANDLE) return(0); FileWrite(handle, "open price", "open time", "symbol", "lots");
}
void OnDeinit(const int reason) { FileClose(handle); }
{ FileWrite(handle, "open price", "open time", "symbol", "lots"); // writing the same line just to test
}