요새. 실행 질문 - 페이지 62

 

좋은 오후에요 여러분!

나는 약간 다른 상황이 있습니다. 브로커 BCS. 시장가 주문은 처음 실행되지 않습니다.

시장에서 구매 주문을 보냅니다. 이 함수는 "주문 완료"와 주문 번호를 반환하지만 주문은 실제로 실행되지 않습니다!

그래서 로봇은 많은 시도를 합니다. 시장에 매수 주문을 보내고 성공적인 응답을 받았지만 거래는 하지 않았습니다. 동시에 응답의 주문 번호는 매번 새 것입니다.

결과적으로, 포지션은 조만간 열릴 것이지만, 당신은 분명히 잘못된 주문으로 브로커에게 폭격을 가해야 합니다.

도와주세요. 제 로봇이 버그인지 아니면 브로커가 엉망인지 모르겠습니다. 로봇에 대한 불만은 없으며 모든 검증 기능이 예상대로 진행되고 답변이 확인됩니다.

중개인이 전화했지만 "컨설턴트"는 손으로 거래가 열리면 로봇에 오류가 있는 것처럼 어깨를 으쓱했습니다. 하지만 여기에서는 영업을 하지 않습니다.

 2015.12 . 23 11 : 02 : 00.053 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 55 ms
2015.12 . 23 11 : 02 : 00.006 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 59.554 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 59.507 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 59.413 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 116 ms
2015.12 . 23 11 : 01 : 59.304 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 59.117 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 59.055 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 58.774 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 54 ms
2015.12 . 23 11 : 01 : 58.711 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 58.680 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 58.633 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 58.259 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 74 ms
2015.12 . 23 11 : 01 : 58.181 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 57.916 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 57.869 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 57.775 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 57.729 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 57.682 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 57.619 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 57.557 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 57.510 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 57.385 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 57.323 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 57.292 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 57.245 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 57.058 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 63 ms
2015.12 . 23 11 : 01 : 56.995 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 56.777 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 56.730 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 56.481 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 56.434 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 56.169 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 56.122 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 56.075 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 56.028 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 55.451 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 55.389 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 55.326 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 55.279 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 55.155 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 55.092 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 55.045 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 54 ms
2015.12 . 23 11 : 01 : 54.983 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 54.983 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 54.921 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 54.843 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 54.796 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 54.655 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 54.609 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 54.546 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 54.484 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 54.453 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 151 ms
2015.12 . 23 11 : 01 : 54.297 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 53.844 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 53.797 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 53.751 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 53.688 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 53.423 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 53.376 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 53.361 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 60 ms
2015.12 . 23 11 : 01 : 53.298 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 53.283 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 53.236 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 53.142 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 53.080 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 53.033 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 52.986 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 52.877 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 52.830 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 52.830 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 69 ms
2015.12 . 23 11 : 01 : 52.752 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 52.643 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 52.596 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 52.487 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 52.440 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 52.425 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 52.378 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 52.081 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 55 ms
2015.12 . 23 11 : 01 : 52.019 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 51.988 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 51.941 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 51.879 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 51 ms
2015.12 . 23 11 : 01 : 51.832 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 51.364 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 51.317 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 51.223 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 51.161 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 51.114 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 51.052 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 50.989 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 50.943 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 50.693 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 50.631 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 50.584 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 50.521 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 50.475 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 50.412 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 50.397 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 50.350 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 50.225 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 53 ms
2015.12 . 23 11 : 01 : 50.178 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 50.147 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 50.100 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 50.053 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 49.991 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 49.975 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 52 ms
2015.12 . 23 11 : 01 : 49.913 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
2015.12 . 23 11 : 01 : 49.866 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487 placed for execution in 51 ms
2015.12 . 23 11 : 01 : 49.804 Trades   'xxxxxxx' : exchange buy 66.00 Si- 3.16 at market sl: 72487
 
Сергей :

좋은 오후에요 여러분!

나는 약간 다른 상황이 있습니다. 브로커 BCS. 시장가 주문은 처음 실행되지 않습니다.

시장에서 구매 주문을 보냅니다. 이 함수는 "주문 완료"와 주문 번호를 반환하지만 주문은 실제로 실행되지 않습니다!

그래서 로봇은 많은 시도를 합니다. 시장에 매수 주문을 보내고 성공적인 응답을 받았지만 거래는 하지 않았습니다. 동시에 응답의 주문 번호는 매번 새 것입니다.

결과적으로, 포지션은 조만간 열릴 것이지만, 당신은 분명히 잘못된 주문으로 브로커에게 폭격을 가해야 합니다.

