access center price of DOM from code?
access center price of DOM from code?
In MultiCharts.net, is there a way to query the center price of the DOM? Such a method would need to account for the case when the user has interactively re-centered the DOM. An indirect method such as a query to determine the high or the low of the DOM might be useful too. Perhaps it could be based on the size of its array, similar to what is already implemented for the bid and the ask but not limited by the size of market depth which may not match the top or bottom of the DOM. I am envisioning a use case where an external spreadsheet displays support and resistance on a series of rows and columns as might be found in Excel. The center price on the spreadsheet needs to shift up or down to match the current center price of the DOM in order to establish visual alignment between the spreadsheet display and what is visible on the DOM at any given moment.
- Kate MultiCharts
- Posts: 598
- Joined: 21 Oct 2020
- Has thanked: 9 times
- Been thanked: 149 times
Re: access center price of DOM from code?
Hello kh_model,
There's a pre-built --- Market Depth on Chart --- indicator that has open source code.
You can plot a chart, connect a broker profile and apply this indicator.
If the connection is successful, the indicator will receive market depth data and display the DOM price levels.
Using your logic you can get the required price level.
There's a pre-built --- Market Depth on Chart --- indicator that has open source code.
You can plot a chart, connect a broker profile and apply this indicator.
If the connection is successful, the indicator will receive market depth data and display the DOM price levels.
Using your logic you can get the required price level.