BuySell Volume
<< Click to Display Table of Contents >> BuySell Volume |
The BuySellVolume indicator displays a real-time horizontal histogram of volume categorized as buy or sell trades. Trades are categorized in real-time as a buy (at the ask or above) or as a sell (at the bid or below) and then color coded .... Trades in between the market are ignored.
Note: For historical calculations, Tick Replay must be enabled |
BuySellVolume()
BuySellVolume(ISeries<double> input)
Returns buy volume
BuySellVolume().Buys[int barsAgo]
BuySellVolume(ISeries<double> input).Buys[int barsAgo]
Returns sell volume
BuySellVolume().Sells[int barsAgo]
BuySellVolume(ISeries<double> input).Sells[int barsAgo]
double; Accessing this method via an index value [int barsAgo] returns the indicator value of the referenced bar.
input |
Indicator source data (?) |
protected override void OnStateChange() |
Tip: Since this indicator operates in a real-time environment, remember to check for State.Realtime, or enable Tick Replay on the associated Data Series. In the above example we check that 5,000 or more of the volume hit the bid or lower. Our statement checks if the data is being calculated on historical data first, if true, we enter long, if not true (live), the the statement then checks for the Buy Volume condition. |
You can view this indicator method source code by selecting the menu New > NinjaScript Editor > Indicators within the NinjaTrader Control Center window.