prostotrader :
재현 가능한 코드를 제공하십시오. 아침에 실생활에서 실행하겠습니다.
예전에는 없었는데 오늘(진짜) 나타났다.
그것은 무엇입니까?
Karputov Vladimir :
재현 가능한 코드를 제공하십시오. 아침에 실생활에서 실행하겠습니다.
코드가 없습니다(위는 어드바이저가 아닌 터미널의 로그입니다). 이러한 기호는 Market Watch에 추가될 뿐입니다.
재현 가능한 코드를 제공하십시오. 아침에 실생활에서 실행하겠습니다.
prostotrader :
코드가 없습니다(위는 어드바이저가 아닌 터미널의 로그입니다). 이러한 기호는 Market Watch에 추가될 뿐입니다.
추가되었습니다. 터미널의 "저널" 탭에는 오류가 없습니다. 그리고 아무도 유리로 향하지 않습니까?
코드가 없습니다(위는 어드바이저가 아닌 터미널의 로그입니다). 이러한 기호는 Market Watch에 추가될 뿐입니다.
Karputov Vladimir :
추가되었습니다. 터미널의 "저널" 탭에는 오류가 없습니다. 그리고 아무도 유리로 향하지 않습니까?
추가되었습니다. 터미널의 "저널" 탭에는 오류가 없습니다. 그리고 아무도 유리로 향하지 않습니까?
물론 안경에 대한 언급이 있지만 항상 효과가 있었지만 오늘날에는 그렇지 않습니다.
//+------------------------------------------------------------------+ //| Test.mq5 | //| Copyright 2016 | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2016" #property link "https://www.mql5.com" #property version "1.00" //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit () { //--- //--- return ( INIT_SUCCEEDED ); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit ( const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert Get Stakan values function | //+------------------------------------------------------------------+ bool GetBookValues( const string a_symbol, double &sell_price, double &buy_price, long &sell_vol, long &buy_vol) { MqlBookInfo book_price[]; if ( MarketBookGet (a_symbol,book_price)) { int size= ArraySize (book_price); //--- if (size> 0 ) { return ( true ); } } return ( false ); } //+------------------------------------------------------------------+ //| BookEvent function | //+------------------------------------------------------------------+ void OnBookEvent ( const string &symbol) { if (symbol== Symbol ()) { double ask,bid; long ask_volume, bid_volume; if (GetBookValues( Symbol (),ask,bid,ask_volume,bid_volume)) { } } } //+------------------------------------------------------------------+
주문서로 작업할 때 MarketBookAdd 및 MarketBookRelease 를 사용해야 합니다.
Karputov Vladimir :
주문서 작업 시 반드시 MarketBookAdd 및 MarketBookRelease를 사용하십시오.
주문서 작업 시 반드시 MarketBookAdd 및 MarketBookRelease를 사용하십시오.
재미 없다.
prostotrader :
습한 느낌이 강해집니다.
MT5가 잘못되었다는 것이 분명합니다 :(
빌드 1401. 틱은 이미 약 2분 동안 실행 중이며 "로그" 탭에 실제로 오류가 쏟아지고 있습니다.
2016.09 . 07 10 : 02 : 02.578 Books invalid book transaction [CHMF- 9.16 ,buy, 72914.00000 , 1 ][buys: 21 , sells: 15 , depth: 20 ] 2016.09 . 07 10 : 02 : 07.574 Books invalid book transaction [UCAD- 9.16 ,buy, 1.28380 ,- 1000 ][buys: 6 , sells: 24 , depth: 20 ] 2016.09 . 07 10 : 02 : 13.985 Books invalid book transaction [TATN- 12.16 ,buy, 30700.00000 , 0 ][buys: 21 , sells: 16 , depth: 20 ] 2016.09 . 07 10 : 02 : 39.871 Books invalid book transaction [UCAD- 9.16 ,buy, 1.28400 , 0 ][buys: 5 , sells: 24 , depth: 20 ] 2016.09 . 07 10 : 03 : 02.312 Books invalid book transaction [Eu- 12.16 ,buy, 74370.00000 , 200 ][buys: 25 , sells: 0 , depth: 20 ] 2016.09 . 07 10 : 03 : 10.312 Books invalid book transaction [UCAD- 9.16 ,sell, 1.28420 , 0 ][buys: 7 , sells: 23 , depth: 20 ] 2016.09 . 07 10 : 03 : 25.909 Books invalid book transaction [CHMF- 9.16 ,sell, 78210.00000 , 0 ][buys: 21 , sells: 14 , depth: 20 ] 2016.09 . 07 10 : 03 : 41.357 Books invalid book transaction [UCAD- 9.16 ,buy, 1.28420 , 1000 ][buys: 6 , sells: 24 , depth: 20 ] 2016.09 . 07 10 : 04 : 13.790 Books invalid book transaction [UCAD- 9.16 ,sell, 1.28440 , 0 ][buys: 6 , sells: 23 , depth: 20 ] 2016.09 . 07 10 : 04 : 44.597 Books invalid book transaction [UCAD- 9.16 ,sell, 1.28430 , 0 ][buys: 6 , sells: 23 , depth: 20 ] 2016.09 . 07 10 : 05 : 20.347 Books invalid book transaction [Eu- 12.16 ,sell, 76007.00000 , 0 ][buys: 25 , sells: 0 , depth: 20 ] 2016.09 . 07 10 : 05 : 21.065 Books invalid book transaction [UCAD- 9.16 ,sell, 1.28430 , 0 ][buys: 6 , sells: 22 , depth: 20 ]
확인 코드:
//+------------------------------------------------------------------+ //| Test.mq5 | //| Copyright 2016, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2016, MetaQuotes Software Corp." #property link "https://www.mql5.com" #property version "1.00" //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit () { //--- if (! MarketBookAdd ( Symbol ())) { Print ( "Error MarketBookAdd " , Symbol ()); return ( INIT_FAILED ); } //--- return ( INIT_SUCCEEDED ); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit ( const int reason) { //--- if (! MarketBookRelease ( Symbol ())) Print ( "Error MarketBookRelease " , Symbol ()); } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick () { //--- } //+------------------------------------------------------------------+ //| BookEvent function | //+------------------------------------------------------------------+ void OnBookEvent ( const string &symbol) { //--- if (symbol== Symbol ()) { double ask,bid; long ask_volume,bid_volume; if (GetBookValues( Symbol (),ask,bid,ask_volume,bid_volume)) { } } } //+------------------------------------------------------------------+ //| Expert Get Stakan values function | //+------------------------------------------------------------------+ bool GetBookValues( const string a_symbol, double &sell_price, double &buy_price, long &sell_vol, long &buy_vol) { MqlBookInfo book_price[]; if ( MarketBookGet (a_symbol,book_price)) { int size= ArraySize (book_price); //--- if (size> 0 ) { for ( int i= 0 ;i<size;i++) { Comment ( IntegerToString (i)+ ":" , DoubleToString (book_price[i].price, Digits ()) + " Volume= " + DoubleToString (book_price[i].volume, Digits ()), " type = " , EnumToString (book_price[i].type)); } return ( true ); } } return ( false ); } //+------------------------------------------------------------------+
추가됨:
"RTS-9.16"에 따르면 이러한 오류가 없습니다.
파일:
Test.mq5
3 kb
예전에는 없었는데 오늘(진짜) 나타났다.
그것은 무엇입니까?