초보자의 질문 MQL4 MT4 MetaTrader 4 - 페이지 196 1...189190191192193194195196197198199200201202203...260 새 코멘트 Vladimir Karputov 2020.02.01 17:42 #1951 Vitaly Muzichenko : 이것은 레이아웃이며 4와 5의 차이가 없습니다. 핸들은 모든 단계가 아니라 OnInit()에서 한 번만 생성되어야 합니다. 이거 아직도 모르세요? Vitaly Muzichenko 2020.02.01 17:51 #1952 삭제됨, 해결해야 함 Vladimir Karputov 2020.02.01 17:55 #1953 Vitaly Muzichenko : 그래서? 그래서 여전히 각 틱에 핸들을 만듭니다 . Styler를 사용하면 로직 구축 오류가 즉시 표시됩니다. //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ double MA( string symb, ENUM_TIMEFRAMES tf, int period, int ma_shift, ENUM_MA_METHOD method, ENUM_APPLIED_PRICE price, int index) { #ifdef __MQL4__ return ( iMA (symb,tf,period,ma_shift,method,price,index)); #else double buf[ 1 ]; static int hMA=- 1 ; int handle= iMA (symb,tf,period,ma_shift,method,price); if (handle<hMA) { PrintFormat ( "Failed to create handle MA %s/%s, Error: %d" ,symb,sTF(tf), GetLastError ()); return ( WRONG_VALUE ); } else { if ( CopyBuffer (handle, 0 ,index, 1 ,buf)< 0 ) { PrintFormat ( "Failed to copy data from the indicator MA %s/%s, Error: %d" ,symb,sTF(tf), GetLastError ()); return ( WRONG_VALUE ); } } hMA=handle; return (buf[ 0 ]); #endif } Vitaly Muzichenko 2020.02.01 18:04 #1954 Vladimir Karputov : 그래서 여전히 모든 틱에 핸들을 생성합니다 . Styler를 사용하면 로직 구축 오류가 즉시 표시됩니다. 그렇게 double MA( string symb, ENUM_TIMEFRAMES tf, int period, int ma_shift, ENUM_MA_METHOD method, ENUM_APPLIED_PRICE price, int index) { #ifdef __MQL4__ return ( iMA (symb,tf,period,ma_shift,method,price,index)); #else double buf[ 1 ]; static int handle=- 1 ; if (handle< 0 ) { handle= iMA (symb,tf,period,ma_shift,method,price); } if (handle< 0 ) { PrintFormat ( "Failed to create handle MA %s/%s, Error: %d" ,symb,sTF(tf), GetLastError ()); return ( WRONG_VALUE ); } else { if ( CopyBuffer (handle, 0 ,index, 1 ,buf)< 0 ) { PrintFormat ( "Failed to copy data from the indicator MA %s/%s, Error: %d" ,symb,sTF(tf), GetLastError ()); return ( WRONG_VALUE ); } } return (buf[ 0 ]); #endif } 또한 나머지 피크 값 검색 코드를 크로스 플랫폼으로 작성합니다. Vladimir Karputov 2020.02.01 18:07 #1955 Vitaly Muzichenko : 그렇게 또한 나머지 피크 값 검색 코드를 크로스 플랫폼으로 작성합니다. 네 지금 요 //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ double MA( string symb, ENUM_TIMEFRAMES tf, int period, int ma_shift, ENUM_MA_METHOD method, ENUM_APPLIED_PRICE price, int index) { #ifdef __MQL4__ return ( iMA (symb,tf,period,ma_shift,method,price,index)); #else double buf[ 1 ]; static int handle=- 1 ; if (handle< 0 ) { handle= iMA (symb,tf,period,ma_shift,method,price); } if (handle< 0 ) { PrintFormat ( "Failed to create handle MA %s/%s, Error: %d" ,symb,sTF(tf), GetLastError ()); return ( WRONG_VALUE ); } else { if ( CopyBuffer (handle, 0 ,index, 1 ,buf)< 0 ) { PrintFormat ( "Failed to copy data from the indicator MA %s/%s, Error: %d" ,symb,sTF(tf), GetLastError ()); return ( WRONG_VALUE ); } } return (buf[ 0 ]); #endif } 분명히 더 좋습니다. 그러나 이 블록은 제자리에 있지 않습니다 . 핸들이 생성된 직후에 배치되어야 합니다. Vitaly Muzichenko 2020.02.01 18:12 #1956 Vladimir Karputov : 네 지금 요 분명히 더 좋습니다. 그러나 이 블록은 제자리에 있지 않습니다 . 핸들이 생성된 직후에 배치되어야 합니다. 최적의 경우 아마도 이와 같이 생성 오류를 한 번 인쇄하지만 다음 경우에 대한 검사는 더 적습니다(...) double MA( string symb, ENUM_TIMEFRAMES tf, int period, int ma_shift, ENUM_MA_METHOD method, ENUM_APPLIED_PRICE price, int index) { #ifdef __MQL4__ return ( iMA (symb,tf,period,ma_shift,method,price,index)); #else double buf[ 1 ]; static int handle=- 1 ; if (handle< 0 ) { handle= iMA (symb,tf,period,ma_shift,method,price); PrintFormat ( "Failed to create handle MA %s/%s, Error: %d" ,symb,sTF(tf), GetLastError ()); return ( WRONG_VALUE ); } else { if ( CopyBuffer (handle, 0 ,index, 1 ,buf)< 0 ) { PrintFormat ( "Failed to copy data from the indicator MA %s/%s, Error: %d" ,symb,sTF(tf), GetLastError ()); return ( WRONG_VALUE ); } } return (buf[ 0 ]); #endif } Vladimir Karputov 2020.02.01 18:17 #1957 Vitaly Muzichenko : 최적의 경우 아마도 이와 같이 생성 오류를 한 번 인쇄하지만 다음 경우에 대한 검사는 더 적습니다(...) 나는 당신의 죽에서 아무것도 볼 수 없습니다 - 모든 것이 합쳐집니다. 스타일러 를 사용하세요. Vitaly Muzichenko 2020.02.01 18:23 #1958 Vladimir Karputov : 나는 당신의 죽에서 아무것도 볼 수 없습니다 - 모든 것이 합쳐집니다. 스타일러 를 사용하세요. 그렇다면 스타일리스트에서 내 스타일을 본 것은 아니지만 오, 몇 개나 파일: cc.PNG 100 kb GlaVredFX 2020.02.01 18:51 #1959 불행히도 내 표시기는 MQL4를 기반으로 하며 이 기능은 그 중 일부에 불과합니다. 따라서 MQL5를 거기에 구현하는 것은 그다지 효율적이지 않지만 완전히 다시 작성하는 것은 길고 문제가 많습니다. Artyom Trishkin 2020.02.01 18:52 #1960 GlaVredFX : 불행히도 내 표시기는 MQL4를 기반으로 하며 이 기능은 그 중 일부에 불과합니다. 따라서 MQL5를 거기에 구현하는 것은 그다지 효율적이지 않지만 완전히 다시 작성하는 것은 길고 문제가 많습니다. 표시기는 평균 30분 만에 MQL5로 다시 작성됩니다. 커피 한잔과 함께. 1...189190191192193194195196197198199200201202203...260 새 코멘트 트레이딩 기회를 놓치고 있어요: 무료 트레이딩 앱 복사용 8,000 이상의 시그널 금융 시장 개척을 위한 경제 뉴스 등록 로그인 공백없는 라틴 문자 비밀번호가 이 이메일로 전송될 것입니다 오류 발생됨 Google으로 로그인 웹사이트 정책 및 이용약관에 동의합니다. 계정이 없으시면, 가입하십시오 MQL5.com 웹사이트에 로그인을 하기 위해 쿠키를 허용하십시오. 브라우저에서 필요한 설정을 활성화하시지 않으면, 로그인할 수 없습니다. 사용자명/비밀번호를 잊으셨습니까? Google으로 로그인
이것은 레이아웃이며 4와 5의 차이가 없습니다.
핸들은 모든 단계가 아니라 OnInit()에서 한 번만 생성되어야 합니다. 이거 아직도 모르세요?
그래서?
그래서 여전히 각 틱에 핸들을 만듭니다 . Styler를 사용하면 로직 구축 오류가 즉시 표시됩니다.
그래서 여전히 모든 틱에 핸들을 생성합니다 . Styler를 사용하면 로직 구축 오류가 즉시 표시됩니다.
그렇게
또한 나머지 피크 값 검색 코드를 크로스 플랫폼으로 작성합니다.그렇게
또한 나머지 피크 값 검색 코드를 크로스 플랫폼으로 작성합니다.네 지금 요
분명히 더 좋습니다. 그러나 이 블록은 제자리에 있지 않습니다 . 핸들이 생성된 직후에 배치되어야 합니다.
네 지금 요
분명히 더 좋습니다. 그러나 이 블록은 제자리에 있지 않습니다 . 핸들이 생성된 직후에 배치되어야 합니다.
최적의 경우 아마도 이와 같이 생성 오류를 한 번 인쇄하지만 다음 경우에 대한 검사는 더 적습니다(...)
최적의 경우 아마도 이와 같이 생성 오류를 한 번 인쇄하지만 다음 경우에 대한 검사는 더 적습니다(...)
나는 당신의 죽에서 아무것도 볼 수 없습니다 - 모든 것이 합쳐집니다.
스타일러 를 사용하세요.나는 당신의 죽에서 아무것도 볼 수 없습니다 - 모든 것이 합쳐집니다.
스타일러 를 사용하세요.그렇다면 스타일리스트에서 내 스타일을 본 것은 아니지만 오, 몇 개나
불행히도 내 표시기는 MQL4를 기반으로 하며 이 기능은 그 중 일부에 불과합니다.
따라서 MQL5를 거기에 구현하는 것은 그다지 효율적이지 않지만 완전히 다시 작성하는 것은 길고 문제가 많습니다.
불행히도 내 표시기는 MQL4를 기반으로 하며 이 기능은 그 중 일부에 불과합니다.
따라서 MQL5를 거기에 구현하는 것은 그다지 효율적이지 않지만 완전히 다시 작성하는 것은 길고 문제가 많습니다.
표시기는 평균 30분 만에 MQL5로 다시 작성됩니다. 커피 한잔과 함께.