EduardoMattje

McNichollBands

Library "McNichollBands"
This is a library which only functions to make the McNicholl's Bollinger Bands modifications. It's also my first library, so I'll probably screw some things up.

mcNichollBands(alpha, useLogScale, widthMultiplier)
  Calculates the McNicholl's Bollinger Bands modifications.
  Parameters:
    alpha: The alpha constant to be used on the EMA calculations.
    useLogScale: Whether to use the log version of the prices or not.
    widthMultiplier: The number that shall be multiplied by the volatility to form the bands.
  Returns: A tuple containing the lower band, the center line, and the upper band.
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.