Order Book, also known as Market Book, market depth, price glass, Level 2, is a dynamically updated table provided by a broker with data on the current volumes of trading orders for purchase and sale for various price levels near the Bid and Ask of a particular financial instrument.
MetaTrader 5 provides the ability to broadcast a glass of prices, but only in real time. This OrderBook Cumulative Indicator indicator allows you to accumulate glass data online and visualize them on a quote chart. In addition, the indicator can show the state of the glass in the past, reading data from archives created using OrderBook Recorder. The indicator is based on the OrderBook History Library, which can be integrated into any of your Expert Advisors or indicators.
- ShowHistory – flag for enabling glass viewing in the past, based on data from archive files; by default, false – the mode is turned off, and the indicator collects and shows data online;
- ShowHistoryFrom – the date from which archives are searched when ShowHistory is enabled;
- charCode – the symbol code used to display the indicator; can be any of the characters of the Wingdings font; by default -1, which means displaying numeric codes from 1 to 10 corresponding to the relative size of volumes;
- AveragingPeriod – the period of averaging the events of the glass using exponential smoothing, continuously; by default, 0, which means accumulation and averaging of the events of the glass separately on each bar; at the end of the bar, the statistics collected are no longer taken into account, and the volumes begin to average again;
- OrderBook_FileFolder – the name of the root folder where the subfolders with the cup files are located; by default, “Books” is used; each subfolder is named by the symbol name;
- OrderBook_UseCommonFiles – option to read files from the folder of the current terminal (false, by default) or from the shared folder of all terminals (true); use the shared folder to check in the local tester;
- OrderBook_TimeZoneCorrection – correction of date and time for cases when the archives of the glass are read in the terminal, where the server time zone is different from the one used when recording archives; set in seconds; for example, if the glass was saved with the server time GMT 3 and then reproduced on the server quotes with GMT 2, the correction should be equal to 1 hour (-3600 seconds), since at GMT 2 times are 1 hour behind (i.e. they are less) from GMT 3;