Indicator · Pine Script v5 · Own pane

LC Signal Generator

by g-moe· code credited to goodgains

LC Signal Generator measures market breadth and alignment across three configurable symbol groups, including European stock indices, S&P 500 futures, and the VIX volatility index.

View on GitHub

Repaints

GitHub stars3on the repository
Pine versionv5runs as is
Lines of code88
Settings12inputs
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

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

lc-signalgenerator.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('LC_SignalGenerator', format=format.price, precision=2, overlay=false)

// @keywords: lc-signalgenerator, signal-generator, percent-change, request-security, multi-symbol, european-indices, market-breadth, es-futures, vix, score-threshold, session-scan, time-based-alerts, alerts, plot-circles, bgcolor, bullish-signal, bearish-signal, debug-mode, groups-score, daily-close

//INPUTS
debug_mode = input.bool(false, title = 'Debug Mode', group = 'Other Settings')
time_to_scan = input.session('1220-1221', title = 'Time For Scan', group = 'Other Settings', tooltip = 'Uses EST or NY Market Hours for timezone.')

g1_score = input.int(4, title = 'Score', group = 'Group 1')
g1_symbol1 = input.symbol("N100", title = 'Symbol 1', group = 'Group 1')
g1_symbol2 = input.symbol("STOXX50", title = 'Symbol 2', group = 'Group 1')
g1_symbol3 = input.symbol("FTSE100", title = 'Symbol 3', group = 'Group 1')
g1_symbol4 = input.symbol("CAC40", title = 'Symbol 4', group = 'Group 1')
g1_symbol5 = input.symbol("SSMI", title = 'Symbol 5', group = 'Group 1')
g1_symbol6 = input.symbol("IBEX35", title = 'Symbol 6', group = 'Group 1')
g1_symbol7 = input.symbol("DAX", title = 'Symbol 7', group = 'Group 1')

g2_symbol1 = input.symbol("ES1!", title = 'Symbol 1', group = 'Group 2')

g3_symbol1 = input.symbol("VIX", title = 'Symbol 1', group = 'Group 3')

//FUNCTION
f_pctchg(symbol) =>

    previous_close = request.security(symbol, 'D', close[1], barmerge.gaps_off, barmerge.lookahead_on)
    current_price = request.security(symbol, '', close)
    pct_change = math.round(((current_price - previous_close) / previous_close * 100), 100)
    pct_change


//GROUP 1 CALCS
g1_s1_value = f_pctchg(g1_symbol1) > 0 ? 1 : 0
g1_s2_value = f_pctchg(g1_symbol2) > 0 ? 1 : 0
g1_s3_value = f_pctchg(g1_symbol3) > 0 ? 1 : 0
g1_s4_value = f_pctchg(g1_symbol4) > 0 ? 1 : 0
g1_s5_value = f_pctchg(g1_symbol5) > 0 ? 1 : 0
g1_s6_value = f_pctchg(g1_symbol6) > 0 ? 1 : 0
g1_s7_value = f_pctchg(g1_symbol7) > 0 ? 1 : 0

g1_cond = (g1_s1_value + g1_s2_value + g1_s3_value + g1_s4_value + g1_s5_value + g1_s6_value + g1_s7_value) >= g1_score ? 1 : 0 

//GROUP 2 CALCS
g2_s1_value = f_pctchg(g2_symbol1)
g2_cond = g2_s1_value > 0 ? 1 : 0

//GROUP 3 CALCS
g3_s1_value = f_pctchg(g3_symbol1)
g3_cond = g3_s1_value < 0 ? 1 : 0


// PLOT DEBUG
// groups_cond = ( (g1_cond + g2_cond + g3_cond) == 3 ) ? 1 : -1
groups_score = g1_cond + g2_cond + g3_cond
alert_signal = groups_score == 3 ? 1 : groups_score == 0 ? -1 : 0 

plot(alert_signal, title = 'Groups Value', color = color.red, style = plot.style_circles)
plot( (g1_cond), title = 'DEBUG Group 1', style = plot.style_circles) // All GROUP 1
plot( (g2_cond), title = 'DEBUG Group 2', style = plot.style_circles) // All GROUP 2
plot( (g3_cond), title = 'DEBUG Group 3', style = plot.style_circles) // All GROUP 3

//SCAN - ALERTS
is_time_to_scan = time(timeframe.period, str.format('{0}:1234567', time_to_scan), 'America/New_York')