도와주세요. 제 로봇이 버그인지 아니면 브로커가 엉망인지 모르겠습니다. 로봇에 대한 불만은 없으며 모든 검증 기능이 예상대로 진행되고 답변이 확인됩니다.

브로커가 전화했지만 "컨설턴트"는 손으로 거래를 열면 로봇에 오류가 있지만 여기에서는 비즈니스가 아닌 것처럼 어깨를 으쓱했습니다.

세르게이!

코드를 보지 않고는 아무 말도 하기 어렵습니다.

그러나 인쇄물로 판단하면 주문 배치를 올바르게 제어하지 못합니다.

 
Михаил :

세르게이!

코드를 보지 않고는 아무 말도 하기 어렵습니다.

그러나 인쇄물로 판단하면 주문 배치를 올바르게 제어하지 못합니다.


Michael, 이것은 터미널 로그입니다. 주문을 수락하고 올바르게 채워졌다고 말하며 성공 코드와 주문 번호를 반환합니다. 그는 주문을 실행 대기열에 넣지만 실행하지는 않습니다. 그리고 너무 많이, 여러 번.

하지만 무슨 일이 일어나고 있는지 알아낸 것 같습니다.

알고리즘에 따르면 허용된 위험을 통해 전체 예금에 대한 거래를 열 수 있습니다. 거래량 = 가용 자금 / GO, 즉 보증금은 거의 마지막 페니까지 사용됩니다. (물론 이것은 실수이므로 할 수 없습니다.)

공식적으로는 이 볼륨으로 거래를 시작하기에 충분한 돈이 있으므로 주문은 터미널의 확인을 통과하고 MT5 코어에서 수락됩니다( OrderSend 함수 는 true 및 주문 번호를 반환함).

그러나 실행 대기열에서(브로커에서 또는 교환기가 있는 게이트웨이에서) 어딘가에서 거부되고 결과적으로 실행되지 않습니다. 여기 어딘가에 Metaquotes의 MT5 결함이 있습니다.

문제는 내가 클라이언트로서 어떤 식으로든 이에 대한 정보를 받지 못한다는 것입니다. 로봇에게는 모든 것이 잘 되었지만 실제로는 브로커/게이트웨이/거래소에서 주문을 거부했습니다(여기에서는 추측만 가능).


OrderSend 함수는 주문을 거부하고 로봇에 오류 코드 TRADE_RETCODE_NO_MONEY 를 반환해야 합니다. 그러나 웬일인지 그것은 일어나지 않았다.

분명히 우리는 OnTradeTransaction 거래의 진행 상황을 자세히 추적해야 합니다 .

 
Сергей :


Michael, 이것은 터미널 로그입니다. 주문을 수락하고 올바르게 채워졌다고 말하며 성공 코드와 주문 번호를 반환합니다. 그는 주문을 실행 대기열에 넣지만 실행하지는 않습니다. 그리고 너무 많이, 여러 번.

하지만 무슨 일이 일어나고 있는지 알아낸 것 같습니다.

알고리즘에 따르면 허용된 위험을 통해 전체 예금에 대한 거래를 열 수 있습니다. 거래량 = 가용 자금 / GO, 즉 보증금은 거의 마지막 페니까지 사용됩니다. (물론 이것은 실수이므로 할 수 없습니다.)

공식적으로는 이 볼륨으로 거래를 시작하기에 충분한 돈이 있으므로 주문은 터미널의 확인을 통과하고 MT5 코어에서 수락됩니다( OrderSend 함수 는 true 및 주문 번호를 반환함).

그러나 실행 대기열에서(브로커에서 또는 교환기가 있는 게이트웨이에서) 어딘가에서 거부되고 결과적으로 실행되지 않습니다. 여기 어딘가에 Metaquotes의 MT5 결함이 있습니다.

문제는 내가 클라이언트로서 어떤 식으로든 이에 대한 정보를 받지 못한다는 것입니다. 로봇에게는 모든 것이 잘 되었지만 실제로는 브로커/게이트웨이/거래소에서 주문을 거부했습니다(여기에서는 추측만 가능).


OrderSend 함수는 주문을 거부하고 오류 코드 TRADE_RETCODE_NO_MONEY 를 로봇에 반환해야 했습니다. 그러나 웬일인지 그것은 일어나지 않았다.

귀하가 주문 배치를 올바르게 제어하지 못한다는 점을 다시 한 번 말씀드립니다.

TICKET 주문을 받았다고 해서 해당 주문이 증권 거래소에 상장되는 것은 아닙니다!

 
Михаил :

