Java言語では、メカニズムを使用して例外を処理tryできますcatch。
に同様の動作はありMQL4ますか?
このコードは式でエラー ' array out of range' をスローし、Close[bar]適切に処理できません。
どんな助けでも大歓迎です。
bool isBarClosed( int bar ) {
bool barClosed = true;
double closePrice = Close[bar];
int error = GetLastError();
if ( error == 4202 ) {
barClosed = false;
}
return barClosed;
}