Indicator · Pine Script v6 · On the chart

OptionX Noisy Test Lifecycle

by LimiNode

This indicator calculates a short RSI and treats a cross above or below a center level as a raw buy or sell.

View on GitHub

Repaints

GitHub stars4on the repository
Pine versionv6current
Lines of code60
Settings2inputs
LicenceMIT
Last update3 days ago27 Oct 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

60 lines of Pine Script v6 from browser_extensions/tradingview-alert-extension/examples/optionx_noisy_test_lifecycle.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

optionx_noisy_test_lifecycle.pine
//@version=6
indicator("OptionX Noisy Test Lifecycle", overlay=true)

rsi_len = input.int(3, "RSI Length")
level = input.float(50.0, "RSI Center Level")

r = ta.rsi(close, rsi_len)

rawBuy = ta.crossover(r, level)
rawSell = ta.crossunder(r, level)

makeSignalId(string side) =>
    syminfo.tickerid + "|" + timeframe.period + "|" + str.tostring(time) + "|" + side

makeMessage(string side, string stateValue, int revision) =>
    '{"source":"tradingview","signal_name":"noisy_rsi_lifecycle_test","signal_id":"' + makeSignalId(side) + '","revision":' + str.tostring(revision) + ',"action":"' + side + '","state":"' + stateValue + '","symbol":"' + syminfo.ticker + '","tickerid":"' + syminfo.tickerid + '","timeframe":"' + timeframe.period + '","price":' + str.tostring(close, format.mintick) + ',"bar_time":' + str.tostring(time) + ',"event_time":' + str.tostring(timenow) + '}'

// varip keeps state across realtime updates of the same open bar.
varip bool buyActive = false
varip bool sellActive = false
varip int buyRevision = 0
varip int sellRevision = 0

if barstate.isnew
    buyActive := false
    sellActive := false
    buyRevision := 0
    sellRevision := 0

if barstate.isrealtime
    if not barstate.isconfirmed
        if rawBuy != buyActive
            buyActive := rawBuy
            buyRevision += 1
            alert(makeMessage("buy", buyActive ? "active" : "cancel", buyRevision), alert.freq_all)

        if rawSell != sellActive
            sellActive := rawSell
            sellRevision += 1
            alert(makeMessage("sell", sellActive ? "active" : "cancel", sellRevision), alert.freq_all)
    else
        if rawBuy
            buyRevision += 1
            alert(makeMessage("buy", "confirmed", buyRevision), alert.freq_all)
        else if buyActive
            buyRevision += 1
            alert(makeMessage("buy", "cancel", buyRevision), alert.freq_all)

        if rawSell
            sellRevision += 1
            alert(makeMessage("sell", "confirmed", sellRevision), alert.freq_all)
        else if sellActive
            sellRevision += 1
            alert(makeMessage("sell", "cancel", sellRevision), alert.freq_all)

        buyActive := rawBuy
        sellActive := rawSell

plotshape(rawBuy and barstate.isconfirmed, title="BUY confirmed", text="BUY", style=shape.triangleup, location=location.belowbar, size=size.tiny)
plotshape(rawSell and barstate.isconfirmed, title="SELL confirmed", text="SELL", style=shape.triangledown, location=location.abovebar, size=size.tiny)

Overview

On the live bar it sends alerts that mark the signal active, cancel it, or confirm it when the bar closes, and it increments a revision each time the state changes. Confirmed buy and sell marks are drawn on the price chart. The RSI length and center level are the main settings. Live-bar alerts can change before the bar closes.

Details

Published by

LimiNode on GitHub

Draws

On the price chart

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

  • Signals can change on the live bar or after it closes (repainting)

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
RSI Lengthint3rsi_len
RSI Center Levelfloat50.0level
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

947 stars

The Adaptive RSI Moving Average (ARSIMA) is an overlay indicator that dynamically adjusts its smoothing factor based on the Relative Strength Index (RSI). When the RSI moves toward extreme overbought or oversold conditions, the smoothing factor increases to ma

Indicator v4 Moving averagesOscillators & momentum
Updated 12 days ago · GPL-3.0 GitHub repository of Adaptive RSI Moving Average

This overlay indicator screens a pasted list of up to forty symbols and draws a table on the price chart. It classifies bullish or bearish setups from the percent change between the current candle and the candle 250 bars back, then shows RSI with a simple movi

Indicator v5 Oscillators & momentumVolume
Updated 1 year ago · MPL-2.0 GitHub repository of Momentum Setup - Ankush Bajaj Momentum Investing Setup

This indicator plots trade entry and exit signals on the price chart by combining Bollinger Bands with optional filter conditions. It calculates standard Bollinger Bands along with RSI, Aroon, and moving average filters. Reversal signals trigger when price bre

Indicator v4 Volatility & bandsOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Bollinger Bands Winner IND [Alorse]
318 stars

This indicator plots three moving averages on the price chart alongside colored fills between the lines to visualize trend structure. Internally, it calculates a Stochastic RSI oscillator to detect oversold reversals. When the Stochastic %K line rises above 10

Indicator v5 Moving averagesOscillators & momentum
Updated 2 months ago · MIT GitHub repository of TVT 3X Scale In Out
285 stars

Mean Reversion Study is an indicator that identifies trade setups combining exponential moving averages, RSI extremes, and engulfing candlestick patterns. It highlights bullish setups when a bullish engulfing candle forms below the EMA while RSI is oversold, a

Indicator v4 Mean reversionCandlestick patterns
Updated 3 years ago · None stated GitHub repository of Mean Reversion Study

More Oscillators & momentum scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers