Pivot Points (Support & Resistance)
This indicator calculates the pivot levels based on a tested formula involving looking at past and subsequent bars or candles. It displays the two closest to price pivot levels. The pivot formula takes a window of left bars and right bars and finds the highest or lowest value in that window, and that window marches across the bar-set to discover the pivots.
We coded the script to label the levels and colors dynamically, either Support (Green) or Resistance (Red), depending on whether they are above or below price. The primary level line stays with the same color scheme:
Blue = Daily / Yellow = Weekly / Violet = Monthly
As price crosses the level:
1 – The label will switch from Support to Resistance and Resistance to Support
2 – The extender line will switch from Green to Red and Red to Green
3 – The same changes will take place in the Tactical Coordinates Table