Hello Grantx
The study paints the bar placed in the (n) position where n is the position where there is a pivot high or low, to calculate this position we use two functions:
(for pivot high).GetSwingHighBar(Data, GetSwingHighBarDataOccur, GetSwingHighBarDatatPrice, GetSwingHighBarDataStrength, GetSwingHighBarDataLength)
(for pivot low).GetSwingLowBar(Data, GetSwingLowBarDatanOccur, GetSwingLowBarDatatPrice, GetSwingLowBarDataStrength, GetSwingLowBarDataLength)
Where
(I would rather put the code this way)
'¡¡ PDV initializations
GetSwingHighBarDataOccur = 1 (indicates the closer (n=1) pivot high
GetSwingHighBarDatatPrice = PriceHigh (indicates that the pivot is calculated upon the bar high)
GetSwingHighBarDataStrength = = LateralBars (indicates that a pivot is a pivot if it’s the higher prices = LateralBars bars to the left and to the right)
GetSwingHighBarDataLength = LateralBars * 15
(number of bars to be taken in to account to find the pivot from the current position)
GetSwingLowBarDatanOccur = 1 (indicates the closer (n=1) pivot low
GetSwingLowBarDatatPrice = PriceLow (indicates that the pivot is calculated upon the bar low)
GetSwingLowBarDataStrength = LateralBars (indicates that a pivot is a pivot if it’s the lower prices LateralBars bars to the left and to the right)
GetSwingLowBarDataLength = LateralBars * 15
(number of bars to be taken in to account to find the pivot from the current position)
Remember it has nothing to do with the stnadard pivot point calculation.
Hope it helps.
Mikel |