Support Board
Date/Time: Thu, 28 Nov 2024 10:45:27 +0000
Post From: Custom Study access to Historical Market Depth
[2023-04-28 16:04:20] |
sola5180 - Posts: 13 |
Hi, Is it possible to get Market Depth data (specifically, pull/stack) not just by price (on the latest bar) but on past bars? I am developing a simple Custom Study that plots the Pull/Stack imbalance as a zero-referenced difference. However, I'm never able to see any data prior to current activity. When running a replay, I am able to generate historical plots which leads me to believe there is a way to generate it programatically. Current code: double sumB; double sumA; double avg; sumA = sc.GetAskMarketDepthStackPullSum(); sumB = sc.GetBidMarketDepthStackPullSum(); avg = (sumA + sumB) / 2; sumA = sumA - avg; sumB = sumB - avg; int start = sc.Index; Bid.Data[start] = sumB ; Ask.Data[start] = sumA ; BidL.Data[start] = sumB ; AskL.Data[start] = sumA ; Thanks Date Time Of Last Edit: 2023-04-28 16:05:28
|