scan_cond = ( alert_signal == 1 or alert_signal == -1 ) and ( ( debug_mode ) or ( is_time_to_scan ) )
bgcolor(scan_cond and alert_signal == 1 ? color.lime : scan_cond and alert_signal == -1 ? color.red : na)


//TIME BASED ALERT
if is_time_to_scan
    if alert_signal == 1
        alert("signal:1", alert.freq_once_per_bar_close)
    else if alert_signal == -1
        alert("signal:-1", alert.freq_once_per_bar_close)
    else
        alert("signal:0", alert.freq_once_per_bar_close)
        
else if debug_mode == true
    if alert_signal == 1
        alert("signal:1", alert.freq_once_per_bar_close)
    else if alert_signal == -1
        alert("signal:-1", alert.freq_once_per_bar_close)
    else
        alert("signal:0", alert.freq_once_per_bar_close)

Overview

LC Signal Generator calculates daily percentage changes for each asset using daily close data. When a configurable threshold of group conditions is satisfied during a specified daily scan window, the script outputs a consolidated bullish or bearish signal value. Plotted in a separate pane using circles and background highlights, it generates time-restricted alerts for automated scanning across global market instruments.

Details

Published by

g-moe on GitHub

Code credit

goodgains, as written in the script's header

Type

Indicator, Pine Script v5

Draws

Separate pane below the chart

Category

Sessions & time, Screeners & dashboards

Markets

Indices, Stocks

Timeframes

M15-H1

Risk Notes

  • 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
Debug Modeboolfalsedebug_mode
Time For Scansession1220-1221time_to_scan
Scoreint4g1_score
Symbol 1symbolN100g1_symbol1
Symbol 2symbolSTOXX50g1_symbol2
Symbol 3symbolFTSE100g1_symbol3
Symbol 4symbolCAC40g1_symbol4
Symbol 5symbolSSMIg1_symbol5
Symbol 6symbolIBEX35g1_symbol6
Symbol 7symbolDAXg1_symbol7
Symbol 1symbolES1!g2_symbol1
Symbol 1symbolVIXg3_symbol1
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

257 stars

Donald SPX - Options Trading is an indicator designed to assist SPX index option traders by tracking session benchmarks and multi-timeframe moving average data. It calculates a 200-period weighted moving average (WMA) and requests multi-timeframe bar data from

Indicator v5 Moving averagesScreeners & dashboards Repaints
Updated 6 weeks ago · None stated GitHub repository of Donald SPX - Options Trading
46 stars

This indicator summarizes higher-timeframe candle range statistics by time of day and shows them in a table in a separate pane. It groups candles into slots for 5-minute, 15-minute, 1-hour, 4-hour, 8-hour, or 12-hour periods over a chosen lookback in days, and

Indicator v5 Screeners & dashboardsSessions & time Repaints
Updated 7 weeks ago · None stated GitHub repository of HTF Candle Stats by Time of Day
9 stars

This separate-pane indicator calculates multi-period volatility regimes by analyzing fast, medium, and slow Average True Range (ATR) metrics alongside volume integration, gap adjustments, and session weighting. It visualizes volatility states using a heat map

Indicator v6 Volatility & bandsScreeners & dashboards
Updated 12 days ago · Custom licence GitHub repository of QVS Pro - Raw Volatility Edition

BTMM HTF Bias System

by jcortes254
3 stars

BTMM HTF Bias System analyzes trend alignment and higher-timeframe directional bias using exponential moving averages across multiple timeframes, such as 1-hour, 4-hour, daily, and weekly charts. Based on Steve Mauro's Beat The Market Maker methodology, it cal

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of BTMM HTF Bias System

This indicator plots a multi-asset correlation heatmap in a separate pane to measure statistical relationships between assets. It calculates Pearson correlation coefficients over a user-specified lookback period between a chosen primary symbol and up to twenty

Indicator v6 Screeners & dashboardsSessions & time
Updated 8 months ago · None stated GitHub repository of Correlation HeatMap Sessions Data Science Stats

RVol Panel

by samkdgit
1 stars

RVol Panel plots relative volume in a separate pane for intraday charts. It compares each bar’s volume with the same bar position across a configurable number of recent sessions and also tracks cumulative session volume against that baseline. Bars are colored

Indicator v5 VolumeSessions & time
Updated 11 months ago · MIT GitHub repository of RVol Panel

More indicators

Trade Your Charts With a Regulated Broker

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

Compare brokers