NinjaScript > Language Reference > Indicator Methods > Swing |
|
Description The Swing indicator will plot lines that represent the swing points based on the strength (number of bars to the left and right of the swing point) parameter provided. You can access methods within this indicator to determine the number of bars ago a swing point occured or the current swing value.
Syntax - Bars Ago
Return Value An int value representing the number of bars ago. Returns a value of -1 if a swing point is not found within the look back period.
Syntax - Value
Return Value double; Accessing this method via an index value [int barsAgo] returns the indicator value of the referenced bar. * A return value of 0 (zero) will be returned if the CurrentBar is less than the "strength" value or a swing pivot has not yet been found.
Parameters
Examples
Source Code You can view this indicator method source code by selecting the menu Tools > Edit NinjaScript > Indicator within the NinjaTrader Control Center window. |