PivotHighVS (Function)
The PivotHighVS function returns the value of the specified instance of a High Pivot bar with variable strength sides.
Syntax
PivotHighVS(Instance, Price, LeftStrength, RightStrength, Length)
Returns (Double)
A numeric value containing the price of the high pivot bar, with variable strength sides. A value of -1 is returned if there is no high pivot, within the length specified.
Parameters
|
Name |
Type |
Description |
|
Instance |
Numeric |
Sets which occurrence (that is, 1 = most recent, 2 = 2nd most recent, and so on) to return. |
|
Price |
Numeric |
Specifies which bar value (price, function, or formula) to use. |
|
LeftStrength |
Numeric |
Sets the required number of bars on left side of the pivot bar. |
|
RightStrength |
Numeric |
Sets the required number of bars on right side of the pivot bar. |
|
Length |
Numeric |
Sets the number of bars to be considered. |
Example
Assigns to Value1 the most recently occurring high pivot, in the last 21 bars, that has a left side strength of 4 and a right side strength of 2:
Value1 = PivotHighVS(1, High, 4, 2, 21);
Assigns to Value2 the value of the second most recently occurring high pivot, in the last 10 bars, that has a left side strength of 3 and a right side strength of 2:
Value2 = PivotHighVS(2, High, 3, 2, 10);
Additional Example
If you wanted to place a mark on the High of the high pivot bar, with a left strength of 4 and a right strength of 2, you could use the following syntax:
If PivotHighVS(1, High, 4, 2, 3) <> -1 Then
Plot1[2](High[2], "PivotH");