Electrified

PivotPointsDailyTraditional

Electrified Updated   
Library "PivotPointsDailyTraditional"
Provides the traditional daily pivot values and a pivot vacinity function.

P(level, daysPrior) Returns the P value.
  Parameters:
    level: The level to caclulate.
    daysPrior: The number of days in the past to do the calculation.

R(level, daysPrior) Calculates the R value for a given pivot level.
  Parameters:
    level: The level to caclulate.
    daysPrior: The number of days in the past to do the calculation.

S(level, daysPrior) Calculates the S value for a given pivot level.
  Parameters:
    level: The level to caclulate.
    daysPrior: The number of days in the past to do the calculation.

vacinity(value, daysPrior, maxLevel) Returns a value representing where the provided value is in relation to each pivot level.
  Parameters:
    value: The value to compare against.
    daysPrior: The number of days in the past to do the calculation.
    maxLevel: The maximum number of pivot levels to include.
Release Notes:
v2 Updated "DailyLevels" reference.
Release Notes:
v3 Referenced API Update
Release Notes:
v4 Updated with latest Daily version.
Release Notes:
Library "PivotPointsDailyTraditional"
Provides the traditional daily pivot values and a pivot vacinity function.

P(daysPrior)
  Returns the P value.
  Parameters:
    daysPrior (simple int): The number of days in the past to do the calculation.

R(level, daysPrior)
  Calculates the R value for a given pivot level.
  Parameters:
    level (int): The level to caclulate.
    daysPrior (simple int): The number of days in the past to do the calculation.

S(level, daysPrior)
  Calculates the S value for a given pivot level.
  Parameters:
    level (int): The level to caclulate.
    daysPrior (simple int): The number of days in the past to do the calculation.

vacinity(value, daysPrior, maxLevel)
  Returns a value representing where the provided value is in relation to each pivot level.
  Parameters:
    value (float): The value to compare against.
    daysPrior (simple int): The number of days in the past to do the calculation.
    maxLevel (simple int): The maximum number of pivot levels to include.
Pine library

In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in a publication is governed by House Rules.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this library?

Copy the following line and paste it in your script.