Category: Turning Points
Input parameters
Name
|
Setting
|
Default
|
High
|
High time series
|
High
|
Low
|
Low time series
|
Low
|
Close
|
Close time series
|
Close
|
Neighborhood
|
Integer >= 1
|
3
|
Left turning point number
|
Integer >= 1
|
1
|
Right turning point number
|
Integer >= 0
|
0
|
Calculations
The TPbars indicator computes the number of bars either between two arbitrary turning points (TP) or between a turning point and the current bar. Turning points are numbered from right to left. The most recent TP has number one, the second most recent TP has number two, third most recent TP has number three, and so on.
There two distinctive cases when applying the TPbars indicator.
1. Right TP number = 0, left TP number >=1. The TPbars indicator measures the bar distance between a turning point indicated by the left TP number and the current bar. If left TP number = 1, then the indicator output is the number of bars since the last turning point.
2. Right TP number > 0, left TP number > 1, and left TP number > right TP number. The TPbars indicator measures the bar distance between two turning points.
|