Simple Custom Screener in PineScript
Sep 12, 2019

The Simple Custom Screener indicator allows users to monitor multiple assets simultaneously by displaying a list of symbols that meet a specific user-defined condition directly on the chart.
Usage
The tool is designed to provide a visual summary of assets that currently satisfy a logical condition defined within the code. By default, the script checks if the current closing price is higher than the opening price across a predefined list of symbols.
To use this script effectively:
- Define Conditions: Users can modify the
customFunc()function to implement their own technical logic (e.g., RSI crossovers, moving average filters). - Manage Symbols: The script uses
request.securityto fetch data for specific tickers. To add or remove tickers, users must manually adjust the symbol list and the corresponding label update logic within the script. - Visual Feedback: The results are displayed in a floating label on the chart, listing every ticker that currently returns a true value for the defined condition.
Details
This script acts as a template for building personalized screeners within TradingView using Pine Script. It bypasses the limitations of the standard platform screener by allowing highly specific, code-based conditions.
The implementation relies on two main components:
- Requesting Data: It utilizes
request.securityto pull data from different symbols and timeframes into the current chart context. - String Concatenation: It builds a string variable (
scrLabelText) by checking the results of each security call. If a condition is met for a specific symbol, that symbol's name is appended to the string, which is then rendered as a label.
Settings
The provided script is a template meant for manual code adjustment rather than UI-based inputs. Key structural components include:
- customFunc: The core logic area where the user defines what technical condition to screen for.
- Symbol Variables: A block of
request.securitycalls where the specific assets and timeframes are defined. - Label Logic: A sequence of conditional updates that determine which symbols appear in the final visual output.
FAQ
How can I add more symbols to the screener?
To add more symbols, you need to create a new request.security variable for the desired ticker and then add a corresponding line to the logic section to update the scrLabelText variable if the condition is met.
Can I change the timeframe for the screening?
Yes, the timeframe is defined within each request.security call. You can change the '1' (representing 1 minute) to any other valid TradingView timeframe like '60', 'D', or 'W'.
How do I get access to the Simple Custom Screener?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.