Hello,
I recently took a Pivot Point class from Jeff York and was very excited to cobble together the following code - inspirations are from this website (unattributed when I found it) and elsewhere, and I inserted the variety of Pivot formulas that I learnt in Jeff York's class. I am unable to figure out how to attach a screenshot of the Pivot formulas for reference to this thread, but I am quite sure that the code is simple enough to understand each formula.
The number of Rs and Ss that are to be plotted are different for the different types of Pivots. I am unable to run this code without keeping the number of Rs and Ss exactly the same. Can someone please help? I have annotated the code at the lines where I am facing issues. Please ask me questions that would help in assisting me with this problem. I appreciate your time, and thanks in advance.
Update: I will also request help with stretching the Pivots to a few periods in the past (akin to what can be accomplished on Trading View).
Update2: Code updated to reflect Quarter aggregation
SEE FINAL CODE BELOW
I recently took a Pivot Point class from Jeff York and was very excited to cobble together the following code - inspirations are from this website (unattributed when I found it) and elsewhere, and I inserted the variety of Pivot formulas that I learnt in Jeff York's class. I am unable to figure out how to attach a screenshot of the Pivot formulas for reference to this thread, but I am quite sure that the code is simple enough to understand each formula.
The number of Rs and Ss that are to be plotted are different for the different types of Pivots. I am unable to run this code without keeping the number of Rs and Ss exactly the same. Can someone please help? I have annotated the code at the lines where I am facing issues. Please ask me questions that would help in assisting me with this problem. I appreciate your time, and thanks in advance.
Update: I will also request help with stretching the Pivots to a few periods in the past (akin to what can be accomplished on Trading View).
Update2: Code updated to reflect Quarter aggregation
SEE FINAL CODE BELOW
Last edited by a moderator: