int readFileImg ( string file_name) {
int filehandle = FileOpen (file_name, FILE_READ | FILE_BIN );
if (filehandle!= INVALID_HANDLE ) {
FileClose (filehandle); // this line is important, without this line you will get 5004Alert ( "done" );
} elseAlert ( "Operation FileOpen failed, error " , GetLastError (), TerminalInfoString ( TERMINAL_DATA_PATH ));
return filehandle;
}
야
오류 5004는 파일을 닫지 않는 것과 관련이 있는 것 같습니다!
</> 버튼을 사용하여 코드를 삽입하십시오.
Strategy Tester 를 사용하여 EA를 테스트하는 동안 동일한 5004 오류가 나타납니다. 같은 세션에서 다른 파일을 열 수 있지만 갑자기 파일을 열 수 없기 때문에 mt4의 버그임에 틀림없습니다.
저는 이것을 기계 학습 알고리즘을 백테스트하는 데 사용합니다.
이제 mt4가 작동하지 않기 때문에 알고리즘을 백테스트하기 위한 다른 플랫폼이 필요합니다.
다른 백테스팅 플랫폼에 대한 아이디어가 있습니까?
가급적이면 파이썬 기반.
MT5를 사용해 보세요.
내 프로그램을 디버그하려고 하는데 동일한 문제가 있습니다.
FileOpen Docs의 예제를 기반으로 파일에서 기호 목록을 읽는 이 함수 를 만들었습니다.
편집기의 "파일 디렉토리"에 파일을 포함하고 다음과 같이 함수를 호출합니다.
나는 많은 다른 매개변수와 filePaths를 시도했다
1 - 열 파일 경로를 사용하려고 시도했지만 아무 것도 작동하지 않습니다.
오류가 발생했습니다: 5002 e 5004
ERR_WRONG_FILENAME
5002
잘못된 파일 이름
ERR_CANNOT_OPEN_FILE
5004
파일 열기 오류