//@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.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
RSI Length
int
3
rsi_len
RSI Center Level
float
50.0
level
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.
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
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
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
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
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
This overlay indicator marks call and put setups from EMAs, RSI, MACD, and a SPY volume ratio. A call needs higher highs, RSI above its minimum, rising MACD, above-average proxy volume, and a rising trend EMA; a put reverses those tests. Early markers use an E