ask_Cumulative = e.MarketDepth.Ask.TotalVolume(5);
bid_Cumulative = e.MarketDepth.Bid.TotalVolume(5);
I found this indicator over on elitetrader and have been changing it around quite a bit to practice my programming, it's a bit cluncky (now) :-) as it misses plotting the smallest value on some bars on small/quick time frames less like than 1minute and it needs to be set on Calculate On Bar Close = TRUE (default setting anyway) but it shows cumulative Average, Peak and Smallest for the bar.
I made other versions to show other levers like just level 2 and 3 with.
ask_Cumulative = e.MarketDepth.Ask.TotalVolume(3) - e.MarketDepth.Ask.TotalVolume(1);
Maybe it will give you/someone some ideas.
Charts are Non-Farm Employment Change, notice the order book dry up on all levels, now you have an idea why price can whip around so violently.
.
Comment