BuySell Pressure
<< Click to Display Table of Contents >> BuySell Pressure |
The BuySellPressure indicator displays both the current bar's buying and selling pressure as percentage values based on the categorization of trades 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).... Trades in between the market are ignored.
Note: For historical calculations, Tick Replay must be enabled |
BuySellPressure()
BuySellPressure(ISeries<double> input)
Returns buy pressure value
BuySellPressure().BuyPressure[int barsAgo]
BuySellPressure(ISeries<double> input).BuyPressure[int barsAgo]
Returns sell pressure value
BuySellPressure().SellPressure[int barsAgo]
BuySellPressure(ISeries<double> input).SellPressure[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 50% or more of the volume hit the ask or higher. 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.