The code below will colour a bar on a bar chart blue or red with regard to pivots points/levels. I know the standard formula for pivot points but I don't recognise it here.
Could somebody tell me what calculation is being used here so I can transfer the formula for numerical analysis? I've numbered each line for convenience for ease of reference, and made bold what may be the relevant lines.
Thank you,
Grant.
1 '¡¡ Parameters
2 'Parameters !!
3 '¡¡ PDV parameters
4 Dim LateralBars As Double '5
5 Const Data As Long = 0
6 'PDV parameters !!
7 '¡¡ PDV declarations
8 Dim GetSwingHighBarDataOccur As Long 'Long
9 Dim GetSwingHighBarDatatPrice As Price 'Price
10 Dim GetSwingHighBarDataStrength As Long 'Long
11 Dim GetSwingHighBarDataLength As Long 'Long
12 Dim GetSwingLowBarDatanOccur As Long 'Long
13 Dim GetSwingLowBarDatatPrice As Price 'Price
14 Dim GetSwingLowBarDataStrength As Long 'Long
15 Dim GetSwingLowBarDataLength As Long 'Long
16 'PDV declarations !!
17 Option Explicit
18 Public APP As DrwUserApp
19 Implements Study
20 Public Sub Study_OnInitCalculate()
21 With APP
22 '¡¡ PDV initializations
23 GetSwingHighBarDataOccur = 1
24 GetSwingHighBarDatatPrice = PriceHigh
25 GetSwingHighBarDataStrength = 5
26 GetSwingHighBarDataLength = 50
27 GetSwingLowBarDatanOccur = 1
28 GetSwingLowBarDatatPrice = PriceLow
29 GetSwingLowBarDataStrength = 2
30 GetSwingLowBarDataLength = 50
31 .StartBar = 0
32 'PDV initializations !!
33 End With
34 End Sub
35 Public Sub Study_OnCalculateBar(ByVal Bar As Long)
36 With APP
37 '¡¡ PDV code
38 GetSwingHighBarDataLength = LateralBars * 15
39 GetSwingLowBarDataLength = LateralBars * 15
Could somebody tell me what calculation is being used here so I can transfer the formula for numerical analysis? I've numbered each line for convenience for ease of reference, and made bold what may be the relevant lines.
Thank you,
Grant.
1 '¡¡ Parameters
2 'Parameters !!
3 '¡¡ PDV parameters
4 Dim LateralBars As Double '5
5 Const Data As Long = 0
6 'PDV parameters !!
7 '¡¡ PDV declarations
8 Dim GetSwingHighBarDataOccur As Long 'Long
9 Dim GetSwingHighBarDatatPrice As Price 'Price
10 Dim GetSwingHighBarDataStrength As Long 'Long
11 Dim GetSwingHighBarDataLength As Long 'Long
12 Dim GetSwingLowBarDatanOccur As Long 'Long
13 Dim GetSwingLowBarDatatPrice As Price 'Price
14 Dim GetSwingLowBarDataStrength As Long 'Long
15 Dim GetSwingLowBarDataLength As Long 'Long
16 'PDV declarations !!
17 Option Explicit
18 Public APP As DrwUserApp
19 Implements Study
20 Public Sub Study_OnInitCalculate()
21 With APP
22 '¡¡ PDV initializations
23 GetSwingHighBarDataOccur = 1
24 GetSwingHighBarDatatPrice = PriceHigh
25 GetSwingHighBarDataStrength = 5
26 GetSwingHighBarDataLength = 50
27 GetSwingLowBarDatanOccur = 1
28 GetSwingLowBarDatatPrice = PriceLow
29 GetSwingLowBarDataStrength = 2
30 GetSwingLowBarDataLength = 50
31 .StartBar = 0
32 'PDV initializations !!
33 End With
34 End Sub
35 Public Sub Study_OnCalculateBar(ByVal Bar As Long)
36 With APP
37 '¡¡ PDV code
38 GetSwingHighBarDataLength = LateralBars * 15
39 GetSwingLowBarDataLength = LateralBars * 15