//............................ //............................ // INIT MT4 READING INSTANCE int Reader_handle = 0; ulong Pointer_read = 0; int OnInit() { int open_flags = FILE_READ|FILE_WRITE|FILE_BIN|FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_COMMON; Reader_handle = FileOpen( "Fichero", open_flags); if (Reader_handle < 0) return INIT_FAILED; Pointer_read = FileSize(Reader_handle); Print("Pointer_read: "+(string)Pointer_read); //FileClose(Pointer_read); return 0; } void OnTick() { Sleep(1000); read_optimus(); } void read_optimus() { ulong size_fichero = FileSize(Reader_handle); if (size_fichero <= Pointer_read){ //FileClose(Reader_handle); return; } Print("----> Pointer_read: "+(string)Pointer_read); FileSeek( Reader_handle, Pointer_read, SEEK_SET); Pointer_read = size_fichero; int read = 0; while(!FileIsEnding(Reader_handle)) { read = FileReadInteger(Reader_handle, INT_VALUE); Print("Read value:"+(string)read); }// while(!FileIsEnding(Trade_log_handle)) Print("<---- Pointer_read: "+(string)Pointer_read); }