Mag 7 VWAP TableThe **Mag 7 VWAP Table** is a real-time monitoring dashboard for the "Magnificent Seven" stocks. It provides a clean, professional table on your chart showing whether each stock is trading above or below its daily VWAP, its current price, and its intraday performance compared to yesterday's close.
---
## **Indicator Overview**
This script acts as a **market health dashboard**. By tracking the seven most influential stocks in the NASDAQ (AAPL, MSFT, GOOGL, AMZN, NVDA, META, TSLA), it gives traders an immediate sense of market sentiment. If the majority of these stocks are "ABOVE VWAP" and green, the broader market is likely in a strong bullish state.
### **Core Utility & Value**
* **Institutional Alignment:** VWAP (Volume Weighted Average Price) is the primary benchmark used by institutional traders. Knowing if the Mag 7 are above or below this level tells you if big money is buying or selling the "generals" of the market.
* **Screen Real Estate Efficiency:** Instead of opening seven different charts, you can monitor the most important tickers in the corner of your main trading screen.
* **Performance Tracking:** Real-time percentage change allows you to spot which of the tech giants is leading or lagging during the session.
---
## **Key Technical Features**
| Feature | Description |
| --- | --- |
| **Multi-Symbol Data** | Uses `request.security` to pull live data for all seven tickers simultaneously. |
| **Precision VWAP** | Calculates VWAP from a **1-minute base** (configurable). This ensures the "Daily VWAP" is hyper-accurate and resets exactly at the session open. |
| **Visual Alerts** | Uses a color-coded system (Teal/Red) for instant visual recognition of VWAP status. |
| **Zero-Lag Table** | Built using the `table` object, which remains fixed on your screen regardless of where you scroll on the chart. |
| **Version 6 Optimized** | Written in the latest **Pine Script v6**, ensuring maximum performance and compatibility with new TradingView features. |
---
## **How to Read the Table**
1. **Stock:** The ticker symbol (NASDAQ prefix removed for cleanliness).
2. **Price:** The current live market price of the asset.
3. **VWAP Status:** * **ABOVE VWAP (Teal):** Bullish. The stock is trading higher than the average price paid by all traders today, weighted by volume.
* **BELOW VWAP (Red):** Bearish. The stock is underperforming its daily average.
4. **% Change:** The net gain or loss since yesterday's 4:00 PM EST close. Includes dynamic arrows (**▲/▼**) for quick reading.
---
## **Pro Tip for Usage**
Since these stocks represent over **40% of the NASDAQ-100's weight**, use this table as a **confluence filter**. For example, if you are looking to take a "Long" trade on the QQQ or NQ futures, you would ideally want to see at least 5 out of the 7 stocks in this table showing **"ABOVE VWAP"**.
Индикаторы и стратегии
EMA CloudEMA Cloud
Description
EMA Cloud is a clean, highly customizable indicator that visualizes the relationship between 8-period and 21-period moving averages as a dynamic cloud overlay. Perfect for identifying trends, momentum shifts, and potential entry/exit zones at a glance.
🔑 Key Features
Dual EMA Support – Choose between EMA or SMA for both moving averages
Visual Cloud Overlay – Shaded cloud between EMA 8 and EMA 21 with customizable colors:
🟢 Bullish Cloud (green) when EMA 8 > EMA 21
🔴 Bearish Cloud (red) when EMA 8 < EMA 21
Adjustable Parameters – Customize EMA lengths, line widths, and cloud transparency
Toggle Display Options – Show/hide the cloud or EMA lines independently
Comprehensive Alert System – Get notified on:
EMA 8 crossing above/below EMA 21
Price crossing above/below EMA 8
Price crossing above/below EMA 21
📈 How to Use
Trend Identification – Green cloud indicates bullish momentum; red cloud signals bearish momentum
Entry Signals – Look for cloud color changes (crossovers) as potential entry points
Support/Resistance – The EMA lines within the cloud can act as dynamic support/resistance levels
Confirmation Tool – Combine with price action or other indicators for confluence
⚙️ Settings
Setting Description
EMA Type EMA or SMA
EMA 8 & 21 Length Customizable period lengths
Cloud Transparency Adjust opacity (0-100%)
Line Width Thickness of EMA lines
Colors Fully customizable bullish/bearish colors
Alerts 6 configurable alert conditions
💡 Best Practices
Works on all timeframes and all assets (stocks, forex, crypto, futures)
Lower timeframes: Use for scalping and intraday trades
Higher timeframes: Ideal for swing trading and trend following
Combine with volume analysis for stronger signals
Trade TrackerThis indicator is a lightweight trade P/L monitor that takes a manual entry price, direction (long/short), position size, and a configurable dollar value per point/tick.
It computes real-time profit/loss by comparing the current close to the entry price, converting the move into points and then dollars based on your size and tick value.
On the last bar, it draws an entry line at the specified price and renders a stacked label at that level showing Buy/Sell, size, dollar P/L (green/red), and the point P/L.
It continuously deletes and redraws the line/labels to keep the chart clean, and it also plots the entry price so the value is visible in the data window and price scale.
Z-Score STDEMA BandsZ-Score STDEMA Bands is a mean-reversion and regime-strength indicator built on normalized price deviation.
The indicator converts price into a Z-Score, measuring how many standard deviations the current price is from its moving average over a configurable lookback. This makes signals comparable across assets and timeframes.
On top of the Z-Score, the script applies an EMA of the Z-Score and dynamically builds upper and lower STDEMA bands using the rolling standard deviation of the Z-Score itself. These bands adapt to volatility in deviation, not price.
How to read it:
Z-Score (orange line): Distance from mean in standard deviations.
Horizontal levels (±1, ±2, ±3): Statistical extremes and mean-reversion zones.
Green/Red bands: EMA-based dynamic deviation envelopes.
Blue bars: Strong positive deviation (bullish expansion beyond statistical expectation).
Yellow bars: Strong negative deviation (bearish expansion beyond statistical expectation).
Use cases:
Identify overextended price conditions in a normalized framework.
Detect trend strength vs. mean-reversion (expansion outside bands).
Filter trades by statistical significance, not raw price movement.
Noise Filtererwhere is the money following/reallocating? Filterers out noise from other currencies. for example if USD is dominating, you can remove it and compare the others.
AI-Enhanced MSS HunterAI-Enhanced MSS Hunter
This indicator is a hybrid trading system that merges Mechanical Price Action (ICT Concepts) with Statistical Machine Learning (K-Nearest Neighbors). It is designed to assist traders in identifying high-probability reversals after liquidity sweeps, as well as trend-continuation entries during specific "Kill Zone" sessions.
How It Works
The script operates on a strict 3-step validation process to filter out false signals during choppy market conditions.
1. Liquidity Sweep (The Trigger) The system automatically plots the Previous Day High (PDH) and Previous Day Low (PDL).
The logic begins only when price "sweeps" (breaks) one of these key levels.
State Persistence: Once a level is swept, the system remembers this event for the remainder of the session (or until a signal fires), waiting for the market to reverse.
2. Market Structure Shift (The Setup) After a sweep, the indicator hunts for a Market Structure Shift (MSS).
It tracks dynamic Swing Highs and Swing Lows.
A signal is prepared only if price breaks a recent structural swing point in the opposite direction of the sweep (e.g., Sweep PDL -> Break Swing High).
3. AI / Machine Learning Filter (The Confirmation) To reduce false positives, the signal must be confirmed by a K-Nearest Neighbors (KNN) algorithm.
The Logic: The script analyzes the current values of RSI (14), CCI (14), and ROC (10).
The Comparison: It looks back at the last ~1,000 bars of history to find similar market conditions (neighbors).
The Prediction: If the majority of those historical "neighbors" resulted in a favorable move, the AI confirms the trade. If historical data suggests chop or reversal, the signal is blocked.
Key Features
🎯 Primary Reversal Signals (Circles)
Green Circle: Price swept PDL + Bullish MSS + AI Confirmation.
Red Circle: Price swept PDH + Bearish MSS + AI Confirmation.
♻️ Golden Zone Re-Entries (Triangles) Once a Primary Signal is active, the script tracks the new trend leg.
It automatically draws a dynamic Golden Zone (0.5 – 0.618 Fibonacci Retracement).
If price pulls back into this zone and forms a new MSS, a Re-Entry Triangle is plotted.
Invalidation: If the pullback breaks the original setup's low/high, the zone is removed to prevent bad trades.
⏰ Kill Zone Time Filters Signals are filtered by time to ensure you are trading during high-volume sessions.
Default AM Session: 08:30 – 10:00 (New York Time)
Default PM Session: 14:00 – 15:00 (New York Time)
Fully customizable in settings.
Settings Guide
Key Levels: Toggle PDH/PDL lines and customize colors.
Kill Zones: Enable/Disable time filtering and highlight background colors.
AI Settings:
K-Nearest Neighbors (k): Number of historical neighbors to compare (Default: 5).
Training Window: How far back the AI looks for patterns (Default: 1000 bars).
Visuals: Turn on/off the Golden Zone fib clouds or text labels.
Disclaimer
This tool is for educational purposes only. The "AI" component is a statistical classification algorithm based on historical momentum and does not guarantee future results. Always manage risk and use this indicator as part of a comprehensive trading plan.
All OB + FVG + Overlap Zones + Alerts (v6 safe)//@version=6
indicator(
"All OB + FVG + Overlap Zones + Alerts (v6 safe)",
overlay = true
)
// === USER INPUTS ===
maxBarsBack = input.int(500, "Max Bars Back to Display OB/FVG", minval = 1)
extendBars = input.int(10, "Extend OB/FVG Boxes Forward", minval = 1)
// === COLORS ===
bullOBColor = color.rgb(139, 0, 0) // Deep Red
bearOBColor = color.rgb(75, 0, 130) // Deep Purple
bullFVGColor = color.rgb(0, 100, 0) // Deep Green
bearFVGColor = color.rgb(184, 134, 11) // Deep Yellow
overlapColor = color.rgb(0, 255, 255) // Cyan for OB+FVG overlap
// === HELPER FUNCTION ===
inRange(offset) =>
bar_index - offset >= last_bar_index - maxBarsBack
// === ORDER BLOCK LOGIC ===
bullOB = close < open and close > open
bearOB = close > open and close < open
// === COLOR OB CANDLE ===
barcolor(
bullOB and inRange(1) ? bullOBColor :
bearOB and inRange(1) ? bearOBColor :
na,
offset = -1
)
// === DRAW EXTENDED OB BOXES ===
if bullOB and inRange(1)
box.new(
left = bar_index - 1,
right = bar_index - 1 + extendBars,
top = high ,
bottom = low ,
bgcolor = color.new(bullOBColor, 70),
border_color = bullOBColor
)
if bearOB and inRange(1)
box.new(
left = bar_index - 1,
right = bar_index - 1 + extendBars,
top = high ,
bottom = low ,
bgcolor = color.new(bearOBColor, 70),
border_color = bearOBColor
)
// === FVG LOGIC (3-candle imbalance) ===
bullFVGFormed = low > high
bearFVGFormed = high < low
// === DRAW FVG BOXES AND STORE TOP/BOTTOM ===
var float bullFVGTop = array.new_float()
var float bullFVGBot = array.new_float()
var float bearFVGTop = array.new_float()
var float bearFVGBot = array.new_float()
var box bullFVGBoxes = array.new_box()
var box bearFVGBoxes = array.new_box()
if bullFVGFormed and inRange(2)
fvgBox = box.new(
left = bar_index - 2,
right = bar_index - 2 + extendBars,
top = low,
bottom = high ,
bgcolor = color.new(bullFVGColor, 80),
border_color = bullFVGColor
)
array.push(bullFVGBoxes, fvgBox)
array.push(bullFVGTop, low)
array.push(bullFVGBot, high )
if bearFVGFormed and inRange(2)
fvgBox = box.new(
left = bar_index - 2,
right = bar_index - 2 + extendBars,
top = high,
bottom = low ,
bgcolor = color.new(bearFVGColor, 80),
border_color = bearFVGColor
)
array.push(bearFVGBoxes, fvgBox)
array.push(bearFVGTop, high)
array.push(bearFVGBot, low )
// === CHECK AND HIGHLIGHT OB + FVG OVERLAPS ===
var float overlapLevelsTop = array.new_float()
var float overlapLevelsBot = array.new_float()
if bullOB and inRange(1) and array.size(bullFVGBoxes) > 0
for i = 0 to array.size(bullFVGBoxes) - 1
obTop = high
obBot = low
fvgTop = array.get(bullFVGTop, i)
fvgBot = array.get(bullFVGBot, i)
overlapTop = math.min(obTop, fvgTop)
overlapBot = math.max(obBot, fvgBot)
if overlapTop > overlapBot
box.new(
left = bar_index - 1,
right = bar_index - 1 + extendBars,
top = overlapTop,
bottom = overlapBot,
bgcolor = color.new(overlapColor, 80),
border_color = overlapColor
)
array.push(overlapLevelsTop, overlapTop)
array.push(overlapLevelsBot, overlapBot)
if bearOB and inRange(1) and array.size(bearFVGBoxes) > 0
for i = 0 to array.size(bearFVGBoxes) - 1
obTop = high
obBot = low
fvgTop = array.get(bearFVGTop, i)
fvgBot = array.get(bearFVGBot, i)
overlapTop = math.min(obTop, fvgTop)
overlapBot = math.max(obBot, fvgBot)
if overlapTop > overlapBot
box.new(
left = bar_index - 1,
right = bar_index - 1 + extendBars,
top = overlapTop,
bottom = overlapBot,
bgcolor = color.new(overlapColor, 80),
border_color = overlapColor
)
array.push(overlapLevelsTop, overlapTop)
array.push(overlapLevelsBot, overlapBot)
// === ALERT CONDITIONS ===
overlapAlert = false
for i = 0 to array.size(overlapLevelsTop) - 1
if close <= array.get(overlapLevelsTop, i) and close >= array.get(overlapLevelsBot, i)
overlapAlert := true
// === ALERTCONDITION (v6 compatible) ===
alertcondition(overlapAlert, "OB + FVG Overlap", "⚡ Price entered an OB + FVG overlap zone! ⚡")
alertcondition(bullOB, "Bullish OB Formed", "🔴 Bullish OB formed!")
alertcondition(bearOB, "Bearish OB Formed", "🟣 Bearish OB formed!")
gilgamesh v8A simple strategy indicator ,works based on orb and other confluence ,to be traded at newyork open ,the session is from 9:30 - 11: 15
BUY SIGNAL - Green candle + Green arrow
SELL SIGNAL - Red candle + Red arrow
is momentum and impulse based day trading so tight sl and short targets but feel free to mess around or find your own edge or approach ,during development 20 pips sl , 1: 2 target (40 pips tp) looked good on GBPUSD but yet to backtest, and since it is based on Ny open should work good on indices too
NOTE
candle is always green and red above or below range and arrow always show when there is volume and momentum so taking 1 trade at a time ,adding to winner and all is up to you, its
momentum based so choppy market conditions will to rough bad days but depending on utilization the edge and setup is actually profitable
P/E Ratio (TTM)This indicator plots the trailing P/E ratio (TTM) using GAAP EPS (TTM) sourced directly from TradingView’s fundamental data. It includes valuation‑zone color coding, yearly labels, and a clean, compressed visual layout suitable for most equities.
The goal is to provide a fast, intuitive view of how expensive or cheap a stock is relative to its historical earnings power.
Note:
The indicator caps P/E values around 120 for visual clarity.
Negative P/E ratios are intentionally excluded, since P/E is undefined when EPS is negative.
You can adjust the cap or remove it entirely if you prefer a full‑range view.
This tool is especially useful for identifying periods when a company is trading at historically elevated or discounted valuation levels.
ORB - BO-RT-ENThis script is designed for the Opening Range Breakout (ORB) trader who seeks high-probability entries through price action confirmation. Unlike standard breakout tools that trigger on the first touch, this indicator requires a three-step validation process: Breakout, Retest, and Momentum Confirmation.
High-Level Summary
The script identifies the high and low of the first 5 minutes of the trading session (adjustable via inputs). It then monitors price action to find a confirmed breakout outside this range. To filter out "fakeouts," the script requires the price to return and touch the broken level (the retest) before signaling an entry. If at any point the price closes back inside the opening range before the setup is complete, the trade is invalidated and the sequence resets.
Core Features
Sequential Signal Logic: Tracks the BO → RT → ENTRY process across distinct candles to prevent early entries.
Momentum Confirmation: Entry arrows only trigger after a user-defined candle delay and a close in the trend direction.
Visual Clarity: Plots high-visibility 5-minute range lines that persist until the market close.
Advanced Invalidation: Automatically cancels setups if a "stop-run" or fakeout closes price back within the range.
Scanner Ready: Includes specific alertcondition calls for Breakouts, Retests, and Entries, making it compatible with the TradingView Stock Screener.
How to Use the Script (Steps to Play)
1. Setup the Timeframe
Apply the indicator to a 1-minute chart. While the opening range is calculated based on the first 5 minutes, the entry logic requires the granularity of the 1-minute timeframe to detect precise retests.
2. Define the Range
By default, the script calculates the range from 09:30 to 09:35 EST. If you trade a different market (e.g., London Open or Crypto), adjust the "Opening Range Period" in the settings.
3. Monitor for the Breakout (BO)
Wait for a 1-minute candle to close above the High or below the Low. A label marked "BO" will appear on your chart.
4. The Retest (RT)
After the breakout, look for the price to "wick" or touch the breakout line. A triangle marked "RT" will appear.
Note: If the price closes back inside the range during this phase, the labels will disappear, signaling an invalid setup.
5. Execution (ENTRY)
Once the retest is complete, wait for the "ENTRY" arrow. This triggers when:
The user-defined candle delay (default: 1 bar) has passed since the retest.
The candle closes in the direction of the breakout (Green for Long / Red for Short).
6. Exit Strategy
Following the original strategy parameters, place your Stop Loss at the opposite end of the 5-minute opening range and set your Take Profit at a 2.0 Risk-to-Reward (2R) ratio from your entry price.
Vertical Line Every 5 Minutes (Customizable)Creates a vertical line every 5 minutes on the sub charts
Gap Boxes extended_customizableSimple indicator denoting gaps on the chart, along with option to have labels according to the percentage of the gap up or gap down. Enjoy
Mentor Michael | XAUUSD Short BiasMentor Michael | XAUUSD Market Structure & Short Bias
This indicator is a visual price-action framework designed for traders who analyze Gold (XAUUSD) using institutional concepts rather than lagging indicators.
The script highlights high-probability decision zones by mapping key areas where liquidity, supply, and demand are most likely to influence price behavior. It is intended for educational and discretionary trading, not automated execution.
Core Features
Higher-Timeframe Resistance Zone
Identifies premium pricing areas where selling pressure and profit-taking are statistically likely.
Range & Accumulation Mapping
Visually marks prior consolidation zones to provide context for current market positioning.
Demand Reaction Area
Highlights zones where buyers previously reacted, helping define structural invalidation.
Projected Downside Target
Displays logical price objectives based on range equilibrium and liquidity attraction.
Directional Bias Label
Keeps the trader aligned with the planned market narrative and risk framework.
Trading Philosophy
This indicator is built around:
Market structure
Liquidity behavior
Premium vs. discount pricing
Mean-reversion probability after expansion
It supports traders in identifying where to trade, not when to trade, encouraging patience, confirmation, and proper risk management.
Best Use Case
Top-down analysis (D1 → H4 → H1)
Confluence-based trade planning
Educational chart sharing
Manual execution with confirmation
Important Notice
This tool does not provide buy/sell signals, alerts, or automated trades.
All levels are reference zones, not guarantees. Always apply your own confirmation and risk management.
Vertical Line Every 15 Minutes (Customizable)Draws a vertical line every 15 mins on lower time frame charts
Candle Close CounterThis indicator counts how many candles have closed above, below, or exactly at a user-defined price level
starting from a specified time. It provides real-time statistics to help traders analyze price behavior
around key levels.
HOW IT WORKS:
The indicator begins counting at your chosen start time and tracks each candle's closing price relative
to your specified price level. It maintains running totals of candles that close above, below, and at
the price level, displaying this information both in a chart label and a statistics table.
PRACTICAL APPLICATIONS:
1. CONSOLIDATION ANALYSIS:
Use this tool to identify and measure consolidation patterns by placing the price level at the midpoint
of a trading range. A balanced count of candles closing above and below the midpoint suggests genuine
consolidation with no directional bias.
2. RANGE MIDPOINT MONITORING:
During consolidation phases, set the price level to the 50% retracement of the range midpoint between
the high and low. Monitor how price interacts with this level over time.
3. SUPPORT/RESISTANCE VALIDATION:
Place the price level at a key support or resistance zone and start counting from a significant market
event (news release, session open, etc.). The distribution of closes helps validate whether the level
is holding or weakening.
4. SESSION ANALYSIS:
Set the start time to the beginning of a trading session (e.g., 9:30 AM ET for regular hours) and place
the level at the opening price or previous day's close.
Evil MACD Trading System (Pine Script v6)Indicator Overview
The Evil MACD Trading System is an enhanced version of the classic MACD indicator, optimized for TradingView with Pine Script v6. It integrates trend filtering, volume confirmation, and precision signal positioning to reduce false signals and improve trading decision accuracy—distinguishing itself from the traditional 12/26/9 MACD by focusing on trend-aligned entries and exits.
Core Logic & Features
1. Enhanced MACD Calculation
Departing from the standard MACD parameters, this system uses customizable fast (default:14), slow (default:28), and signal (default:8) periods to adapt to different market volatility and asset types (stocks, futures, cryptos). The core DIF, DEA, and histogram are retained while optimized for better sensitivity to medium-term trends.
2. Trend Filtering Mechanism
A 60-period EMA (adjustable) acts as the primary trend filter, ensuring buy signals only trigger in uptrends (price above EMA) and sell signals in downtrends (price below EMA). This avoids counter-trend trades and minimizes exposure to sideways market noise.
3. Volume Confirmation (Toggleable)
The optional volume filter validates signals by requiring trading volume to exceed 120% of the 20-period average volume. This ensures entries/exits are supported by capital flow, reducing false breakouts/breakdowns.
4. Precision Signal Positioning
Signals are overlaid directly on the price chart (not the subwindow) for intuitive price correlation. Buy signals (green upward triangles + "Buy" label) attach to the bottom of candlesticks, while sell signals (red downward triangles + "Sell" label) align with candlestick highs—adjustable offset parameters let users fine-tune signal proximity to price.
Usage Guidelines
- Buy Signal: Triggered when DIF crosses above DEA, price stays above the 60-period EMA, and volume (if enabled) meets the 120% threshold.
- Sell Signal: Triggered when DIF crosses below DEA, price stays below the 60-period EMA, and volume (if enabled) meets the 120% threshold.
- Customization: Adjust MACD periods, trend filter length, volume sensitivity, and signal offset to match your trading style (scalping, swing trading) and target assets.
Compatibility & Notes
Built for Pine Script v6 (latest TradingView version) with no syntax errors. The indicator supports all timeframes and asset classes. For best results, combine with additional technical tools (support/resistance, RSI) for multi-factor confirmation. Disable the volume filter in low-liquidity markets to avoid missing valid signals.
Volume Delta Highlighted (Pane)A simple volume delta indicator that highlights blue when the bar has no wicks and white with it has only opposite end wicks ,a good confluence and visual
note :
not as accurate as the paid tradingview indicator since it uses chart data
Punchak Levels1. Enter the start date/time and end date/time of Punchak.
2. Enter the multipler of punchak range (default is 0.25).
3. Enter how many levels you want to plot.
Time Zones PROGeopbytech – Time Zones PRO (v6)
Geopbytech – Time Zones PRO is a professional market session indicator designed for intraday, scalping, and Smart Money Concepts (SMC) traders who want precise market timing and clean chart context.
This indicator allows you to visualize up to 5 configurable market sessions in a single script, fully adaptable to any timezone and trading style.
5 independent sessions (ON / OFF per session)
Custom session time ranges
Editable timezone (IANA format: America/New_York, Europe/London, UTC, etc.)
Soft and clean background shading
Session start flag (🚩) printed at the exact opening candle
Works on Forex, Indices, Gold, and Crypto
Built with Pine Script v6 (latest version)
Common Use Cases
London Session – Early liquidity grabs and manipulation
New York Killzone – High-probability SMC entries
Asia Range – Range building and target mapping
Custom sessions based on your local timezone
Easy Configuration
All settings are accessible from the indicator panel:
Enable or disable each session
Edit session names and time ranges
Adjust background colors
Select your real local timezone
Toggle session start flags on or off
No need to load multiple indicators — everything is centralized into one professional tool.
Indicator Philosophy
This indicator does NOT provide buy or sell signals.
Its purpose is to provide market context, timing, and structure , helping traders focus only on periods where institutional liquidity is active.
Perfectly compatible with:
Smart Money Concepts (SMC)
Order Blocks
Fair Value Gaps (FVG)
Market Structure
Liquidity Sweeps
Author
Geopbytech – Juan Delgado
Disclaimer
This indicator is for educational purposes only.
It does not constitute financial advice.
Always trade with proper risk management.
Uptrick: Price Memory Trend StrategyHere are clear, structured notes explaining the Pine Script code — the simplified "LSTM-like" trend predictor you were given earlier.
Overall Purpose of the Script
The script tries to imitate LSTM memory behavior (long-term memory + selective forgetting/updating) using only Pine Script's basic math and variables — because real LSTM neural networks (with matrices, multiple gates, backpropagation) are not possible in Pine.
It creates a persistent memory line that:
slowly forgets old information,
selectively accepts new price information,
tries to act as a trend-following / regime-detecting centerline.
Then it uses momentum of this memory line + deviation size to decide whether the market is in an uptrend or downtrend.
Key Sections Explained
1. Inputs (tunable parameters)
pinescriptmemoryStrength = input.float(0.14, "Forget Gate strength (like 1-f)", step=0.01, minval=0.01, maxval=0.99)
inputGate = input.float(0.22, "Input Gate strength", step=0.01, minval=0.01, maxval=1.0)
cellDecay = input.float(0.965, "Cell state decay", step=0.001, minval=0.8, maxval=0.999)
lookback = input.int(21, "Lookback for momentum", minval=5)
sensitivity = input.float(1.35, "Trend sensitivity multiplier", step=0.05)
ParameterWhat it controlsTypical effectHigher value means…memoryStrengthHow aggressively old memory is forgottenControls "forget gate" strengthForgets faster, more responsiveinputGateHow much new price is allowed into memoryControls how much price influences cellMemory follows price more closelycellDecayNatural fading of long-term memory per barPrevents memory from living foreverLower = memory fades fasterlookbackPeriod for momentum and deviation calculationSmoothness of trend detectionLonger = smoother, fewer signalssensitivityHow strong momentum must be to flip trendFinal trigger strictnessHigher = fewer but stronger signals
2. Memory Variables (the "LSTM core")
pinescriptvar float cell = na // long-term memory ≈ cell state C
var float hidden = na // short-term state ≈ hidden state h
if bar_index == 0
cell := price
hidden := price
cell → tries to act like LSTM cell state (long memory)
hidden → tries to act like LSTM hidden state (what we actually observe/use)
3. Simplified Gates
pinescriptforget = math.tanh(hidden * memoryStrength)
i_gate = math.tanh(price * inputGate)
candidate = price - hidden
forget — value between -1 and +1, but we treat higher positive = forget more
i_gate — how much new info we want to accept
candidate — the new information we could add (difference from current hidden)
Very crude approximation — real LSTM uses sigmoid + learned weights.
4. Core LSTM-like Update Rule
pinescriptcell := cell * (1 - forget) + candidate * i_gate
cell := cell * cellDecay
hidden := cell * 0.65 + price * 0.35
This is the heart of the "fake LSTM":
Keep (1 – forget) of old cell
Add a portion (i_gate) of the candidate change
Apply slow exponential decay (cellDecay < 1)
Hidden state = mix between long memory and current price
→ base = hidden becomes our smoothed, memory-aware centerline.
5. Trend Detection Logic
pinescriptmom = ta.change(base, lookback) // how much did memory move in last N bars?
dev = math.abs(price - base) // how far is price from memory center?
avgDev = ta.ema(dev, lookback * 2) // smoothed deviation size
trendScore = (mom / avgDev) * sensitivity // normalized momentum × sensitivity
Normalizes momentum by current volatility/deviation
High positive → strong upward memory movement → likely uptrend
High negative → strong downward memory movement → likely downtrend
6. Trend State Machine (non-repainting flip)
pinescriptvar int trend = 0 // 1 = Up, -1 = Down, 0 = Neutral
bullCondition = trendScore > 1.0 and trendScore <= 1.0
bearCondition = trendScore < -1.0 and trendScore >= -1.0
if bullCondition
trend := 1
else if bearCondition
trend := -1
else
trend := nz(trend )
Only changes trend when crossing the threshold from the other side
Prevents flickering / frequent flipping
Persistent until strong opposite signal appears
7. Visualization Summary
Background tint (light green/red)
Thick memory line (changes color with trend)
Dashed ±1.6× deviation bands
Big up/down labels on trend flips
Alert conditions on every new trend direction
Quick Tuning Guide
GoalSuggestionFewer but stronger signals↑ sensitivity (1.6–2.2), ↑ lookback (30–60)More responsive / earlier entries↑ inputGate, ↓ cellDecay, ↓ memoryStrengthSmoother memory line↓ inputGate, ↑ cellDecay (0.98+)Better in choppy markets↑ lookback, ↑ sensitivityBetter in trending markets↓ lookback, moderate sensitivity (~1.2–1.5)
Most Important Takeaway
This is not a real LSTM — it's a hand-crafted, analog-style memory filter inspired by LSTM ideas.
It tries to combine:
slow-adapting memory (like EMA but with forgetting control)
selective update depending on current deviation
momentum-of-memory as trend strength
Many traders find this kind of memory line more "intelligent" than simple moving averages when tuning the forget/input/decay parameters to match the market personality.
LT - Vertical Line Every Minute (Customizable)Prints a vertical line every minute on the sub-minute charts
NQ Top 2025 Stocks Screener by ProjectSyndicate📊 NQ Top 2025 Stocks Screener (TradingView) — by ProjectSyndicate
Executive Summary
This document provides comprehensive documentation for the NQ TOP 2025 Stocks Screener, a powerful Pine Script™ indicator for TradingView.
The screener is designed to give traders and investors a high-level overview of performance and advanced risk metrics for a curated list of 40 top-performing Nasdaq stocks in 2025. By presenting rich data in a clean, customizable dashboard, users can quickly:
• Identify market leaders
• Assess risk-adjusted returns
• Make more informed trading decisions
The script includes performance metrics across multiple timeframes, plus sophisticated risk and volatility parameters—such as the Kelly Criterion, Sharpe Ratio, and Z-Score—often found in professional-grade institutional tools.
________________________________________
⭐ Top 10 Key Features
# Feature Description
1 Curated Stock List Monitors a list of 40 hand-picked, high-performing Nasdaq stocks.
2 Multi-Timeframe Performance Tracks performance across 6 timeframes: Week, Month, Quarter, 6 Months, 12 Months, and YTD.
3 Advanced Risk Metrics Includes institutional-grade metrics: Beta, Sharpe, Sortino, Omega, Z-Score, Kelly%.
4 Dynamic Sorting Sort the dashboard by any of the 6 performance metrics to instantly find top movers.
5 Customizable Dashboard Control table position (Top/Middle/Bottom + Left/Center/Right) and text size (Small/Normal/Large).
6 Color-Coded Performance Uses a 7-level gradient (bright green → bright red) for quick strength/weakness scanning.
7 Merged Title Heading Full-width title at the top for a clean, professional dashboard look.
8 Daily Timeframe Lock Detects non-daily timeframes and prompts a switch to ensure calculation accuracy.
9 Clean & Readable Code Well-organized and commented for easier understanding and modification.
10 Lightweight & Efficient Optimized to run smoothly on TradingView with minimal lag.
________________________________________
📖 Overview
The NQ TOP 2025 Stocks Screener brings institutional-style market analysis to everyday traders.
Instead of reviewing dozens of individual charts, it consolidates the most important data points for 40 Nasdaq stocks into a single, elegant dashboard—helping users save time and quickly spot opportunities while staying aware of risk.
________________________________________
🛠️ Installation
1. Open TradingView and navigate to any chart.
2. Open the Pine Editor tab at the bottom of the screen.
3. Copy the entire script from NQ_TOP_2025_Stocks_Screener.pine.
4. Paste it into the Pine Editor (replacing any existing text).
5. Click Add to Chart.
✅ The dashboard will appear on your chart.
📌 Recommended timeframe: Daily (for accurate calculations).
________________________________________
📊 Dashboard Layout (16 Columns)
# Header Description
1 No. Rank of the stock based on the current sort order.
2 Ticker Stock ticker symbol.
3 Stock Name Company name.
4 Week% % price change over the last week.
5 Mnt% % price change over the last month.
6 Quarter% % price change over the current quarter.
7 6Mnt% % price change over the current 6 months.
8 12Mnt% % price change over the current 12 months.
9 YTD% % price change from the start of the current year.
10 Wk Vol Annualized weekly volatility.
11 Beta Volatility relative to Nasdaq-100 (QQQ).
12 Sharpe Sharpe Ratio (risk-adjusted return).
13 Sortino Sortino Ratio (downside-risk focused).
14 Omega Omega Ratio (probability of gains vs losses).
15 Z-Score Distance from mean in standard deviations.
16 Kelly% Kelly Criterion (theoretical optimal position sizing).
________________________________________
🔬 Advanced Risk & Volatility Parameters
This screener goes beyond basic performance to provide deeper risk insight.
Parameter Description
Wk Vol (Weekly Volatility) Annualized standard deviation of weekly returns. Higher = larger price swings.
Beta Volatility vs Nasdaq-100 (QQQ). Beta > 1 = more volatile than index; Beta < 1 = less volatile.
Sharpe Ratio Excess return per unit of total volatility. Higher = better risk-adjusted return.
Sortino Ratio Like Sharpe, but only uses downside volatility (penalizes harmful volatility).
Omega Ratio Probability-weighted gains vs losses relative to a threshold. Higher = more favorable return distribution.
Z-Score How far a value is from its mean (in standard deviations); helps detect extremes vs average behavior.
Kelly% (Kelly Criterion) Suggests an optimal allocation % based on performance and variance (theoretical position sizing).
________________________________________
⚙️ Customization (Settings Menu)
You can customize the dashboard appearance and behavior via the script settings:
• Table Position: Choose vertical (Top/Middle/Bottom) and horizontal (Left/Center/Right) placement
• Text Size: Small / Normal / Large
• Sort By: Select the primary sorting column from any of the 6 performance metrics
________________________________________
📋 Stock List (40 Nasdaq Stocks)
The screener includes the following top-performing Nasdaq stocks in 2025:
HYMC, CELC, TERN, AUGO, ONDS, ERAS, ASTS, GRAL, SATS, WDC, COGT, ATRO, OPEN, VSAT, APLD, LASR, PRAX, ALMS, MU, TTMI, ARWR, LITE, CIFR, SSRM, FTAI, MLYS, KTOS, GPCR, RKLB, STX, NVTS, VISN, EOSE, RVMD, LQDA, PPTA, WBD, INDV, ACMR, BLTE






















