Indicator · Pine Script v5 · On the chart

Limitless Trading Indicator

by g-moe· code credited to goodgains

The Limitless Trading Indicator is an overlay tool that combines multi-timeframe Exponential Moving Averages (13 and 62 EMAs) with Relative Strength Index (RSI) crossovers.

View on GitHub

Repaints

GitHub stars3on the repository
Pine versionv5runs as is
Lines of code177
Settings8inputs
LicenceNone statedfile: MPL-2.0
Last update5 months ago27 May 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

177 lines of Pine Script v5 from Tradingview/limitless-trading-indicator.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

limitless-trading-indicator.pine
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © goodgains


//@version=5
indicator("Limitless Trading Indicator", overlay = true)

// @keywords: limitless-indicator, password-gate, mtf-ema-trend, rsi-cross-filter, lt-buy-arrow, lt-sell-arrow, ema-cloud-fill, trend-change-highlight, horizontal-trend-line, bars-since-cross, ema-thirteen-sixtytwo, trend-timeframe, pullback-arrows, black-arrow-filter, crossover-under, lowest-highest-window, alert-up-down, swing-low-track, timeframe-label, trend-direction-bg


// password
password = input.int(29321, title = 'Password', group = 'Password', inline = '1')
if password != 29321
    runtime.error('Invalid Password') 


// inputs
show_emacloud = input.bool(true, title = 'Show EMA Cloud', group = 'Settings', inline = '1')
show_trendchg = input.bool(true, title = 'Show Trend Changes', group = 'Settings', inline = '2')
trend_tf = input.timeframe('60', title = 'Trend Timeframe', group = 'Settings', inline = '3')
_ema_bs = input.int(200, title = 'How Long to Allow Signals from Cross', group = 'Settings', inline = '4')

// rsi_settings
_rsi_bs = input.int(3, title = 'Bars For RSI Cross', group = 'RSI Settings', inline = '1')
_rsi_buy_below = input.int(50, title = 'Buy Below', group = 'RSI Settings', inline = '2')
_rsi_sell_above = input.int(50, title = 'Sell Above', group = 'RSI Settings', inline = '2')


// rsi
var int bs_rsi_buy = na
var int bs_rsi_sell = na

rsi_value = ta.rsi(close, 14)
rsi_ma = ta.sma(rsi_value, 14)

rsi_buy_cond = ta.crossover(rsi_value, rsi_ma) and rsi_value <= _rsi_buy_below 
rsi_sell_cond = ta.crossunder(rsi_value, rsi_ma) and rsi_value >= _rsi_sell_above

bs_rsi_buy := rsi_buy_cond ? 1 : bs_rsi_buy[1] + 1
bs_rsi_sell := rsi_sell_cond ? 1 : bs_rsi_sell[1] + 1

rsi_buy = bs_rsi_buy <= _rsi_bs
rsi_sell = bs_rsi_sell <= _rsi_bs

// barcolor(rsi_sell ? color.red : na)

// alert_type = input.string('Both', title = 'Regular Alerts   ', options = ['Up', 'Down', 'Both', 'None'], group = 'Settings', inline = '4')
// ltalert_type = input.string('Both', title = 'LT Alerts        ', options = ['Up', 'Down', 'Both', 'None'], group = 'Settings', inline = '5')

// ema
ema1_length = 13
ema2_length = 62

// chart ema
ema1 = ta.ema(close, ema1_length)
ema2 = ta.ema(close, ema2_length)
ema_side = ema1 >= ema2 ? 1 : -1

// trend_ema
ema_source = trend_tf == '' ? close : close[1]

trend_isdwm = request.security(syminfo.tickerid, trend_tf, timeframe.isdwm, lookahead = barmerge.lookahead_on)
trend_ema1 = request.security(syminfo.tickerid, trend_tf, ta.ema(ema_source, ema1_length), lookahead = barmerge.lookahead_on)
trend_ema2 = request.security(syminfo.tickerid, trend_tf, ta.ema(ema_source, ema2_length), lookahead = barmerge.lookahead_on)
trend_ema_side = trend_ema1 >= trend_ema2 ? 1 : -1

// trend vertical
trend_bull = ta.crossover(trend_ema_side, 0)
trend_bear =  ta.crossunder(trend_ema_side, 0)

var int bs_trendbull = 0
var int bs_trendbear = 0

bs_trendbull := trend_bull ? 1 : bs_trendbull[1] + 1
bs_trendbear := trend_bear ? 1 : bs_trendbear[1] + 1

trend_buy_cond = bs_trendbull <= _ema_bs
trend_sell_cond = bs_trendbear <= _ema_bs

