Support Board
Date/Time: Tue, 26 Nov 2024 17:21:09 +0000
Post From: DOM Values Coding Help
[2023-11-09 19:45:05] |
Hofmeister - Posts: 27 |
Hello, there are a few pieces of information I'm trying to extract from the DOM. 1) I'd like to see the entire pulling and stacking values at once which I can already do. Along with that, I'd like to see pulling and stacking values limited to a given range. Could any describe how to loop though a given range of levels to sum up the pulling and stacking value on both the ask and bid within that given range? This is the current example code I'm trying to modify: for (int Level = 0; Level < AskArrayLevels; Level++) { int OutputIndex = sc.ArraySize - 1 - Level; s_MarketDepthEntry DepthEntry; sc.GetAskMarketDepthEntryAtLevel(DepthEntry, Level); Subgraph_AskSize[OutputIndex] = static_cast<float>(DepthEntry.Quantity); Subgraph_AskValue[OutputIndex] = DepthEntry.AdjustedPrice; float StackPullValue = static_cast<float>(sc.GetAskMarketDepthStackPullValueAtPrice(DepthEntry.AdjustedPrice)); Subgraph_AskStackPullValue[OutputIndex] = StackPullValue; } 2) Its kind of the same question but I'd also like to have a running total of all the limit bid and offers too. I know you have to loop through the Levels using sc.GetAskMarketDepthNumberOfLevels I just cant figure out how to make it work. Any help would be greatly appreciated! Thank you |