NinjaScript > Language Reference > Indicator Methods >

Balance of Power (BOP)

Print this Topic Previous pageReturn to chapter overviewNext page

Description

The balance of power (BOP) indicator measures the strength of the bulls vs. bears by assessing the ability of each to push price to an extreme level.

 

 

Syntax

BOP(int smooth)
BOP(IDataSeries input, int smooth)

 

Returns default value
BOP(int smooth)[int barsAgo]
BOP(IDataSeries input, int smooth)[int barsAgo]

 

 

Return Value

double; Accessing this method via an index value [int barsAgo] returns the indicator value of the referenced bar.

 

 

Parameters

input

Indicator source data (?)

smooth

The smoothing period

 

 

Examples

// Prints the current value of BOP using default price type and 3 period smoothing
double value = BOP(3)[0];
Print("The current BOP value is " + value.ToString());

 

 

Source Code

You can view this indicator method source code by selecting the menu Tools > Edit NinjaScript > Indicator within the NinjaTrader Control Center window.