Jak w temacie

Po ostatnich zmianach metaeditora podany niżej program nie działa jako EA

Więc jeżeli ktoś potrafi go odpowiednio zmodyfikować to będę wdzięczy.
Optymalnie by było gdyby plik csv zapisywał i zamykała z każdym tickiem.
Pozdrawiam
//+--------------------------------------------------------+
//| BP-Ticks-1.0.mq4 |
//+--------------------------------------------------------+
// File identificator
int file;
// Tick count for flushing each 1024 ticks
int flushCount = 0;
int init() {
// Open the file for writing
file = FileOpen(Symbol() + "-Ticks.csv",
FILE_WRITE | FILE_CSV,
";");
return(0);
}
int deinit() {
// Close the file
FileClose(file);
return(0);
}
int start() {
// Write tick data:
// - Date & time with seconds info
// - Bid
// - Ask
// - Volume indicator for the selected timeframe
FileWrite(file,
TimeToStr(TimeCurrent(),
TIME_DATE | TIME_SECONDS),
Bid,
Ask,
iVolume(Symbol(), NULL, 0));
flushCount++;
// Flush file buffer each 1024 ticks to enhance performance
// when writing huge files
if (flushCount == 1024) {
FileFlush(file);
flushCount = 0;
}
return(0);
}