귀하가 주문 배치를 올바르게 제어하지 못한다는 점을 다시 한 번 말씀드립니다.

TICKET 주문을 받았다고 해서 해당 주문이 증권 거래소에 상장되는 것은 아닙니다!

나는 이 문제에 대한 지식의 격차가 있다는 사실에 동의합니다.

그 전에는 그런 행동을 겪지 않고 그냥 마켓에 보냈더니 항상 열리거나 바로 오류가 나더군요.

일반적으로 대기열에서 주문 실행 의 낮은 수준의 뉘앙스를 탐구할 필요가 없었습니다. 그리고 여기...

 
Сергей :

나는 이 문제에 대한 지식의 격차가 있다는 사실에 동의합니다.

그 전에는 그런 행동을 겪지 않고 그냥 마켓에 보냈더니 항상 열리거나 바로 오류가 나더군요.

일반적으로 대기열에서 주문 실행 의 낮은 수준의 뉘앙스를 탐구할 필요가 없었습니다. 그리고 여기...

주문을 받은 후 OrderRealSelect() 함수를 사용하십시오.

https://www.mql5.com/en/forum/67298/page2#comment_2089220

ФОРТС: В помощь начинающим
ФОРТС: В помощь начинающим
  • www.mql5.com
Установка отложенного ордера командой OrderSend(). - Страница 2 - Категория: биржевой трейдинг
 

대략 이렇습니다.

 //+------------------------------------------------------------------+
