Quantidade de níveis no DOM/Book
Esse é o código utilizado pra verificar isso rapidamente. Ao anexar ao gráfico ele imprime as informações e remove o EA como se fosse um script.
//+------------------------------------------------------------------+ //| TestOnderBook.mq5 | //| Copyright 2025, Samuel Manoel De Souza | //| https://www.mql5.com/en/users/samuelmnl | //+------------------------------------------------------------------+ #property copyright "Copyright 2025, Samuel Manoel De Souza" #property link "https://www.mql5.com/en/users/samuelmnl" #property version "1.00" //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ int OnInit(void) { MarketBookAdd(_Symbol); return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { MarketBookRelease(_Symbol); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void OnTick(void) { } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void OnBookEvent(const string& symbol) { double tick_size = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_SIZE); MqlBookInfo book[]; MarketBookGet(_Symbol, book); int total = ArraySize(book); if(total == 0) { Print("there is no order available on the book"); ExpertRemove(); return; } int buy_levels = 0, sell_levels = 0; int buy_gaps = 0, sell_gaps = 0, gaps = 0; for(int i = 0; i < total; i++) { Print("price: ", book[i].price, ", volume: ", book[i].volume, ", type: ", EnumToString(book[i].type)); buy_levels += book[i].type == BOOK_TYPE_BUY ? 1 : 0; sell_levels += book[i].type == BOOK_TYPE_SELL ? 1 : 0; if(i > 0) { bool is_gap = fabs(book[i].price - book[i - 1].price) >= 2 * tick_size; gaps += is_gap ? 1 : 0; buy_gaps += is_gap && book[i].type == book[i - 1].type && book[i].type == BOOK_TYPE_BUY ? 1 : 0; sell_gaps += is_gap && book[i].type == book[i - 1].type && book[i].type == BOOK_TYPE_SELL ? 1 : 0; } } Print("max levels: ", SymbolInfoInteger(_Symbol, SYMBOL_TICKS_BOOKDEPTH)); Print("levels: ", total); Print("buy levels: ", buy_levels); Print("sell levels: ", sell_levels); Print("gaps: ", gaps); Print("buy gaps: ", buy_gaps); Print("sell gap: ", sell_gaps); ExpertRemove(); }
Além da diferença entre corretoras, tem diferença dentro da própria corretora. Na genial por exemplo consigo ver 32 níveis em WIN e apenas 10 em WDO e ações.
Estou tentando identificar quais corretoras disponibilizam mais níveis no book de ofertas.
Alguém já teve essa curiosidade, ou se tem conta em outra corretora pedia compartilhar essa informação?
Se tiver essa informação sobre o mercado internacional seria ótimo também.