Library "HelperTA"

This library contains useful technical indicators that I use regularly in my charts.

`stockRSI` is not mine, but included because used often and referenced by internal functions.

`DCO` is a normalisation of the donchian channels; the price relative to the donchian channels, on a range.

`MarketCycle` is a weighted aggregate of RSI, Stochastic RSI & DCO (demo on the chart)

stockRSI(src, K, D, rsiPeriod, stochPeriod)
    src (float)
    K (int)
    D (int)
    rsiPeriod (simple int)
    stochPeriod (int)
  Returns: <k, d>

DCO(price, donchianPeriod, smaPeriod)
    price (float)
    donchianPeriod (int)
    smaPeriod (int)
  Returns: <DCO, s>

MarketCycle(donchianPrice, rsiPrice, srsiPrice, donchianPeriod, donchianSmoothing, rsiPeriod, rsiSmoothing, srsiPeriod, srsiSmoothing, srsiK, srsiD, rsiWeight, srsiWeight, dcoWeight)
    donchianPrice (float)
    rsiPrice (float)
    srsiPrice (float)
    donchianPeriod (simple int)
    donchianSmoothing (simple int)
    rsiPeriod (simple int)
    rsiSmoothing (int)
    srsiPeriod (simple int)
    srsiSmoothing (simple int)
    srsiK (simple int)
    srsiD (simple int)
    rsiWeight (simple float)
    srsiWeight (simple float)
    dcoWeight (simple float)
  Returns: <aggr>

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.


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.