//|                                                   Test_array.mq5 |
//|                                          Copyright 2015, Mikalas |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2015, Mikalas"
#property link        "https://www.mql5.com"
#property version    "1.00"
//
#define ERR_ZERO_TICKET - 1
//
enum ENUM_ORD_REAL_STATE
{
  ORD_NOT_SPECIFIED         = 0 , //Состояние ордера не определено
  ORD_NONE_CANCELED         = 1 , //Ордера нет, отменён пользователем
  ORD_NONE_PARTIAL_CANCELED = 2 , //Ордера нет, исполнился частично (не был залит вторым объёмом)
  ORD_NONE_PARTIAL          = 3 , //Ордера нет, исполнился частично
  ORD_NONE_EXPIRED          = 4 , //Ордера нет, удалён по сроку
  ORD_NONE_FILLED           = 5 , //Ордера нет, исполнился полностью
  ORD_NONE_REJECTED         = 6 , //Ордера нет, отклонён брокером(биржей)
  ORD_BUSY                  = 7 , //Ордер находится в переходном состоянии
  ORD_EXIST                 = 8 , //Ордер выставлен на биржу, возможны действия над ним
  ORD_EXIST_PARTIAL         = 9    //Ордер выставлен на биржу, частично исполнился, возможны действия над ним
};
enum ENUM_ORD_SELECT
{
  SELECT_ERROR = 0 ,
  SELECT_FALSE = 1 ,
  SELECT_TRUE  = 2 ,
  SELECT_BUSY  = 3
};
//
struct ORDER_DATA
{
   int                      error_code;
   datetime                 time_setup;
   ENUM_ORDER_TYPE          type;
   ENUM_ORDER_STATE         state;
  ENUM_ORD_REAL_STATE     real_state;
   datetime                 expiration;
   datetime                 time_done;
   long                     t_set_msc;
   long                     t_done_msc; 
   ENUM_ORDER_TYPE_FILLING type_filling;
   ENUM_ORDER_TYPE_TIME     type_time;
   long                     magic;
   long                     pos_id;
   double                   vol_init;
   double                   vol_cur;
   double                   price_open;
   double                   sl;
   double                   tp;
   double                   price_cur;
   double                   price_stlim;
   string                   symbol;
   string                   comment;      
};
//
//
ulong order_ticket;
//
//+------------------------------------------------------------------+
// Expert Order Real Select function                                 |
//+------------------------------------------------------------------+
ENUM_ORD_SELECT OrderRealSelect( const ulong ticket, ORDER_DATA &ord_data, const bool get_data )
{
   double init_vol = 0 ;
   double cur_vol = 0 ;
   ZeroMemory ( ord_data );
  ord_data.real_state = ORD_NOT_SPECIFIED;
  ord_data.error_code = ERR_SUCCESS ;
   ResetLastError ();
//---  
   if ( ticket > 0 )
  {
     if ( HistoryOrderSelect ( ticket ) )
    {
       if ( get_data )
      {
        ord_data.comment = HistoryOrderGetString ( ticket, ORDER_COMMENT );
        ord_data.expiration = datetime ( HistoryOrderGetInteger ( ticket, ORDER_TIME_EXPIRATION ) ); 
        ord_data.magic = HistoryOrderGetInteger ( ticket, ORDER_MAGIC );
        ord_data.pos_id = HistoryOrderGetInteger ( ticket, ORDER_POSITION_ID );
        ord_data.price_cur = HistoryOrderGetDouble ( ticket, ORDER_PRICE_CURRENT );
        ord_data.price_open = HistoryOrderGetDouble ( ticket, ORDER_PRICE_OPEN );
        ord_data.price_stlim = HistoryOrderGetDouble ( ticket, ORDER_PRICE_STOPLIMIT );
        ord_data.sl = HistoryOrderGetDouble ( ticket, ORDER_SL );
        ord_data.state = ENUM_ORDER_STATE ( HistoryOrderGetInteger ( ticket, ORDER_STATE ) );
        ord_data.symbol = HistoryOrderGetString ( ticket, ORDER_SYMBOL );
        ord_data.t_done_msc = datetime ( HistoryOrderGetInteger ( ticket, ORDER_TIME_DONE_MSC ) );
        ord_data.t_set_msc = datetime ( HistoryOrderGetInteger ( ticket, ORDER_TIME_SETUP_MSC ) );
        ord_data.time_done = datetime ( HistoryOrderGetInteger ( ticket, ORDER_TIME_DONE ) );
        ord_data.time_setup = datetime ( HistoryOrderGetInteger ( ticket, ORDER_TIME_SETUP ) );
        ord_data.tp = HistoryOrderGetDouble ( ticket, ORDER_TP );
        ord_data.type = ENUM_ORDER_TYPE ( HistoryOrderGetInteger ( ticket, ORDER_TYPE ) );
        ord_data.type_filling = ENUM_ORDER_TYPE_FILLING ( HistoryOrderGetInteger ( ticket, ORDER_TYPE_FILLING ) );
        ord_data.type_time = ENUM_ORDER_TYPE_TIME ( HistoryOrderGetInteger ( ticket, ORDER_TYPE_TIME ) );
        ord_data.vol_cur = HistoryOrderGetDouble ( ticket, ORDER_VOLUME_CURRENT );
        ord_data.vol_init = HistoryOrderGetDouble ( ticket, ORDER_VOLUME_INITIAL );
      }
       else
      {
        ord_data.state = ENUM_ORDER_STATE ( HistoryOrderGetInteger ( ticket, ORDER_STATE ) );
        cur_vol = HistoryOrderGetDouble ( ticket, ORDER_VOLUME_CURRENT );
        init_vol = HistoryOrderGetDouble ( ticket, ORDER_VOLUME_INITIAL );
      }   
//---
       switch ( ord_data.state )
      { 
         case ORDER_STATE_CANCELED : if ( get_data )
                                   {
                                     if ( ord_data.vol_init == ord_data.vol_cur )
                                     {
                                       ord_data.real_state = ORD_NONE_CANCELED;
                                     }
                                     else
                                     {
                                       ord_data.real_state = ORD_NONE_PARTIAL_CANCELED;
                                     }
                                   }
                                   else
                                   {
                                     if ( init_vol == cur_vol )
                                     {
                                       ord_data.real_state = ORD_NONE_CANCELED;
                                     }
                                     else
                                     {
                                       ord_data.real_state = ORD_NONE_PARTIAL_CANCELED;
                                     }
                                   }    
                                   break ;
                                        
         case ORDER_STATE_PARTIAL :  ord_data.real_state = ORD_NONE_PARTIAL;
                                   break ;
                                         
         case ORDER_STATE_EXPIRED :  ord_data.real_state = ORD_NONE_EXPIRED;
                                   break ;
                                                                              
         case ORDER_STATE_FILLED :   ord_data.real_state = ORD_NONE_FILLED;
                                   break ;
                                         
         case ORDER_STATE_REJECTED : ord_data.real_state = ORD_NONE_REJECTED;
                                   break ;  
      }
    }
     else
     if ( OrderSelect ( ticket ) )
    {
       if ( get_data )
      {
        ord_data.comment = OrderGetString ( ORDER_COMMENT );
        ord_data.expiration = datetime ( OrderGetInteger ( ORDER_TIME_EXPIRATION ) ); 
        ord_data.magic = OrderGetInteger ( ORDER_MAGIC );
        ord_data.pos_id = OrderGetInteger ( ORDER_POSITION_ID );
        ord_data.price_cur = OrderGetDouble ( ORDER_PRICE_CURRENT );
        ord_data.price_open = OrderGetDouble ( ORDER_PRICE_OPEN );
        ord_data.price_stlim = OrderGetDouble ( ORDER_PRICE_STOPLIMIT );
        ord_data.sl = OrderGetDouble ( ORDER_SL );
        ord_data.state = ENUM_ORDER_STATE ( OrderGetInteger ( ORDER_STATE ) );
        ord_data.symbol = OrderGetString ( ORDER_SYMBOL );
        ord_data.t_done_msc = datetime ( OrderGetInteger ( ORDER_TIME_DONE_MSC ) );
        ord_data.t_set_msc = datetime ( OrderGetInteger ( ORDER_TIME_SETUP_MSC ) );
        ord_data.time_done = datetime ( OrderGetInteger ( ORDER_TIME_DONE ) );
        ord_data.time_setup = datetime ( OrderGetInteger ( ORDER_TIME_SETUP ) );
        ord_data.tp = OrderGetDouble ( ORDER_TP );
        ord_data.type = ENUM_ORDER_TYPE ( OrderGetInteger ( ORDER_TYPE ) );
        ord_data.type_filling = ENUM_ORDER_TYPE_FILLING ( OrderGetInteger ( ORDER_TYPE_FILLING ) );
        ord_data.type_time = ENUM_ORDER_TYPE_TIME ( OrderGetInteger ( ORDER_TYPE_TIME ) );
        ord_data.vol_cur = OrderGetDouble ( ORDER_VOLUME_CURRENT );
        ord_data.vol_init = OrderGetDouble ( ORDER_VOLUME_INITIAL );
      }
       else
      {
        ord_data.state = ENUM_ORDER_STATE ( OrderGetInteger ( ORDER_STATE ) );
      }
//--- 
       switch ( ord_data.state )
      { 
         case ORDER_STATE_STARTED :
         case ORDER_STATE_REQUEST_ADD :
         case ORDER_STATE_REQUEST_MODIFY :
         case ORDER_STATE_REQUEST_CANCEL : ord_data.real_state = ORD_BUSY;
                                         break ; 
 
         case ORDER_STATE_PARTIAL :        ord_data.real_state = ORD_EXIST_PARTIAL;
                                         break ;
                                          
         case ORDER_STATE_PLACED :         ord_data.real_state = ORD_EXIST;
                                         break ;
      }
    }
     else
    {
      ord_data.error_code = GetLastError ();
    }  
//---   
     if ( ( ord_data.error_code != ERR_SUCCESS ) ||
       ( ord_data.real_state == ORD_NOT_SPECIFIED ) )
    {
       return ( SELECT_ERROR );
    }
     else
    {
       switch ( ord_data.real_state )
      {
         case ORD_BUSY:           return ( SELECT_BUSY );
                                 break ;
                        
         case ORD_EXIST:   
         case ORD_EXIST_PARTIAL: return ( SELECT_TRUE );
                                 break ;
                              
         default :                 return ( SELECT_FALSE );
                                 break ;                                             
      }
    }
  } 
   else
  {
    ord_data.error_code = ERR_ZERO_TICKET; 
     return ( SELECT_ERROR );
  }
}
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit ()
{
   return ( INIT_SUCCEEDED );
}
//
void OnTick ()
{
   if ( PositionSelect ( _Symbol ) )
  {
     //Позиция открыта, ордер исполнился
  }
   else
  {
     if ( order_ticket > 0 )
    {
       //Проверяем что с ордером
      ORDER_DATA order_data;
      ENUM_ORD_SELECT ord_select = OrderRealSelect( order_ticket, order_data, true );
       switch ( ord_select )
      {
         case SELECT_BUSY:   //Ничего не делаем, ордер в переходном состоянии
                           break ;
        
         case SELECT_FALSE: //Ордера нет .... Проверяем, что с ним произошло
                           break ;
                           
         case SELECT_TRUE: //Ордер есть.... Проверяем почему есть, а не исполнился
                           break ; 
                           
         case SELECT_ERROR: //Проверяем что за ошибка
                           break ;                                                             
      }
    }
     else
    {
       //Позиции нет, ордера нет. Устанавливаем ордер
    }
  }
}
 
 
Михаил :

대략 이렇습니다.

마이클, 감사합니다! 매우 유용한 기능입니다.
 
이 스레드가 시작된지 1년이 되었습니다....
 

Aitugan, 아마도 몇 가지 의견이있을 것입니까? :((

물론 나는 키프로스에서의 휴가에서 당신을 산만하게하고 싶지 않다는 것을 이해하지만 어쨌든 침묵이 음란하게 오래 지속되었습니다. :((