Ultimate📖 Indicator Description – Ultimate
The Ultimate Indicator is a complete charting framework that combines linear regression channels, dynamic deviation bands, EMA ribbons, volatility spreads, and entry/exit markers. It is designed to help traders visualize trend direction, potential reversals, and trade setups with precision.
🔹 What You See on the Chart
Channel Lines (Linear Regression Bands)
Green dotted line (median): Fair value trendline based on regression.
Red dashed line (upper band): Dynamic resistance zone.
Blue dashed line (lower band): Dynamic support zone.
Mid-bands (thin dotted red/blue): Halfway between median and outer bands, useful for scaling entries or partial exits.
🔹 EMA Ribbon (Light Green Shades)
Multiple EMAs (5, 8, 13, 21, 34) plotted in progressively lighter green.
Helps visualize momentum shifts and trend strength.
Ribbon turns more aqua/green when short-term EMAs align bullishly.
🙌Markers on Price
🔴 Red Circle (Dot): Short entry signal (price rejecting upper deviation band).
🔵 Blue Circle (Dot): Long entry signal (price bouncing off lower deviation band).
❌ Red X: Peak formation detected, potential short setup (not always valid).
🔷 Blue Diamond: Trough formation detected, potential long setup (not always valid).
Numbers Above/Below Candles
🔴Red numbers (above peaks): % spread from the bottom to the peak, showing upward volatility.
🔵 Blue numbers (below troughs): % spread from the top to the trough, showing downward volatility.
These values help traders gauge the strength of recent swings and compare volatility expansions.
🔹 Signal Logic🔹
🔵Long Signal (Blue Circle):
Forms when price makes a trough and crosses back above the lower regression band.
Confirms potential upside reversal with stop-loss guided by ATR or swing low.
🔴Short Signal (Red Circle):
Forms when price makes a peak and crosses below the upper regression band.
Confirms potential downside reversal with stop-loss guided by ATR or swing high.
❌ Peaks (Red X):
Indicate local tops. Not all peaks convert into shorts, but they warn of resistance zones.
🔹Troughs (Blue Diamonds):
Indicate local bottoms. Not all troughs convert into longs, but they warn of support zones.
🔹 Alerts
When a valid long or short setup is confirmed, an alert fires with:
Ticker name
Entry price
Suggested position size (Quantity)
Stop loss level (ATR-based or HL-based)
Take profit level (calculated by reward multiple)
🔹 Inputs & Customization
Quantity: Lot size suggestion.
Deviation: Multiplier for regression channel width.
Take Profit: Risk-to-reward multiplier.
Stop Loss: ATR or High/Low based.
Trend Lines: Choose between extended or fixed channels.
Period: Lookback window for regression.
Spread Percentages: Toggle volatility labels on/off.
🔹 How to Use
Trend Following: Ride price inside the channel using EMA ribbon alignment.
Reversal Trading: Enter at deviation extremes with confirmation signals.
Volatility Mapping: Use spread % labels to measure the strength of market swings.
Risk Management: ATR-based stops adapt to volatility, while HL stops give structural support/resistance.
✅ In summary:
The Ultimate Indicator is not just a regression channel—it’s a multi-layered system that highlights trend bias, entry/exit signals, volatility spreads, and adaptive risk levels. It allows traders to see at a glance whether the market is trending, ranging, or preparing for a reversal.
Educational
Iani SMC Sniper XAU v2.2 (Long+Short + News Countdown, v6)Iani SMC Sniper XAU (v2.2) — smart-money logic for XAUUSD.
This indicator hunts “sniper entries” using a simple SMC sequence:
Sweep → BOS → 50% FVG entry
• After London session builds its range, we wait for a liquidity sweep (price dips below London Low for longs / wicks above London High for shorts).
• A BOS confirms direction (close breaks the last swing).
• First FVG that prints after BOS gives the entry at 50% (mid-gap).
• SL anchored to the protective swing (with a small safety buffer). TP is plotted using your Risk:Reward.
News countdown (non-blocking):
The script does not auto-fetch news; you set daily times (e.g., 14:30, 16:00) and/or specific dates (“YYYY-MM-DD HH:MM”). A countdown label shows “NEWS in Xm”. Signals are not blocked—this is just a safety heads-up for prop-firm rules.
Inputs: pivot length, RR, pip size (XAU default 0.10), session filter (after London), news times (recurring & absolute), show/hide levels & labels.
Plots & labels: London High/Low (daily), Entry/SL/TP lines, BOS/Sweep/BUY/SELL markers, news badge.
Alerts: BOS Bull/Bear, BUY/SELL Entry touch, TP/SL hit, NEWS WARNING.
Notes:
• Designed for XAUUSD intraday; works on other symbols if you adjust pip size.
• Uses symbol timezone; adjust your news times for DST if needed.
• Indicator only—no orders, no backtest. Manage risk and execution in MT5/your platform.
Changelog (v2.2): Pine v6, robust time parsing, one-line logical expressions (fixed EOL errors), mirrored short logic, cleaner London H/L reset, countdown label.
Disclaimer: Educational tool, not financial advice. Past performance ≠ future results.
Tags: SMC, ICT, XAUUSD, Gold, Liquidity Sweep, BOS, FVG, London Session, News, Intraday, Scalping, DayTrading.
Iani SMC Sniper XAU v2.2 (Long+Short + News Countdown, v6)Iani SMC Sniper v2.6 — Anytime • Auto Pip • FVG 50% • OB • News Panel
Smart-Money Concepts made simple for intraday XAU/USD (works on any symbol).
Finds BOS, 50% FVG “sniper” entries, optional Order Blocks, London H/L, news countdown, and a mini info panel.
What it does
BOS (Break of Structure): detects bullish/bearish BOS after London sweep logic.
FVG 50% entries: plots precise long/short entry dots at the midpoint of the gap.
Auto TP/SL: TP = RR × risk, SL below/above recent swing with a small buffer.
Order Blocks (optional): marks the last opposite candle after BOS and alerts on OB revisit.
London High/Low: tracks session range; session filter is optional.
News countdown: shows next event time and minutes left (user-selectable timezone).
Mini Panel: top-left table with Trend (last BOS), Next news, R:R, Pip size.
Inputs (key)
Auto pip size: uses syminfo.mintick. Manual override available.
Risk:Reward (RR): default 2.0.
Pivot length: swing sensitivity.
Sessions: enable if you want signals only 12:00–20:00 (symbol timezone). Off = anytime.
News timezone: pick your own (e.g., Europe/Brussels, America/New_York).
Absolute & daily times: add your events (strings like 2025-09-17 20:00 or 14:30,16:00…).
Show labels/levels/OBs: toggle on/off.
Alerts included
BOS Bullish / BOS Bearish
BUY Entry / SELL Entry (return to 50% FVG)
Bullish OB revisit / Bearish OB revisit
TP Long/Short reached, SL Long/Short hit
NEWS WARNING (warning window only; does not block signals)
To use: Add Alert → Condition: this indicator → choose any of the alertconditions.
Best use
Bias: H1 for structure.
Execution: M15 (standard) or M5 (aggressive).
Works great on XAUUSD, but is symbol-agnostic (auto pip adapts).
Notes
News times display in the timezone you pick in settings.
OBs are a simple implementation meant for quick visual guidance.
Labels: BUY/SELL near entries, TP/SL on set and when hit, BOS up/down.
Risk disclaimer
This tool is for education only. Not financial advice. Backtest and manage risk.
Smart Index Levels — GSK-VIZAG-AP-INDIA📌 Smart Index Levels — GSK-VIZAG-AP-INDIA
Smart Index Levels is a versatile support and resistance plotting tool designed for intraday, weekly, and monthly analysis.
It automatically generates key price zones based on user-defined step sizes, helping traders visualize important market levels more clearly.
🔹 Features
Daily / Weekly / Monthly Modes
Switch easily between daily, weekly, or monthly reference levels.
Customizable Level Steps
Choose step intervals of 50 or 100 points for cleaner index-based zones.
Support & Resistance Zones
Auto-draws multiple support and resistance levels around the opening base price.
Mid-Level Marking
Highlights the nearest “mid” price level for balance reference.
Weekly High/Low Tracking (Optional)
Plots dynamic weekly high & low levels with dotted lines.
Monthly High/Low Tracking (Optional)
Displays monthly high & low levels for broader market context.
Custom Market Session Timing
Define your own market open and close times.
Line Style & Colors
Fully customizable line styles (solid, dashed, dotted) and colors.
⚙️ How It Works
At the start of the selected session (daily, weekly, or monthly), the script identifies the opening reference price.
From this base, it calculates and draws support and resistance levels at fixed step intervals.
Optionally, it overlays weekly and monthly high/low levels for additional perspective.
This provides a structured price map that helps you quickly spot potential reaction zones, without cluttering the chart.
🖥️ Best Use Cases
Intraday index traders who want quick reference levels (Nifty, BankNifty, etc.)
Swing traders who prefer weekly and monthly zones for context.
Anyone looking for clean, rule-based support/resistance plotting.
⚠️ Disclaimer
This indicator is for educational and informational purposes only.
It does not provide financial advice or trading signals. Always use in combination with your own analysis and risk management.
Grand Slam Risk ManagementGrand Slam Risk Management (GSRM) Indicator
OVERVIEW
The Grand Slam Risk Management Indicator transforms complex position sizing calculations into real-time, visual risk metrics—enabling disciplined trading decisions without the emotional guesswork that destroys accounts. This comprehensive tool is designed for active day traders and swing traders who want to automate critical risk management calculations directly on their TradingView charts. 🚀
THE GRAND SLAM RISK MANAGEMENT STRATEGY
Core Philosophy
The Grand Slam Risk Management Strategy (GSRM) gets its name from baseball's ultimate scoring play: a grand slam can only be hit when three runners are already on base, requiring at least three prior successful at-bats (hits or walks) to create the opportunity. This perfectly embodies the GSRM philosophy—consistent "base hits" in trading create the foundation for larger wins while protecting your account from devastating losses. Just as baseball teams win championships through disciplined, consistent play rather than swinging for the fences every at-bat, successful traders build wealth through reliable, repeatable profits rather than chasing home runs that often result in strikeouts. ⚾
Strategy Framework
Capital Allocation : 💰
• Working Balance: Account balance minus PDT requirement ($25,000 minimum for margin accounts)
• Allocated Buying Power: Working balance × leverage (4:1 for day trading, 2:1 for swing, 1:1 for cash)
• Daily Profit Target: 5% of allocated buying power (default)
The Base Hit System : 🎯
• Daily profit target divided into 4 "base hits"
• Each base hit represents 25% of daily goal
• Max risk per trade: 50% of base hit target (maintains 2:1 reward/risk minimum)
• Daily max loss: 2 base hits (recoverable with 2 winning trades)
Three-Tier Profit Structure : 🚀
• Tier 1 (5%): Minimum acceptable profit - "Why else take the trade?"
• Tier 2 (10%): Solid win - the target "base hit"
• Tier 3 (20%): Home run - when momentum is strongly in your favor 🏠🏃
Position Sizing Levels : 📊
• Quarter Position (25% of max): Testing the waters, lower conviction setups
• Half Position (50% of max): Standard confidence trades
• Max Position (100%): High conviction, ideal setup conditions
INDICATOR FEATURES
Real-Time Calculations ⚡
• Dynamic Position Sizing: Automatically calculates share quantities based on account balance and current price
• Profit & Loss Targets: Displays dollar amounts for profit targets and stop-losses across all position sizes
• Risk Metrics: Shows daily profit goals, max loss thresholds, and P&L ratios
Advanced Stop-Loss Methods 🛡️
1. Percentage-Based Stops : Fixed 50% of profit target (maintains 2:1 reward/risk)
2. ATR-Based Stops : Dynamic stops that adapt to market volatility using Average True Range (ATR)
• Tier 1: 0.5× ATR (tight/scalping)
• Tier 2: 1.0× ATR (standard)
• Tier 3: 1.5× ATR (wide/trending)
Cost Basis Options 📈
• Last Close: Uses previous bar's closing price for stable calculations
• VWMA: Volume-Weighted Moving Average (default: 9) estimate cost-basis from recent volume-weighted price action
• SMA/EMA: Use Simple or Exponential Moving Average (default: 9) useful for planning entries at SMA/EMA cross-overs and bounces.
• VWAP: Volume-Weighted Average Price (default: daily) for entry point planning at bounce or break of VWAP.
* Ask/Bid: Entry point calculations based on current Ask or Bid price (only available on 1T charts)
Visual Risk Management 🔑
• Color-Coded P&L Ratio :
- Green (≤0.5): Conservative, favorable risk ✅
- Yellow (0.5-1.0): Balanced risk ⚠️
- Red (>1.0): Aggressive, requires higher win rate 🛑
• Position Size Color Coding : Green (quarter) → Yellow (half) → Red (max) for quick risk assessment
HOW TO USE THE GSRM INDICATOR
Initial Setup (One-Time Configuration) ⚙️
1. Set Account Balance: Enter your total trading account value
2. Configure PDT Protection: Enable for margin accounts ≥$25,000 to protect required funds
3. Select Leverage: 4:1 (day trading), 2:1 (swing), or 1:1 (cash account)
4. Adjust Risk Percentage: Default 5% of allocated buying power; reduce for conservative approach
Trading Workflow
Pre-Market Preparation: 🌅
1. Review daily profit target and max loss displayed in green/red
2. Note your base hit target - this is your standard trade goal
3. Check P&L ratio - ensure it's sustainable for your win rate
Trade Execution: 🚀
1. Assess Setup Quality :
• Strong setup → Consider half or max position 💪
• Decent setup → Quarter or half position 👍
• Testing idea → Quarter position only 🧪
2. Select Profit Tier Based on Market Conditions :
• Choppy market → Target Tier 1 (5%) 🌊
• Normal conditions → Target Tier 2 (10%) ➡️
• Strong momentum → Target Tier 3 (20%) 🚀
3. Choose Stop Method :
• Percentage stops: Best for stocks with clear support/resistance
• ATR stops: Better for volatile stocks or news-driven trades. WARNING: this may result in tighter stops, negatively affecting your P&L. To offset this effect, try increasing the number of base hits to achieve your daily profit target and recover from a daily max loss. Be sure the resultant P&L ratio is in the conservative range ≤0.5. This will allow you to adjust your per-trade P&L targets without reducing your daily profit target or increasing your max risk.
4. Execute Using Table Values :
• 🔎 Find your position size group (🟢quarter/🟡half/🔴max)
• 🔎 Find your profit target row (5%/10%/20%) for your position size group
• ⚠️ Do not exceed the share count and stop-loss values displayed ⚠️
Risk Management Rules 🛡️
Daily Limits : 🚨
• Stop trading after hitting daily max loss (prevent tilt/revenge trading)
• Stop trading when a low-risk, minimum-loss trade would exceed your daily max loss (prevent exceeding max)
• Stop trading if you fall below the Daily Profit Target after having achieved it (prevent tilt/revenge trading)
• Cold Market: Stop trading after reaching daily profit target (preserve gains) ❄️
• Hot Market: Three Strikes - stop trading after 3 total max loss trades in a day (prevent tilt/revenge trading) 🔥
Position Management : 📏
• Never exceed max position size shown (protects from overleverage)
• Use quarter positions when daily P&L is negative or below first profit goal (40% of target)
• Use half positions only while daily P&L is above first profit goal (40% of target)
• Use full positions only while daily P&L is above profit goal (100% of target)
A/B Testing Features 🧪
Stop-Loss Methods :
• Week 1: Use percentage-based stops
• Week 2: Use ATR-based stops
• Compare win rates and average losses to optimize
Cost Basis Models :
Pick the highest probable cost-basis and keep your entry position below the share count shown to protect from overleveraging your buying power.
⚠️ IMPORTANT: COST BASIS ESTIMATIONS ARE FOR RISK MANAGEMENT CALCULATIONS ONLY - DO NOT USE THIS INFORMATION TO EXECUTE BUY OR SELL ORDERS.
• Fast movers: Use Last Close for stability 🏃or Bid/Ask for real-time price updates (Bid/Ask is only available on 1T charts).
• Liquid stocks: Try VWMA for better entry estimation 💧
• Reversals/Break of VWAP: Use VWAP when anticipating an entry at the Volume-Weighted Average Price 🔄
• Reversals/Break SMA 200: Use SMA when anticipating an entry at the SMA 📉
• Momentum/Trending: Use EMA when anticipating an entry at the EMA bounce 📈
• Price Offset: Plus/Minus $1.00 in $0.10 increments to compensate for slippage, market orders, etc.
Track which method provides better fill estimates. There is no right or wrong choice here because it depends on your style of trading. You can also use the Price Offset option if you find it helps with consistency.
BEST PRACTICES ⭐
1. Start Conservative : Use quarter positions and default settings until familiar with the system 🐣
2. Track Results : Document whether you hit Tier 1, 2, or 3 targets 📝
3. Respect the Math : The calculations assume a 50%+ win rate - if yours is lower, reduce position sizes 🧮
4. Daily Review : Compare actual P&L to base hit targets to calibrate expectations 🔍
5. Adapt to Conditions : Use ATR stops in volatile markets, percentage stops in stable conditions 🌡️
GLOSSARY 📚
• ATR (Average True Range) : A volatility indicator measuring the average range of price movement
• PDT (Pattern Day Trader) : SEC rule requiring $25,000 minimum for accounts making 4+ day trades in 5 business days
• VWAP (Volume-Weighted Average Price) : Average price weighted by volume for the trading session
• VWMA (Volume-Weighted Moving Average) : Moving average that gives more weight to periods with higher volume
• SMA (Simple Moving Average) : Unweighted moving average where each data point is of equal importance
• EMA (Exponential Moving Average) : Moving average that emphasizes the most recent data and information from the market
• P&L : Profit & Loss
IMPORTANT DISCLAIMERS ⚠️
• This indicator and any information provided is for educational and informational purposes only and should not be construed as investment advice, financial advice, trading advice, or any other type of advice. You should not make any investment decision based solely on this indicator.
• All investments and trading involve substantial risk of loss and are not suitable for every investor. You should carefully consider whether trading is suitable for you in light of your experience, objectives, financial resources, and other relevant circumstances. 📉
• Actual trade results may vary from calculated targets due to slippage, market gaps, and execution delays
• The creator of this indicator is not a registered investment advisor, broker-dealer, or financial advisor. Nothing contained herein constitutes a recommendation or solicitation to buy or sell any financial instrument.
• In no event shall the creator be liable for any direct, indirect, incidental, special, or consequential damages arising out of the use of this indicator.
• This indicator DOES NOT calculate support/resistance levels
• This indicator DOES NOT provide buy/sell signals
• This indicator DOES NOT calculate entry prices
• It is the trader's responsibility to determine an appropriate entry price for their chosen strategy
• This indicator provides calculations only - execution discipline remains the trader's responsibility
• Default settings assume PDT margin account rules; adjust for cash accounts
• P&L ratio colors are guidelines - your actual win rate determines sustainable ratios
• Always verify position sizes don't exceed account buying power before executing
SUPPORT AND FEEDBACK 💬
This indicator represents years of trading experience condensed into automated calculations. It's designed to remove emotional decision-making from position sizing while maintaining flexibility for different market conditions and trading styles.
For questions, suggestions, or to share your results using the GSRM strategy, please comment on the TradingView publication page. 🚀
---
Remember: The goal isn't to hit home runs - it's to get on base consistently while avoiding strikeouts. Small wins compound into large gains over time. ⚾💰
Version: 1.0
License: Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
- creativecommons.org
Compatibility: TradingView Pine Script v6
Auto Fibonacci - First Hour Lockedthis gives the accurate fibonnacci based on the day's first hour high/low values, and the extension values as well.
Weighted Sector ADD (sign-weighted)What it is
A true, cap-weighted advances/declines (ADD) proxy for the S&P 500 using sector ETFs. Each sector contributes +1 if it’s up on the bar, −1 if it’s down, 0 if flat. Those signals are then weighted by your sector weights (auto-normalized to 100%) and summed into a single breadth line. The result is a fast, low-noise read of how much of the S&P (by sector weight) is advancing vs. declining right now.
- Tracks participation, not price magnitude—perfect for spotting “broad vs. narrow” moves
- Heavily weighted sectors (e.g., Tech) matter proportionally more, reflecting real index impact
- Simple scale: ~−1 to +1 (all weight down → all weight up)
Chart Elements
- Green/Red Columns – “Weighted ADD”: Current bar’s weighted breadth (sign-based by default)
- Blue Line – “Weighted MA”: SMA of the weighted ADD (regime filter)
- Zero/Guide Lines (optional): 0.0, ±0.2 (mild), ±0.6 (strong)
- Labels (optional): Text markers at those guide levels
- Advancing Weight % (optional): Label showing ((ADD+1)/2)*100 → share of total sector weight advancing
How to Read (Quick Guide)
- +0.60 to +1.00 → Broad, one-sided risk-on (most sector weight advancing)
- +0.20 to +0.60 → Moderate, supportive breadth
- −0.20 to +0.20 → Mixed/choppy; rotation
- −0.60 to −1.00 → Broad, one-sided risk-off
- MA above/below zero → Simple regime indicator; zero-crosses could be potential alert triggers
- Divergence: Strong price move with a weak/flat ADD could potentially warn of narrow participation
Inputs & settings
Calculation
- Use returns instead of up/down sign?
OFF (default): true weighted participation (+1/−1/0)
ON: weighted sector returns (winsor-capped). Use if you want magnitude, not just direction
- Winsor cap (returns mode): Caps per-sector contribution in returns mode (e.g., 0.02 = ±2%)
- Smoothing MA length: SMA period for the blue “Weighted MA” line
- Source timeframe: Compute signals on another TF (e.g., “60”) but plot on your chart TF
Visibility
- Show Weighted ADD (bars): Toggle the green/red columns
- Show Weighted ADD MA: Toggle the blue SMA line
- Show Zero Line (0): Toggle the 0.0 reference line
- Show ±0.2 / ±0.6 guide lines: Toggle the helper levels
- Show guide labels: Draw small text labels at 0, ±0.2, ±0.6
- Guide label offset (bars left): Move labels left if they overlap the right edge values
- Show Advancing Weight % label: Toggle the % of sector weight currently advancing
Sector Symbols (ETF proxies)
- XLK, XLY, XLF, XLV, XLC, XLI, XLP, XLE, XLB, XLU, XLRE: Defaults to the SPDR sector ETFs. You can swap for alternative proxies if desired.
Sector Weights (auto-normalize)
- Weight inputs for each sector (e.g., Tech 0.30, Financials 0.13…). These auto-normalize to 1.0 so you can paste rough numbers; the script scales them.
- Keep weights fresh. GICS sector weights drift; update periodically (e.g., quarterly).
Alerts included
- “Weighted ADD crossed above 0”
- “Weighted ADD crossed below 0”
Version
v1.0 – Initial release (weighted sign-based ADD + SMA, zero/guide lines & labels, Adv % label, alerts).
RSI (8 & 13) + Fibonacci LevelsIndicator Description: RSI (8 & 13) + Fibonacci Levels
This custom indicator is designed to provide a dual-speed RSI framework with embedded Fibonacci retracement levels for advanced momentum and reversal analysis. It combines the power of relative strength measurement with the natural harmony of Fibonacci ratios to give traders a structured approach to market timing and confluence trading.
The indicator plots two RSI lines on a dedicated sub-chart:
RSI Fast (8) → short-term momentum, highly sensitive to price action, helps identify quick shifts and micro-trends.
RSI Slow (13) → smoother and less volatile, acts as confirmation of broader trend direction and underlying strength.
By combining both RSI speeds, traders can spot alignment, divergences, and crossover signals between fast and slow momentum. When both lines move in sync, it reflects strong conviction; when they diverge, it signals potential exhaustion or trend shifts.
Overlaying Fibonacci retracement levels on RSI adds an extra dimension of precision. Instead of using arbitrary zones, the indicator relies on mathematically significant levels tied to natural market cycles:
23.6% → shallow pullbacks, early momentum pauses.
38.2% → minor retracements, often signaling trend continuation.
50% → balance point between strength and weakness.
61.8% → golden ratio, strong correction or reversal zone.
78.6% → deep retracement, last line before full reversal.
In addition, the script marks the classic RSI boundaries:
70 (Overbought) → potential profit-taking, stretched bullish conditions.
30 (Oversold) → potential accumulation, stretched bearish conditions.
Together, these zones help traders gauge not only when the RSI is “too high” or “too low,” but also where price momentum aligns with natural Fibonacci retracement zones. This approach transforms RSI from a simple oscillator into a multi-layered momentum map.
Practical Uses:
Trend Confirmation → When RSI(8) and RSI(13) are both above 50 and rising, bullish strength is confirmed.
Divergence Detection → If price makes higher highs but RSI(8) fails to confirm, it warns of weakening momentum.
Reversal Hunting → Look for RSI rejection candles at Fib levels (e.g., fast RSI hitting 61.8 and rolling over).
Entry/Exit Timing → Use fast RSI crossovers with slow RSI as tactical entries within the broader structure.
Confluence Trading → Strong signals occur when RSI rejection coincides with price structure (double tops/bottoms, Fibonacci levels on chart, Bollinger Band rejections).
This indicator is especially powerful when paired with Bollinger Bands or price action rejection patterns, creating a system where price extremes are validated against RSI Fib zones.
Ultimately, the RSI (8 & 13) + Fibonacci Levels indicator acts as a precision filter — helping traders separate noise from genuine turning points and reinforcing entries/exits with multiple layers of confluence.
Bollinger Bands (SMA 21, 2.618σ)Indicator Description: Bollinger Bands (2.618σ, 21 SMA) + RSI with Fibonacci
This custom indicator combines Bollinger Bands and Relative Strength Index (RSI), enhanced with Fibonacci-based configurations, to provide confluence signals for rejection candles, reversal setups, and continuation patterns.
Bollinger Bands Settings (Customized)
Middle Band → 21-period Simple Moving Average (SMA)
Upper Band → SMA + 2.618 standard deviations
Lower Band → SMA − 2.618 standard deviations
These parameters expand the bands compared to the traditional (20, 2.0) settings, making them better suited for volatility extremes and higher timeframe swing analysis.
Color Scheme
Middle Band = Orange
Upper Band = Red
Lower Band = Green
This color-coding emphasizes key rejection levels visually.
Candle Rejection Logic
The indicator is designed to highlight potential rejection candles when price interacts with the outer Bollinger Bands:
At the Upper Band, rejection signals suggest overextension and potential downside reaction.
At the Lower Band, rejection signals suggest oversold conditions and potential upside reaction.
Rejection Candle Types Tracked
Hammer (bullish reversal, lower rejection wick at bottom band)
Inverted Hammer (bearish reversal, upper rejection wick at top band)
Doji candles (indecision at band extremes)
Double Top formations near the upper band
Double Bottom formations near the lower band
Relative Strength Index (RSI) Settings
RSI is configured with Fibonacci retracement levels instead of traditional 30/70 thresholds.
Fibonacci sequence levels used include:
23.6% (0.236)
38.2% (0.382)
50% (0.5)
61.8% (0.618)
78.6% (0.786)
This alignment with Fibonacci ratios provides deeper market structure insights into momentum strength and exhaustion points.
Trading Confluence Zones
Upper Band + RSI at 0.618–0.786 zone → High probability bearish rejection.
Lower Band + RSI at 0.236–0.382 zone → High probability bullish reversal.
Band interaction + Doji or Hammer candles → Stronger signal confirmation.
Use Cases
Identifying trend exhaustion when price repeatedly fails to break above the upper band.
Spotting accumulation or distribution phases when price consolidates around Fibonacci-based RSI zones.
Detecting false breakouts when candle patterns (like Doji or Inverted Hammer) occur beyond the bands.
Why 2.618 Deviation & 21 SMA?
Standard Bollinger Bands (20, 2.0) capture ~95% of price action.
By widening to 2.618σ, we target extreme volatility outliers — areas where reversals are statistically more likely.
A 21-period SMA aligns better with common cycle lengths (3 trading weeks on daily charts) and Fibonacci-related time cycles.
Practical Strategy
Step 1: Watch when price touches or pierces the upper/lower band.
Step 2: Check for candle rejection patterns (Hammer, Inverted Hammer, Doji, Double Top/Bottom).
Step 3: Confirm with RSI Fibonacci levels for confluence.
Step 4: Trade with the prevailing trend or look for reversal setups if multiple confluence factors align.
Cautions
Not all touches of the bands signal reversals — strong trends can ride along the bands for extended periods.
Always combine with price action structure, volume, and higher timeframe trend bias.
📌 Summary
This indicator blends volatility-based bands with Fibonacci momentum analysis and classical candle rejection patterns. The combination of Bollinger Bands (21, 2.618σ) and RSI Fibonacci levels helps traders detect high-probability rejection zones, reversal opportunities, and overextended conditions with improved accuracy over traditional default settings.
TPO Levels [VAH/POC/VAL] with Poor H/L, Single Prints & NPOCs### 🎯 Advanced Market Profile & Key Level Analysis
This script is a unique and comprehensive technical analysis tool designed to help traders understand market structure, value, and key liquidity levels using the principles of **Auction Market Theory** and **Market Profile**.
This script is unique (and shouldn't be censored) because :
It allows large history of levels to be displayed
Accurate as possible tick size
Doesn't draw a profile but only the actual levels
Supports multi-timeframe levels even on the daily mode giving macro context
There is no indicator out there that does it
While these concepts are universal, this indicator was built primarily for the dynamic, 24/7 nature of the **cryptocurrency market**. It helps you move beyond simple price action to understand *why* the market is moving, which is especially crucial in the volatile crypto space.
### ## 📊 The Concepts Behind the Calculations
To use this script effectively, it's important to understand the core concepts it is built upon. The entire script is self-contained and does not require other indicators.
* **What is Market Profile?**
Market Profile is a unique charting technique that organizes price and time data to reveal market structure. It's built from **Time Price Opportunities (TPOs)**, which are 30-minute periods of market activity. By stacking these TPOs, the script builds a distribution, showing which price levels were most accepted (heavily traded) and which were rejected (lightly traded) during a session.
* **What is the Value Area (VA)?**
The Value Area is the heart of the profile. It represents the price range where **70%** of the session's trading volume occurred. This is considered the "fair value" zone where both buyers and sellers were in general agreement.
* **Point of Control (POC):** The single price level with the most TPOs. This was the most accepted or "fairest" price of the session and acts as a gravitational line for price.
* **Value Area High (VAH):** The upper boundary of the 70% value zone.
* **Value Area Low (VAL):** The lower boundary of the 70% value zone.
VAH and VAL are dynamic support and resistance levels. Trading outside the previous session's value area can signal the start of a new trend.
***
### ## 📈 Key Features Explained
This script automatically calculates and displays the following critical market-generated information:
* **Multi-Timeframe Market Profile**
Automatically draws Daily, Weekly, and Monthly profiles, allowing you to analyze market structure across different time horizons. The script preserves up to 20 historical sessions to provide deep market context.
* **Naked Point of Control (nPOC)**
A "Naked" POC is a Point of Control from a previous session that has **not** been revisited by price. These levels often act as powerful magnets for price, representing areas of unfinished business that the market may seek to retest. The script tracks and displays Daily, Weekly, and Monthly nPOCs until they are touched.
* **Single Prints (Imbalance Zones)**
A Single Print is a price level where only one TPO traded during the session's development. This signifies a rapid, aggressive price move and an imbalanced market. These areas, like gaps in a traditional chart, are frequently revisited as the market seeks to "fill in" these thin parts of the profile.
* **Poor Structure (Unfinished Auctions)**
A **Poor High** or **Poor Low** occurs when the top or bottom of a profile is flat, with two or more TPOs at the extreme price. This suggests that the auction in that direction was weak and inconclusive. These weak structures often signal a high probability that price will eventually break that high or low.
***
### ## 💡 How to Use This Indicator
This tool is not a signal generator but an analytical framework to improve your trading decisions.
1. **Determine Market Context:** Start by asking: Is the current price trading *inside* or *outside* the previous session's Value Area?
* **Inside VA:** The market is in a state of balance or range-bound. Look for trades between the VAH and VAL.
* **Outside VA:** The market is in a state of imbalance and may be starting a trend. Look for continuation or acceptance of prices outside the prior value.
2. **Identify Key Levels:**
* Use historical **nPOCs** as potential profit targets or areas to watch for a price reaction.
* Treat historical **VAH** and **VAL** levels as significant support and resistance zones.
* Note where **Single Prints** are. These are often price magnets that may get "filled" in the future.
3. **Spot Weakness:**
* A **Poor High** suggests weak resistance that may be easily broken.
* A **Poor Low** suggests weak support, signaling a potential for a continued move lower if broken.
***
### ## ⚙️ Customization & Crypto Presets
The indicator is highly customizable, allowing you to change colors, transparency, the number of historical sessions, and more.
To help traders get started quickly, the indicator includes **built-in layout presets** specifically calibrated for major cryptocurrencies: ** BINANCE:BTCUSDT.P , BINANCE:ETHUSDT.P , and BINANCE:SOLUSDT.P **. These presets automatically adjust key visual parameters to better suit the unique price characteristics and volatility of each asset, providing an optimized view right out of the box.
***
### ## ⚠️ Disclaimer
This indicator is a tool for market analysis and should not be interpreted as direct buy or sell signals. It provides information based on historical price action, which does not guarantee future results. Trading involves significant risk, and you should always use proper risk management. This script is designed for use on standard chart types (e.g., Candlesticks, Bar) and may produce misleading information on non-standard charts.
FiniteStateMachine🟩 OVERVIEW
A flexible framework for creating, testing and implementing a Finite State Machine (FSM) in your script. FSMs use rules to control how states change in response to events.
This is the first Finite State Machine library on TradingView and it's quite a different way to think about your script's logic. Advantages of using this vs hardcoding all your logic include:
• Explicit logic : You can see all rules easily side-by-side.
• Validation : Tables show your rules and validation results right on the chart.
• Dual approach : Simple matrix for straightforward transitions; map implementation for concurrent scenarios. You can combine them for complex needs.
• Type safety : Shows how to use enums for robustness while maintaining string compatibility.
• Real-world examples : Includes both conceptual (traffic lights) and practical (trading strategy) demonstrations.
• Priority control : Explicit control over which rules take precedence when multiple conditions are met.
• Wildcard system : Flexible pattern matching for states and events.
The library seems complex, but it's not really. Your conditions, events, and their potential interactions are complex. The FSM makes them all explicit, which is some work. However, like all "good" pain in life, this is front-loaded, and *saves* pain later, in the form of unintended interactions and bugs that are very hard to find and fix.
🟩 SIMPLE FSM (MATRIX-BASED)
The simple FSM uses a matrix to define transition rules with the structure: state > event > state. We look up the current state, check if the event in that row matches, and if it does, output the resulting state.
Each row in the matrix defines one rule, and the first matching row, counting from the top down, is applied.
A limitation of this method is that you can supply only ONE event.
You can design layered rules using widlcards. Use an empty string "" or the special string "ANY" for any state or event wildcard.
The matrix FSM is foruse where you have clear, sequential state transitions triggered by single events. Think traffic lights, or any logic where only one thing can happen at a time.
The demo for this FSM is of traffic lights.
🟩 CONCURRENT FSM (MAP-BASED)
The map FSM uses a more complex structure where each state is a key in the map, and its value is an array of event rules. Each rule maps a named condition to an output (event or next state).
This FSM can handle multiple conditions simultaneously. Rules added first have higher priority.
Adding more rules to existing states combines the entries in the map (if you use the supplied helper function) rather than overwriting them.
This FSM is for more complex scenarios where multiple conditions can be true simultaneously, and you need to control which takes precedence. Like trading strategies, or any system with concurrent conditions.
The demo for this FSM is a trading strategy.
🟩 HOW TO USE
Pine Script libraries contain reusable code for importing into indicators. You do not need to copy any code out of here. Just import the library and call the function you want.
For example, for version 1 of this library, import it like this:
import SimpleCryptoLife/FiniteStateMachine/1
See the EXAMPLE USAGE sections within the library for examples of calling the functions.
For more information on libraries and incorporating them into your scripts, see the Libraries section of the Pine Script User Manual.
🟩 TECHNICAL IMPLEMENTATION
Both FSM implementations support wildcards using blank strings "" or the special string "ANY". Wildcards match in this priority order:
• Exact state + exact event match
• Exact state + empty event (event wildcard)
• Empty state + exact event (state wildcard)
• Empty state + empty event (full wildcard)
When multiple rules match the same state + event combination, the FIRST rule encountered takes priority. In the matrix FSM, this means row order determines priority. In the map FSM, it's the order you add rules to each state.
The library uses user-defined types for the map FSM:
• o_eventRule : Maps a condition name to an output
• o_eventRuleWrapper : Wraps an array of rules (since maps can't contain arrays directly)
Everything uses strings for maximum library compatibility, though the examples show how to use enums for type safety by converting them to strings.
Unlike normal maps where adding a duplicate key overwrites the value, this library's `m_addRuleToEventMap()` method *combines* rules, making it intuitive to build rule sets without breaking them.
🟩 VALIDATION & ERROR HANDLING
The library includes comprehensive validation functions that catch common FSM design errors:
Error detection:
• Empty next states
• Invalid states not in the states array
• Duplicate rules
• Conflicting transitions
• Unreachable states (no entry/exit rules)
Warning detection:
• Redundant wildcards
• Empty states/events (potential unintended wildcards)
• Duplicate conditions within states
You can display validation results in tables on the chart, with tooltips providing detailed explanations. The helper functions to display the tables are exported so you can call them from your own script.
🟩 PRACTICAL EXAMPLES
The library includes four comprehensive demos:
Traffic Light Demo (Simple FSM) : Uses the matrix FSM to cycle through traffic light states (red → red+amber → green → amber → red) with timer events. Includes pseudo-random "break" events and repair logic to demonstrate wildcards and priority handling.
Trading Strategy Demo (Concurrent FSM) : Implements a realistic long-only trading strategy using BOTH FSM types:
• Map FSM converts multiple technical conditions (EMA crosses, gaps, fractals, RSI) into prioritised events
• Matrix FSM handles state transitions (idle → setup → entry → position → exit → re-entry)
• Includes position management, stop losses, and re-entry logic
Error Demonstrations : Both FSM types include error demos with intentionally malformed rules to showcase the validation system's capabilities.
🟩 BRING ON THE FUNCTIONS
f_printFSMMatrix(_mat_rules, _a_states, _tablePosition)
Prints a table of states and rules to the specified position on the chart. Works only with the matrix-based FSM.
Parameters:
_mat_rules (matrix)
_a_states (array)
_tablePosition (simple string)
Returns: The table of states and rules.
method m_loadMatrixRulesFromText(_mat_rules, _rulesText)
Loads rules into a rules matrix from a multiline string where each line is of the form "current state | event | next state" (ignores empty lines and trims whitespace).
This is the most human-readable way to define rules because it's a visually aligned, table-like format.
Namespace types: matrix
Parameters:
_mat_rules (matrix)
_rulesText (string)
Returns: No explicit return. The matrix is modified as a side-effect.
method m_addRuleToMatrix(_mat_rules, _currentState, _event, _nextState)
Adds a single rule to the rules matrix. This can also be quite readble if you use short variable names and careful spacing.
Namespace types: matrix
Parameters:
_mat_rules (matrix)
_currentState (string)
_event (string)
_nextState (string)
Returns: No explicit return. The matrix is modified as a side-effect.
method m_validateRulesMatrix(_mat_rules, _a_states, _showTable, _tablePosition)
Validates a rules matrix and a states array to check that they are well formed. Works only with the matrix-based FSM.
Checks: matrix has exactly 3 columns; no empty next states; all states defined in array; no duplicate states; no duplicate rules; all states have entry/exit rules; no conflicting transitions; no redundant wildcards. To avoid slowing down the script unnecessarily, call this method once (perhaps using `barstate.isfirst`), when the rules and states are ready.
Namespace types: matrix
Parameters:
_mat_rules (matrix)
_a_states (array)
_showTable (bool)
_tablePosition (simple string)
Returns: `true` if the rules and states are valid; `false` if errors or warnings exist.
method m_getStateFromMatrix(_mat_rules, _currentState, _event, _strictInput, _strictTransitions)
Returns the next state based on the current state and event, or `na` if no matching transition is found. Empty (not na) entries are treated as wildcards if `strictInput` is false.
Priority: exact match > event wildcard > state wildcard > full wildcard.
Namespace types: matrix
Parameters:
_mat_rules (matrix)
_currentState (string)
_event (string)
_strictInput (bool)
_strictTransitions (bool)
Returns: The next state or `na`.
method m_addRuleToEventMap(_map_eventRules, _state, _condName, _output)
Adds a single event rule to the event rules map. If the state key already exists, appends the new rule to the existing array (if different). If the state key doesn't exist, creates a new entry.
Namespace types: map
Parameters:
_map_eventRules (map)
_state (string)
_condName (string)
_output (string)
Returns: No explicit return. The map is modified as a side-effect.
method m_addEventRulesToMapFromText(_map_eventRules, _configText)
Loads event rules from a multiline text string into a map structure.
Format: "state | condName > output | condName > output | ..." . Pairs are ordered by priority. You can have multiple rules on the same line for one state.
Supports wildcards: Use an empty string ("") or the special string "ANY" for state or condName to create wildcard rules.
Examples: " | condName > output" (state wildcard), "state | > output" (condition wildcard), " | > output" (full wildcard).
Splits lines by , extracts state as key, creates/appends to array with new o_eventRule(condName, output).
Call once, e.g., on barstate.isfirst for best performance.
Namespace types: map
Parameters:
_map_eventRules (map)
_configText (string)
Returns: No explicit return. The map is modified as a side-effect.
f_printFSMMap(_map_eventRules, _a_states, _tablePosition)
Prints a table of map-based event rules to the specified position on the chart.
Parameters:
_map_eventRules (map)
_a_states (array)
_tablePosition (simple string)
Returns: The table of map-based event rules.
method m_validateEventRulesMap(_map_eventRules, _a_states, _a_validEvents, _showTable, _tablePosition)
Validates an event rules map to check that it's well formed.
Checks: map is not empty; wrappers contain non-empty arrays; no duplicate condition names per state; no empty fields in o_eventRule objects; optionally validates outputs against matrix events.
NOTE: Both "" and "ANY" are treated identically as wildcards for both states and conditions.
To avoid slowing down the script unnecessarily, call this method once (perhaps using `barstate.isfirst`), when the map is ready.
Namespace types: map
Parameters:
_map_eventRules (map)
_a_states (array)
_a_validEvents (array)
_showTable (bool)
_tablePosition (simple string)
Returns: `true` if the event rules map is valid; `false` if errors or warnings exist.
method m_getEventFromConditionsMap(_currentState, _a_activeConditions, _map_eventRules)
Returns a single event or state string based on the current state and active conditions.
Uses a map of event rules where rules are pre-sorted by implicit priority via load order.
Supports wildcards using empty string ("") or "ANY" for flexible rule matching.
Priority: exact match > condition wildcard > state wildcard > full wildcard.
Namespace types: series string, simple string, input string, const string
Parameters:
_currentState (string)
_a_activeConditions (array)
_map_eventRules (map)
Returns: The output string (event or state) for the first matching condition, or na if no match found.
o_eventRule
o_eventRule defines a condition-to-output mapping for the concurrent FSM.
Fields:
condName (series string) : The name of the condition to check.
output (series string) : The output (event or state) when the condition is true.
o_eventRuleWrapper
o_eventRuleWrapper wraps an array of o_eventRule for use as map values (maps cannot contain collections directly).
Fields:
a_rules (array) : Array of o_eventRule objects for a specific state.
PopsStocks - Pullback & Breakout (PDP example) - INDICATORPopsStocks — Pullback & Breakout (PDP Example)
This indicator highlights two high-probability trading setups:
Pullback Zone (PB): Marks a price box where buyers may step back in after a dip. Signals trigger when volume and candle patterns confirm strength inside the zone.
Breakout (BO): Triggers when price clears resistance with healthy volume and buildup.
Features include:
Manual or auto-calculated levels using ATR.
Pullback & breakout stop levels and profit targets.
EMA trend filter (20/50).
Optional volume filter and buildup logic.
Custom resolution toggle (analyze signals on any timeframe).
Visual plots, signal panel, and alert conditions for PB & BO trades.
EMA / WMA RibbonMomentum Flow Ribbon
Unlock a clear, visual edge in identifying short-term momentum shifts with the Momentum Flow Ribbon.
This indicator was born from a simple yet powerful concept: to visually represent the dynamic relationship between a fast-reacting Exponential Moving Average (EMA) and the smoother, more methodical Wilder's Moving Average (WMA). While both moving averages use the same length, their unique calculation methods cause them to separate and cross, creating a "ribbon" that provides an immediate and intuitive gauge of market momentum.
This tool is designed for the disciplined trader who values clean charts and actionable signals, helping you to execute your strategies with greater confidence and precision.
How It Works
The script plots an EMA and a Wilder's Moving Average (referred to as rma in Pine Script) of the same length. The space between these two lines is then filled with a colored ribbon:
Bullish Green/Teal: The ribbon turns bullish when the faster EMA crosses above the slower Wilder's MA, indicating that short-term momentum is strengthening to the upside.
Bearish Red: The ribbon turns bearish when the EMA crosses below the Wilder's MA, signaling that short-term momentum is shifting to the downside.
The inherent "lag" of the Wilder's MA, a feature designed by J. Welles Wilder Jr. himself, acts as a steady baseline against which the more sensitive EMA can be measured. The result is a simple, zero-lag visual that filters out insignificant noise and highlights meaningful changes in trend direction.
Key Features
Customizable Length and Source: Easily adjust the moving average length and price source (close, hl2, etc.) to fit your specific trading style and the instrument you are trading, from futures like MES and MNQ to cryptocurrencies and forex.
Customizable Colors: Tailor the ribbon's bullish and bearish colors to match your personal chart aesthetic.
Built-in Alerts: The script includes pre-configured alerts for both bullish (EMA crosses above WMA) and bearish (EMA crosses below WMA) signals. Never miss a potential momentum shift again.
Clean & Lightweight: No clutter. Just a simple, effective ribbon that integrates seamlessly into any trading system.
Practical Application for the Discerning Trader
For a futures trader, timing is everything. This ribbon is not just another indicator; it's a tool for confirmation.
Imagine you've identified a key level—a Volume Profile POC, the previous day's low, or a critical accumulation zone. As price approaches this level pre-London session, you're watching for a sign of institutional activity. A flip in the ribbon's color at that precise moment can provide the powerful confirmation you need to enter a trade, trusting that you are aligning with the building liquidity and momentum heading into the New York open.
This is a tool for those who aspire to greatness in their trading—who understand that the edge is found not in complexity, but in the flawless execution of a simple, well-defined plan.
Add the Momentum Flow Ribbon to your chart and start seeing momentum in a clearer light.
Daily + 4H MACD & RSI Screeneri used this script for my swing trading entry.
//@version=5
indicator("Daily + 4H MACD & RSI Screener", overlay=false)
// settings
rsiLength = input.int(14, "RSI Length")
rsiLevel = input.int(50, "RSI Threshold")
macdFast = input.int(12, "MACD Fast")
macdSlow = input.int(26, "MACD Slow")
macdSignal = input.int(9, "MACD Signal")
// ---- daily timeframe ----
dailyRsi = request.security(syminfo.tickerid, "D", ta.rsi(close, rsiLength))
= request.security(syminfo.tickerid, "D", ta.macd(close, macdFast, macdSlow, macdSignal))
dailyRsiPass = dailyRsi < rsiLevel
dailyMacdPass = dailyMacd < 0
dailyCondition = dailyRsiPass and dailyMacdPass
// ---- 4H timeframe ----
h4Rsi = request.security(syminfo.tickerid, "240", ta.rsi(close, rsiLength))
= request.security(syminfo.tickerid, "240", ta.macd(close, macdFast, macdSlow, macdSignal))
h4RsiPass = h4Rsi < rsiLevel
h4MacdPass = h4Macd < 0
h4Condition = h4RsiPass and h4MacdPass
// ---- combined condition ----
finalCondition = dailyCondition and h4Condition
// plot signals
plotshape(finalCondition, style=shape.triangledown, location=location.top, color=color.red, size=size.large, title="Signal")
bgcolor(finalCondition ? color.new(color.red, 85) : na)
// ---- table (3 columns x 4 rows) ----
var table statusTable = table.new(position=position.top_right, columns=3, rows=4, border_width=1)
// headers
table.cell(statusTable, 0, 0, "Timeframe", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(statusTable, 1, 0, "RSI", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(statusTable, 2, 0, "MACD", text_color=color.white, bgcolor=color.new(color.black, 0))
// daily row
table.cell(statusTable, 0, 1, "Daily", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(statusTable, 1, 1, str.tostring(dailyRsi, "#.##"),
text_color=color.white, bgcolor=dailyRsiPass ? color.new(color.green, 60) : color.new(color.red, 60))
table.cell(statusTable, 2, 1, str.tostring(dailyMacd, "#.##"),
text_color=color.white, bgcolor=dailyMacdPass ? color.new(color.green, 60) : color.new(color.red, 60))
// 4H row
table.cell(statusTable, 0, 2, "4H", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(statusTable, 1, 2, str.tostring(h4Rsi, "#.##"),
text_color=color.white, bgcolor=h4RsiPass ? color.new(color.green, 60) : color.new(color.red, 60))
table.cell(statusTable, 2, 2, str.tostring(h4Macd, "#.##"),
text_color=color.white, bgcolor=h4MacdPass ? color.new(color.green, 60) : color.new(color.red, 60))
// status row (simulate colspan by using two adjacent cells with the same bgcolor)
table.cell(statusTable, 0, 3, "Status", text_color=color.white, bgcolor=color.new(color.black, 0))
statusText = finalCondition ? "match" : "no match"
statusBg = finalCondition ? color.new(color.green, 0) : color.new(color.red, 0)
table.cell(statusTable, 1, 3, statusText, text_color=color.white, bgcolor=statusBg, text_size=size.large)
table.cell(statusTable, 2, 3, "", text_color=color.white, bgcolor=statusBg)
Penny Stock Short ScalpPenny Stock Short Scalp:
This Penny Stock Short Scalp Strategy is designed for traders aiming to capitalize on rapid, short-term price declines in penny stocks using TradingView. Focused on high-volatility periods, this strategy leverages quick entries and exits to capture small, consistent profits.
Strategy Overview
Timeframe: 1-minute or 2-minute charts for precise entries and exits.
Market: Penny stocks (low-priced, high-volatility stocks, typically under $5).
Trading Window: Best executed during the first 1-2 hours of market open (9:30 AM - 11:30 AM EST) when volatility is highest.
Position Type: Short positions only, targeting rapid price drops.
Key Indicators
Exponential Moving Average (EMA): 20-period EMA to identify short-term trends. A price below the EMA signals a potential short opportunity.
Relative Strength Index (RSI): 14-period RSI to detect overbought conditions (RSI > 70) for short entry signals.
Volume: High trading volume confirms momentum and liquidity for quick exits.
Bollinger Bands: Used to identify overextended price movements. A price touching or breaking above the upper band suggests a potential reversal for shorting.
Entry Rules
Price Action: Price breaks above the 20 EMA and touches or exceeds the upper Bollinger Band.
RSI Confirmation: RSI is above 70, indicating overbought conditions.
Volume Surge: A spike in volume supports the potential for a quick reversal.
Support/Resistance: Identify a nearby resistance level (intraday or daily) to confirm the short setup.
Exit Rules
Profit Target: Aim for a 2-5% price drop or a fixed profit target (e.g., $0.05-$0.10 per share, depending on stock price).
Stop Loss: Set a stop loss above the recent high or 2% above entry to limit risk.
Close Position: Exit if the price crosses back above the 20 EMA or RSI drops below 50, signaling a potential reversal.
Risk Management
Position Sizing: Risk no more than 1-2% of your account per trade.
Liquidity Check: Ensure the stock has sufficient volume to avoid slippage.
Time Limit: Exit trades within 5-10 minutes to avoid holding through unpredictable swings.
Notes
Market Conditions: Best suited for ranging or slightly bearish markets where pullbacks are frequent.
Caution: Penny stocks are highly volatile; use tight stops and avoid overleveraging.
Platform: Configure TradingView with the above indicators and use real-time data for accurate signals.
Disclaimer: This strategy involves significant risk due to the volatile nature of penny stocks. Always conduct your own research and consult a financial advisor before trading. Past performance is not indicative of future results.
ColorSMAColorSMA Indicator – Description & Usage Guide
Overview
The ColorSMA indicator is a dynamic trend-following moving average designed to adapt to volatility and provide clearer visual cues for traders. Unlike a standard simple moving average (SMA), this tool applies a volatility filter using a standard deviation channel and then smooths the price before calculating the moving average.
The result is a single line on the chart that changes color depending on its trend direction:
Blue (Uptrend) – The moving average is rising compared to the previous bar.
Red (Downtrend) – The moving average is falling compared to the previous bar.
This visual coloring makes it easier to spot the trend direction at a glance.
How It Works
Baseline SMA
The script first calculates a classic SMA based on the selected Length (default = 9).
This baseline acts as the foundation of the indicator.
Volatility Filter (SD Channel)
A standard deviation multiplier is applied to create an upper and lower channel around the SMA.
If price moves outside this channel, it gets “clamped” back within the channel range.
This reduces noise and prevents false signals in highly volatile conditions.
Smoothed Price (Extra Smooth)
The filtered price is then smoothed with another SMA (default = 3).
This step makes the line cleaner and easier to interpret.
Trend Coloring
If the current smoothed SMA is higher than its previous value → the line is Blue.
If it is lower → the line is Red .
This simple but effective color-coding highlights trend shifts without cluttering the chart.
Inputs & Settings
Source: The price source used in the calculation (default = close).
Length: The SMA period length (default = 9).
Extra Smooth : Additional smoothing for the final line (default = 3). Lower values make it more responsive, higher values make it smoother.
Width (Volatility Filter – SD Channel): The multiplier applied to the standard deviation. Controls how wide the channel is (default = 0.3).
Length (Volatility Filter – SD Channel): The period for calculating standard deviation (default = 1).
What You See on the Chart
A single moving average line that changes color:
Blue (Up) = trend strength or bullish direction.
Red (Down) = trend weakness or bearish direction.
The line itself is already filtered through a volatility channel and smoothing, so it reacts to market conditions while reducing noise.
How to Use It
Trend Identification
Use the color changes (Blue/Red) to quickly identify short-term trend shifts.
Blue phases suggest bullish bias, Red phases suggest bearish bias.
Entry/Exit Guidance
Traders can align entries with the trend color (e.g., buy when it turns Blue, sell/short when it turns Red).
Combine with price action or other indicators for confirmation.
Volatility Filtering
Adjust the Width and SD Length parameters to tune how sensitive the indicator is to price fluctuations. Narrower channels give more signals; wider channels filter out more noise.
Smoothing Control
If you prefer faster reactions, lower the smoothing value.
If you want steadier signals, increase smoothing.
Summary
The ColorSMA is a visually enhanced moving average that adapts to volatility and simplifies trend detection. It is especially useful for traders who prefer:
Clean charts with minimal clutter.
Clear, color-coded signals for trend direction.
Flexibility to adjust responsiveness via smoothing and channel width.
This indicator is best used as a trend confirmation tool or combined with other strategies such as support/resistance, candlestick patterns, or oscillators for robust trade setups.
EMA/SMA Stack Analysis Table (Lite – Current Only)📘 EMA/SMA Stack Analysis Table (Lite – Current Only)
This script is a simplified learning tool designed for novice traders who want to understand how moving averages (MAs) stack up in different market conditions.
The table displays:
Current MA stack (e.g., 9 > 20 > 50 > 100 > 200)
Interpretation (Perfect Bullish, Perfect Bearish, Mixed, etc.)
Risk label (Low, Medium, High)
A novice-friendly “Allowed?” guide with score
✅ YES (Buy on dips / Starter)
⏳ WAIT (no clear edge)
❌ NO (Avoid longs)
Why this matters
A Perfect Bullish stack (9 > 20 > 50 > 100 > 200) suggests a strong uptrend.
A Perfect Bearish stack (200 > 100 > 50 > 20 > 9) indicates a strong downtrend.
Mixed stacks can reflect transitions, pauses, or pullbacks.
The score helps summarize multiple factors into one line for beginners. The full script is too long to publish.
⚠️ Important Warnings
Moving averages lag price. By themselves, they can be misleading and should never be the sole basis for trading.
Always use confirmatory indicators (RSI, volume, price action, support/resistance, etc.) before making decisions.
This script is intended as a learning aid for novices — not a standalone trading system.
I built this primarily to help myself (a beginner) learn how to read trend structure.
Disclaimer
This script is provided as is, for educational purposes only.
It is not financial advice. Please test thoroughly and use at your own risk.
Weekly Session BreakThis indicator plots a vertical line at the end of the trading week (Friday) to mark the weekly session break. It is designed to be used on intraday charts (sub-1 hour timeframes).
The line's appearance is fully customizable via the Inputs tab, allowing you to change its color, style (solid, dotted, or dashed), and thickness.
Key Features:
End-of-Week Marker: Accurately draws a vertical line on the last bar of the trading week.
Timeframe Specific: Lines are only visible on intraday charts (1-minute to 59-minute timeframes) to prevent clutter on higher timeframes.
Customizable: Adjust the line's color, style, and thickness from the Inputs menu.
Swing RSI Panel//@version=6
indicator("Swing RSI Panel", overlay=false)
// RSI Settings
rsiLength = input.int(14, "RSI Length")
rsiOversold = input.int(40, "RSI Oversold")
rsiOverbought = input.int(60, "RSI Overbought")
// Calculate RSI
rsiValue = ta.rsi(close, rsiLength)
// Plot RSI
plot(rsiValue, "RSI", color=color.purple, linewidth=2)
hline(50, "Midline", color=color.gray, linestyle=hline.style_dotted)
hline(rsiOversold, "Oversold", color=color.green, linestyle=hline.style_dotted)
hline(rsiOverbought, "Overbought", color=color.red, linestyle=hline.style_dotted)
// Fill zones
bgcolor(rsiValue >= rsiOverbought ? color.new(color.red, 90) :
rsiValue <= rsiOversold ? color.new(color.green, 90) : na, title="RSI Zones")