OPEN-SOURCE SCRIPT
Aggiornato

GreenStar ATR & Trend Strength Screener

3 577
GreenStar ATR & Trend Strength Screener

Pine Screener filter script. No chart plots.

Sorting a watchlist often mixes three different checks:

1) Daily trend structure (Minervini-style template rules)
2) ATR-normalized stretch from the 50-day MA
3) Session pace and distance from the low

This script puts those in one scan. MM and xFrom50 come from a single daily data pull per symbol. RVAT and %from LoD run on the screener chart interval. Chg % and Chg Open % round out the daily bar.


Why one script

These seven columns are the ones I check every day before touching a name.
One script puts all seven on the same row. Daily columns share one request.security call to stay inside Pine Screener's five-call limit.


Columns

MM (0 to 8)
Minervini trend template score. One point per rule when true:
1) Close above 150 SMA and 200 SMA
2) 150 SMA above 200 SMA
3) 200 SMA rising vs 22 bars ago
4) 50 SMA above 150 and 200
5) Close above 50 SMA
6) At least 25% above 260-bar low
7) Within 25% of 260-bar high
8) Weighted price momentum composite above 70

Rule 8 uses a price-momentum composite, not an IBD RS rating.

xFrom50 (signed decimal)
Extension from the 50-day SMA in ATR multiples:
% gain from 50 SMA = (close - 50 SMA) / 50 SMA x 100
ATR % = 14-day ATR / close x 100
xFrom50 = % gain / ATR %
Positive = above the MA. Negative = below.

ATR %
14-day ATR as percent of price. Denominator for xFrom50; also useful on its own for quiet vs volatile names.

RVAT
Relative Volume at Time (10 sessions, daily anchor). 1.0 = average pace for this clock time. Needs a 5-minute screener interval for intraday session math.

%from LoD (integer)
(close - session low) / 14-day ATR x 100
0.6 ATR above the low prints as 60. Filter less than 60 to stay near the low.

Chg %: change vs prior daily close (forming bar on intraday runs).

Chg Open %: change from today's open to current price.


Pine Screener setup

1. Favorite the script in Indicators (required for the screener picker).
2. Open Pine Screener, pick a watchlist.
3. Add this script as a filter source.
4. Set interval to 5 minutes for RVAT and %from LoD.
5. Enable columns in the column picker, then sort or filter.

Only columns from added filter scripts appear. Built-in screener filters cannot run in the same pass.

When publishing, use a clean chart with no other scripts on it. This script will not show plots on the chart.


Limitations

No visible plots on a normal chart. RVAT and %from LoD need a 5-minute screener interval and an active session. Built-in screener filters cannot run in the same pass. Daily columns follow the forming daily bar on intraday runs.


Filter examples

MM ≥ 6
xFrom50 between 2 and 6
ATR % between 4 and 10
RVAT > 1.2
%from LoD < 60

Daily columns use the forming daily bar on intraday runs (lookahead_off, no repainting). If a column is missing, check the column picker first.


Credits

MM column: eight trend-template criteria adapted from Minervini Trend Template by yogy.frestarahmawan (Mozilla Public License 2.0).

RVAT: TradingView ta.relativeVolume built-in library.


Disclaimer

Screening tool only. Not a signal, not financial advice. No entry or exit triggers. Past scan results do not predict future price action.
Note di rilascio
Publish chart
Chart is intentionally blank. Plots are hidden (display.none). Values appear as Pine Screener columns after setup in the main description.


Underlying concepts

MM score applies eight trend-structure rules derived from Minervini's Stage 2 criteria: price position relative to key moving averages, MA slope and alignment, distance from 52-week extremes, and price momentum. A score of 8 means all eight are true simultaneously.

xFrom50 normalizes extension by volatility. Raw percent distance from the 50 SMA means different things on a $15 stock vs a $400 stock. Dividing by ATR% puts every name on the same scale. A 3x reading means price is three average daily ranges above the MA, regardless of price level.

ATR % is typical daily range as a percent of price. It is the volatility yardstick: the denominator behind xFrom50 and %from LoD, and useful on its own for sorting quiet vs volatile names.

%from LoD applies the same ATR normalization to intraday distance from the session low. A name with a 10% ATR sitting 6% above its low reads as 0.6, the same as a 5% ATR name sitting 3% above its low.

RVAT compares current session volume pace to the same time of day over the prior 10 sessions. It answers whether participation is running above or below normal for this point in the trading day.

Chg % shows where price sits on the forming daily bar versus yesterday's close.

Chg Open % shows change from today's open to current price.

Together, these seven columns put trend structure, extension, volatility, session participation, distance from the low, and daily change on one row. Screening context only, not entry or exit triggers.
Note di rilascio
Republish with demo chart showing empty indicator area when applied.
This is NOT a chart-based indicator, it is a Pine Script Screener only!
See description for installation and usage.
Note di rilascio
Update: fixed how RVAT (relative volume at time) is calculated. It now measures volume from market open to right now, compared to the 10-day average for that same stretch of time. This matches TradingView's own Relative Volume at Time indicator in its default cumulative setting.


Note: RVAT here is not the same as the built-in "Rel vol at time" column in TradingView Screeners. That one looks at a single 5-minute bar versus prior days at the same clock time. This script tracks the whole session so far, which is more useful for gauging today's overall pace.
Note di rilascio
What's new

New and Renamed Columns :

ATR 14d%
14-day ATR as a percent of price. Same math as the former ATR % column; renamed for clarity.

xATR From 50
Distance from the 50-day SMA in ATR multiples. Same math as the former xFrom50 column; renamed for clarity.

%ATR from LoD
Distance from today's session low divided by 14-day ATR, times 100. Same math as the former %from LoD column; renamed to show it is ATR-normalized (e.g. 60 = 0.6 ATR above the low).

RelVol At Time
Today's cumulative volume from session open to now versus the average open-to-same-clock-time volume over the prior 10 sessions. Same math as the former RVAT column (ratio scale: 1.0 = average for that time of day). Renamed for clarity. Calculation unchanged.

RelVol 10D % (new)
Volume so far today divided by the average of the prior 10 completed daily volumes, times 100. Today is excluded from the average (SMA[1]). 100 = equal to a typical recent full day. Not the same as RelVol At Time during the session (that one is pace vs the same clock time). After the close, RelVol 10D % ≈ RelVol At Time × 100.

RS14/SPY % (new)
14-day relative strength versus SPY on daily closes: (close / close[14]) / (SPY close / SPY close[14]) × 100. Scale is percent-style (105, not 1.05). 100 = matched SPY over those 14 days; above 100 = outperformed SPY. SPY is loaded once via request.security as the fixed benchmark for every symbol.

%HoD vs Prior (new)
Percent that today's high (high of day) is above or below the prior day's high: (today's high − prior day high) / prior day high × 100. Positive = today's high has taken out yesterday's high; negative = today's high is still below. This checks whether the session high cleared PDH, not whether price is currently trading above it.

Change %
Change versus the prior daily close. Same math as the former Chg % column; renamed.

Change Open %
Change from today's open to the current price. Same math as the former Chg Open % column; renamed.

Minervini x/8
Minervini trend template score from 0 to 8. Same math as the former MM column; renamed.

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.