bgcolor(show_trendchg and trend_bull ? color.new(color.green, 50) : show_trendchg and trend_bear ? color.new(color.red,50) : na, title = 'Trend Change')

// trend horizontal
var float trend_high = na
var float trend_low = na

trend_low := trend_bull ? low : trend_ema_side == 1 ? math.min(low, trend_low[1]) : trend_low[1]
trend_high := trend_bear ? high : trend_ema_side == -1 ? math.max(high, trend_high[1]) : trend_high[1]

var line trend_low_line = na
var label trend_bull_label = na

tf_string_start = (trend_tf == '' ? str.tostring(timeframe.period) : (str.tonumber(trend_tf) % 60 == 0) ? str.tostring(str.tonumber(trend_tf)/60) : trend_tf) 
tf_string_end =  (trend_isdwm ? '' : ( str.tonumber(trend_tf) % 60 == 0) ? 'hr' : 'min')

if trend_bull and barstate.isconfirmed
    trend_low_line := line.new(x1 = time, y1 = trend_low, x2 = time, y2 = trend_low, xloc = xloc.bar_time, extend = extend.none, color = color.green, style = line.style_solid, width = 2)
    trend_bull_label := label.new(x = time, y = close, text = tf_string_start + tf_string_end, xloc = xloc.bar_time, yloc = yloc.belowbar, color = color.green, style = label.style_label_up, textcolor = color.new(#000000, 0), size = size.small
     , textalign = text.align_center)
else if trend_ema_side == 1 and barstate.isconfirmed
    line.set_y1(trend_low_line, trend_low)
    line.set_y2(trend_low_line, trend_low)
    line.set_x2(trend_low_line, time)

var line trend_high_line = na
var label trend_bear_label = na
if trend_bear and barstate.isconfirmed
    trend_high_line := line.new(x1 = time, y1 = trend_high, x2 = time, y2 = trend_high, xloc = xloc.bar_time, extend = extend.none, color = color.red, style = line.style_solid, width = 2)
    trend_bear_label := label.new(x = time, y = close, text = tf_string_start + tf_string_end, xloc = xloc.bar_time, yloc = yloc.abovebar, color = color.red, style = label.style_label_down, textcolor = color.new(#000000, 0), size = size.small
     , textalign = text.align_center)
else if trend_ema_side == -1 and barstate.isconfirmed
    line.set_y1(trend_high_line, trend_high)
    line.set_y2(trend_high_line, trend_high)
    line.set_x2(trend_high_line, time)

// green and red arrows
var bool bull_cross = na
var bool bear_cross = na

var bool green_cond = na
var bool red_cond = na

var bool green_arrow = na
var bool red_arrow = na

bull_cross := ta.crossover(close, ema1)
bear_cross := ta.crossunder(close, ema1)

// ema is bull, close crosses over ema1, recently we have traded below ema2 and we havent had bull cross in 3 bars
green_cond := ema_side == 1 and bull_cross and ta.lowest(low, 3) <= ema2
green_arrow := green_cond and barstate.isconfirmed

// ema is bull, close crosses over ema1, recently we have traded below ema2  and we havent had bull cross in 3 bars
red_cond := ema_side == -1 and bear_cross and ta.highest(high, 3) >= ema2 
red_arrow := red_cond and barstate.isconfirmed

// black arrows
blackup_arrow = green_arrow and trend_ema_side == 1
blackdown_arrow = red_arrow and trend_ema_side == -1

lt_buy = blackup_arrow and ta.barssince(green_arrow[1]) > 3 and rsi_buy and trend_buy_cond
lt_sell = blackdown_arrow and ta.barssince(red_arrow[1]) > 3 and rsi_sell and trend_sell_cond

// plot arrows
plotshape(lt_buy, title = 'LT Arrow Up', style = shape.labelup, size = size.small, color = color.rgb(88, 202, 92), location = location.belowbar)
plotshape(lt_sell, title = 'LT Arrow Down', style = shape.labeldown, size = size.small, color = color.red, location = location.abovebar)

// plotshape(green_arrow and ta.barssince(green_arrow[1]) > 3, title = 'Arrow Up', style = shape.triangleup, size = size.small, color = color.green, location = location.belowbar)
// plotshape(red_arrow and ta.barssince(red_arrow[1]) > 3, title = 'Arrow Down', style = shape.triangledown, size = size.small, color = color.red, location = location.abovebar)

// alerts
// if ltalert_type == 'Both' or alert_type == 'Up' and blackup_arrow and ta.barssince(green_arrow[1]) > 3
//     alert('LT Up Alert', alert.freq_once_per_bar_close)

// if ltalert_type == 'Both' or alert_type == 'Down' and blackdown_arrow and ta.barssince(red_arrow[1]) > 3
//     alert('LT Down Alert', alert.freq_once_per_bar_close)

// if alert_type == 'Both' or alert_type == 'Up' and green_arrow and ta.barssince(green_arrow[1]) > 3
//     alert('Up Alert', alert.freq_once_per_bar_close)

// if alert_type == 'Both' or alert_type == 'Down' and red_arrow and ta.barssince(red_arrow[1]) > 3
//     alert('Down Alert', alert.freq_once_per_bar_close)


// alertcondition
alertcondition(lt_buy, "LT UP", "LT UP Arrow Fired")
alertcondition(lt_sell, "LT DOWN", "LT DOWN Arrow Fired")
alertcondition(lt_buy or lt_sell , "LT UP or DOWN", "LT Arrow Fired")

// alertcondition(green_arrow and ta.barssince(green_arrow[1]) > 3, "Arrow UP", "UP Arrow Fired")
// alertcondition(red_arrow and ta.barssince(red_arrow[1]) > 3, "Arrow DOWN", "DOWN Arrow Fired")
// alertcondition(green_arrow and ta.barssince(green_arrow[1]) > 3 or (red_arrow and ta.barssince(red_arrow[1]) > 3) , "Arrow UP or DOWN", "Arrow Fired")


// cloud
ema1_plot = plot(show_emacloud ? ema1 : na, title = "EMA 1", color = color.new(color.blue, 50))
ema2_plot = plot(show_emacloud ? ema2 : na, title = "EMA 2", color = color.new(color.blue, 50))
fill(ema1_plot, ema2_plot, ema_side == 1 ? color.new(color.green,70) : color.new(color.red, 70))

Overview

Limitless Trading Indicator evaluates trend direction on a user-selected higher timeframe and filters entry signals based on recent RSI crossovers against a signal line within defined thresholds. The indicator offers visual options such as background color highlights for trend changes and EMA cloud fills. Note that higher-timeframe security requests use lookahead mode, which causes signals to repaint historical bars.

Details

Published by

g-moe on GitHub

Code credit

goodgains, as written in the script's header

Draws

On the price chart

Markets

Any symbol

Timeframes

M15-H1, H4 and above

Risk Notes

  • Signals can change on the live bar or after it closes (repainting)
  • Reads higher-timeframe data with lookahead on, so the history can show signals that were not there in real time

Settings

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

SettingTypeDefaultVariable
Passwordint29321password
Show EMA Cloudbooltrueshow_emacloud
Show Trend Changesbooltrueshow_trendchg
Trend Timeframetimeframe60trend_tf
How Long to Allow Signals from Crossint200_ema_bs
Bars For RSI Crossint3_rsi_bs
Buy Belowint50_rsi_buy_below
Sell Aboveint50_rsi_sell_above
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
228 stars

TradersPost Trading Checklist is an overlay indicator that evaluates a suite of popular technical conditions for long and short trade setups. It checks session-anchored VWAP, fast and slow EMA alignments and crosses, 200 SMA, RSI overbought or oversold conditi

Indicator v6 Screeners & dashboardsTrend
Updated 3 months ago · None stated GitHub repository of TradersPost Trading Checklist

Daily Trend Filter

by agutinbaigo28
147 stars

Calculates market regime conditions by combining RSI, MACD, and ADX/DMI indicators. It evaluates whether the market is in a strong bullish, strong bearish, neutral, or non-trending regime. The script plots a colored line overlaying the close price to reflect t

Indicator v5 TrendOscillators & momentum
Updated 6 weeks ago · MIT GitHub repository of Daily Trend Filter

AAPP

by capissimo
114 stars

This indicator plots an adaptive moving average or scaled RSI divergence line directly on the price chart. It calculates dual RSI series to measure momentum divergence, scales the values to the chart's price range, and constructs an adaptive average filtered b

Indicator v4 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of AAPP

Signal Strategy 15m

by tripolskypetr
72 stars

This indicator generates trend-following trade signals on the price chart by combining moving average crossovers with multi-factor filters. It triggers entry alerts when fast and slow EMAs cross in the direction of a baseline trend EMA, confirmed by non-extrem

Indicator v5 TrendMoving averages
Updated 5 days ago · MIT GitHub repository of Signal Strategy 15m
56 stars

Double Screened Decision is a multi-timeframe trend and momentum indicator overlaid directly on the price chart. It dynamically selects a higher timeframe based on the active chart resolution to evaluate higher-timeframe MACD, Bollinger Bands, RSI, and Stochas

Indicator v5 TrendMoving averages Repaints
Updated 4 months ago · None stated GitHub repository of Double Screened Decision

More Trend 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