Specifically, all price levels in a bar could be gathered for use by adding each price from high to low in a List<double>, then foreach (double price in List<double>) {GetTotalVolumeForPrice(price)}. At this point, the price and volume can be group as KeyValuePair<double, double>. These can then be added to a Dictionary<double, double>, or perhaps more usefully a List< KeyValuePair<double, double>>, so the pairs can be ordered by price, thus allowing the indexing of the list to correspond to the relative high/low relationship of the prices.
From this point, you can find the POC by grabbing the Key (price) with the highest Value (volume). It takes a bit more work to recreate the value area, but it can be done from the noted list.
Is there any reason this won’t work?
As long as the above approach works, then NinjaTrader should be more than adequate for my volume profile dependent development needs, while still using documented properties and methods.
Thanks!
Comment