GainzAlgo V2 [Alpha]// © GainzAlgo
//@version=5
indicator('GainzAlgo V2 ', overlay=true, max_labels_count=500)
show_tp_sl = input.bool(true, 'Display TP & SL', group='Techical', tooltip='Display the exact TP & SL price levels for BUY & SELL signals.')
rrr = input.string('1:2', 'Risk to Reward Ratio', group='Techical', options= , tooltip='Set a risk to reward ratio (RRR).')
tp_sl_multi = input.float(1, 'TP & SL Multiplier', 1, group='Techical', tooltip='Multiplies both TP and SL by a chosen index. Higher - higher risk.')
tp_sl_prec = input.int(2, 'TP & SL Precision', 0, group='Techical')
candle_stability_index_param = 0.7
rsi_index_param = 80
candle_delta_length_param = 10
disable_repeating_signals_param = input.bool(true, 'Disable Repeating Signals', group='Techical', tooltip='Removes repeating signals. Useful for removing clusters of signals and general clarity.')
GREEN = color.rgb(29, 255, 40)
RED = color.rgb(255, 0, 0)
TRANSPARENT = color.rgb(0, 0, 0, 100)
label_size = input.string('huge', 'Label Size', options= , group='Cosmetic')
label_style = input.string('text bubble', 'Label Style', , group='Cosmetic')
buy_label_color = input(GREEN, 'BUY Label Color', inline='Highlight', group='Cosmetic')
sell_label_color = input(RED, 'SELL Label Color', inline='Highlight', group='Cosmetic')
label_text_color = input(color.white, 'Label Text Color', inline='Highlight', group='Cosmetic')
stable_candle = math.abs(close - open) / ta.tr > candle_stability_index_param
rsi = ta.rsi(close, 14)
atr = ta.atr(14)
bullish_engulfing = close < open and close > open and close > open
rsi_below = rsi < rsi_index_param
decrease_over = close < close
var last_signal = ''
var tp = 0.
var sl = 0.
bull_state = bullish_engulfing and stable_candle and rsi_below and decrease_over and barstate.isconfirmed
bull = bull_state and (disable_repeating_signals_param ? (last_signal != 'buy' ? true : na) : true)
bearish_engulfing = close > open and close < open and close < open
rsi_above = rsi > 100 - rsi_index_param
increase_over = close > close
bear_state = bearish_engulfing and stable_candle and rsi_above and increase_over and barstate.isconfirmed
bear = bear_state and (disable_repeating_signals_param ? (last_signal != 'sell' ? true : na) : true)
round_up(number, decimals) =>
factor = math.pow(10, decimals)
math.ceil(number * factor) / factor
if bull
last_signal := 'buy'
dist = atr * tp_sl_multi
tp_dist = rrr == '2:3' ? dist / 2 * 3 : rrr == '1:2' ? dist * 2 : rrr == '1:4' ? dist * 4 : dist
tp := round_up(close + tp_dist, tp_sl_prec)
sl := round_up(close - dist, tp_sl_prec)
if label_style == 'text bubble'
label.new(bar_index, low, 'BUY', color=buy_label_color, style=label.style_label_up, textcolor=label_text_color, size=label_size)
else if label_style == 'triangle'
label.new(bar_index, low, 'BUY', yloc=yloc.belowbar, color=buy_label_color, style=label.style_triangleup, textcolor=TRANSPARENT, size=label_size)
else if label_style == 'arrow'
label.new(bar_index, low, 'BUY', yloc=yloc.belowbar, color=buy_label_color, style=label.style_arrowup, textcolor=TRANSPARENT, size=label_size)
label.new(show_tp_sl ? bar_index : na, low, 'TP: ' + str.tostring(tp) + ' SL: ' + str.tostring(sl), yloc=yloc.price, color=color.gray, style=label.style_label_down, textcolor=label_text_color)
if bear
last_signal := 'sell'
dist = atr * tp_sl_multi
tp_dist = rrr == '2:3' ? dist / 2 * 3 : rrr == '1:2' ? dist * 2 : rrr == '1:4' ? dist * 4 : dist
tp := round_up(close - tp_dist, tp_sl_prec)
sl := round_up(close + dist, tp_sl_prec)
if label_style == 'text bubble'
label.new(bear ? bar_index : na, high, 'SELL', color=sell_label_color, style=label.style_label_down, textcolor=label_text_color, size=label_size)
else if label_style == 'triangle'
label.new(bear ? bar_index : na, high, 'SELL', yloc=yloc.abovebar, color=sell_label_color, style=label.style_triangledown, textcolor=TRANSPARENT, size=label_size)
else if label_style == 'arrow'
label.new(bear ? bar_index : na, high, 'SELL', yloc=yloc.abovebar, color=sell_label_color, style=label.style_arrowdown, textcolor=TRANSPARENT, size=label_size)
label.new(show_tp_sl ? bar_index : na, low, 'TP: ' + str.tostring(tp) + ' SL: ' + str.tostring(sl), yloc=yloc.price, color=color.gray, style=label.style_label_up, textcolor=label_text_color)
alertcondition(bull or bear, 'BUY & SELL Signals', 'New signal!')
alertcondition(bull, 'BUY Signals (Only)', 'New signal: BUY')
alertcondition(bear, 'SELL Signals (Only)', 'New signal: SELL')
نماذج فنيه
Smart Money Concepts [Modern Neon V2]This is a visually overhauled version of the popular Smart Money Concepts (SMC) indicator, designed specifically for traders who prefer Dark Mode, High Contrast, and Maximum Visibility.
While the underlying logic preserves the robust structure detection of the original LuxAlgo script, the visual presentation has been completely modernized. The default "dull" colors have been replaced with a vibrant Cyberpunk Neon palette, and text labels have been significantly upscaled to ensure market structure is readable at a glance, even on high-resolution monitors.
🎨 Visual & Style Enhancements:
Neon Palette:
Bullish: Electric Cyan (#00F5FF)
Bearish: Neon Hot Pink (#FF007F)
Neutral/Levels: Bright Gold (#FFD700)
High Visibility Text: Market Structure labels (BOS, CHoCH, HH/LL) have been upgraded from "Tiny" to Normal size. Key Swing Points (Strong High/Low) are set to Large.
Modern "Solid" Blocks: Order Blocks and FVGs feature reduced transparency (60%) for a bolder, solid look that doesn't get washed out on dark backgrounds.
Decluttered: Removed unnecessary "Small" elements and dotted lines to focus on price action.
🛠 Key Features:
Real-Time Structure: Automatic detection of Internal and Swing structure (BOS & CHoCH) with trend coloring.
Order Blocks: Highlights Bullish and Bearish Order Blocks with new mitigation logic.
Fair Value Gaps (FVG): Auto-threshold detection for high-probability gaps.
Premium & Discount Zones: Automatically plots equilibrium zones for better entry targeting.
Multi-Timeframe Levels: Display Daily, Weekly, and Monthly highs/lows.
Trend Dashboard: (If you added the dashboard code) A clean panel displaying the current Internal and Swing trend bias.
CREDITS & LICENSE: This script is a modification of the "Smart Money Concepts " indicator.
Original Author: © LuxAlgo
License: Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
creativecommons.org
HL/LH Confirmation Strategy (Clean Market Structure)🚦 HL/LH Confirmation Strategy (Clean Market Structure)
This indicator is specifically designed to help traders identify a clean market structure by tracking the formation of Higher Lows (HL) and Lower Highs (LH). Rather than chasing new price extremes (new Highs or new Lows), the focus is on waiting for trend strength confirmation before considering an entry.
Key Strategy: Waiting for Trend Confirmation 💡
The core advantage of this indicator lies in its confirmation strategy:
For Uptrends (Bullish): The indicator doesn't signal just any low, but only when it detects a Higher Low (HL)—a low that is higher than the previous low. This is a crucial sign that the market has defended a level and is ready to continue moving up. This approach helps avoid chasing new lows and encourages entering trades after confirmation.
For Downtrends (Bearish): Similarly, the indicator looks for the formation of a Lower High (LH)—a high that is lower than the previous high. This suggests that buyers failed to breach the last resistance, signaling a potential continuation of the downside movement.
The indicator alternates between looking for an HL, then an LH, then an HL, visually mapping the Pivot swings and highlighting the moment of trend confirmation for potential trade entries.
Indicator Features ✨
Clear Structure Display: By drawing connecting lines between valid HL and LH points, the indicator visually maps the current market structure.
Pivot Detection: It uses an effective method for Pivot detection, with the sensitivity adjustable via the "Pivot Left" and "Pivot Right" parameters.
Custom Label Placement (Crucial Detail):
HL Label: Placed below the candle for better visual clarity of the bullish support area.
LH Label: Placed above the candle for better visual clarity of the bearish resistance area.
Customizable Colors: Full control over the background and text colors for HL and LH signals, as well as the thickness and color of the connecting lines between Pivot points.
⚙️ Input Parameters
Pivot Settings
Pivot Left / Pivot Right: Determine the number of bars to the left and right that must have lower/higher prices for a point to be declared a valid Pivot (Pivot High or Pivot Low). Increase these values to detect more significant, longer-term swings.
Signal Colors
HL Background/Text Color: Colors for the background and text of the Higher Low (HL) labels.
LH Background/Text Color: Colors for the background and text of the Lower High (LH) labels.
Line Settings
Line Color / Line Width: Allows customization of the appearance of the line connecting the detected HL and LH points.
Recommended Use
This indicator is ideal for traders practicing Price Action and strategies based on Market Structure. Use the HL signals as potential zones for long entries (buying) in an uptrend, and LH signals as zones for short entries (selling) in a downtrend, always after the point formation is confirmed.
Forex indicator By petran Elevate your market analysis with this powerful, all-in-one visual toolkit designed for discretionary traders across Forex, indices, and commodities (metals).
Core Features:
Trading Sessions Overlay: Clear visual bands highlighting the Asian, London, and New York trading sessions directly on your chart. Never miss a market open or a session overlap again.
Smart Daily Levels: Automatically plots the most essential reference points from the previous day:
PDH / PDL (Previous Day High/Low) – Key support and resistance.
PWH / PWL (Previous Week High/Low) – Higher timeframe context.
DO (Day Open) – A crucial intraday pivot level.
Motivational Watermark: A unique and customizable text overlay at the top of your screen. Display your favorite trading quote, rule, or reminder to maintain the right mindset during the trading day.
Clean & Customizable: Designed for clarity. Adjust colors, session times, and watermark text to fit your personal trading style and chart aesthetics.
Why Traders Choose This Indicator:
Saves Time: No more manually drawing sessions or calculating yesterday's levels.
Improves Discipline: The visual sessions and watermark help you trade only during your planned times and follow your rules.
Universal Application: Works seamlessly on any liquid market where session activity and daily ranges matter.
Perfect for traders who rely on price action, session-based strategies, and need a clean, informative chart environment.
Vinz Win BTC – STRATEGY AUTO 1m🚀 VinzWin BTC Strategy – BTC Scalping AUTO 1 min
The VinzWin strategy is based on a simple and highly effective price action pattern:
✅ 2 red candles followed by 1 green candle
✅ Doji filter set to 0
✅ Trading exclusively on BTC
✅ Session from 12:00 to 12:00 (24/7)
✅ Fixed Risk/Reward at 1:2
✅ Stop Loss set in fixed € amount
✅ Automatic risk management based on the Stop Loss
On every trade:
The Stop Loss is defined in fixed euros,
The Take Profit is always set at twice the risk,
The lot size is automatically adjusted to market conditions,
ensuring clean, stable, and fully controlled risk management.
📊 Multi-year backtests are available and show truly outstanding results, with strong consistency and an excellent profit/loss ratio.
👉 A simple, mechanical strategy with no over-optimization, perfectly suited for BTC scalping with fully controlled capital management in euros.
TrendShift DetectorReversal detector identifying no-wick candles after trend shifts. Scans for first candle without opening-side wick following bullish/bearish sequences. Visual triangle signals (▼ SHORT / ▲ LONG). Customizable parameters: sequence length, body size, wick tolerance, lookback period.
Combined EMA (5, 9, 21)A single code to combine the 5 9 and 21 EMA's. This script colour codes the different EMAs, yellow orage and red. This is editable if you prefer a different combination. The tie frae is "as chart"
Candle Color FlipCandle Color Flip highlights potential short-term reversals caused by back-to-back candles closing in opposite colors.
The script:
Watches for a green candle that closes after a red candle without making a lower low, and for a red candle that closes after a green candle without making a higher high.
Plots compact markers on qualifying bars (green triangles below for red→green flips, red triangles above for green→red flips).
Offers alert conditions for both directions, so you can set notifications that fire only when a confirmed bar meets the flip rules.
Can also be used to determine exit points on trades by confirming reversals.
Use it to quickly spot where buyers or sellers may be stepping in while the prior candle’s extremes still hold. You can enable “Any alert() function call” for real-time notifications, or stick with bar-close alerts for confirmation.
Trend Follow Line Point📌 Trend Follow Line Point
The Trend Follow Line Point indicator removes the confusing, repainting-based swing connections commonly found in traditional swing tools.
It maintains consistent swing-point calculation, keeps structural swing lines intact even when trend lines are broken, and integrates market structure + trend + volatility + volume into one intuitive, visual indicator.
This tool is designed for:
Trend Following
Swing Structure Analysis
Volatility-Based Entry & Exit
Market Strength Evaluation
📊 Component Explanation
🔹 1. Swing High / Swing Low Detection
Based on the user-defined sensitivity (swgLen):
A Swing High forms when the current high exceeds the previous swgLen highs.
A Swing Low forms when the current low falls below the previous swgLen lows.
🔹 2. Swing-Based Structure Lines
Connect Swing Highs → Structural visualization
Connect Swing Lows → Structural visualization
These lines reveal the underlying market structure without repainting or disappearing unexpectedly.
🔹 3. Dynamic ATR + Volume Weighting
ATR values combined with the volume ratio (vol / volMA) create a dynamic volatility channel that reflects real-time market pressure.
🔹 4. Enhanced SuperTrend Calculation
Uses ATR-based stability to produce more realistic and smoother trend lines, reducing noise and improving signal clarity.
🔹 5. Trend Color Mapping
Up Trend → User-selected color
Down Trend → User-selected color
Visual trend direction and strength can be identified immediately.
🧭 How to Use
When Swing Highs/Lows are detected, structure lines are automatically drawn between previous swings.
Use these lines to evaluate support/resistance breaks and overall structural direction.
Manage risk with volatility guidance:
Higher ATR (volume-weighted) → wider trend spacing → increased risk
Lower ATR → tighter spacing → reduced risk
This helps with position sizing, entry timing, and exit decisions.
+
Pure FVG [Textbook]1. The Core Concept
This is not a standard "show all gaps" indicator. It is a specific entry signal generator based on Smart Money Concepts (SMC).
It focuses on Consequent Encroachment (The 50% Level). The underlying principle is that a Fair Value Gap (FVG) represents a market inefficiency where opposing traders are trapped. When price retraces at least 50% back into this gap, it creates pressure as these trapped positions look to exit—either through stop-losses or position reversal. This makes the gap most likely to act as a reversal zone.
2. How It Works (The Lifecycle)
The indicator logic follows a strict sequence of events. A signal is generated only if all conditions are met in order:
-- Phase 1: Identification (The Fresh Gap)
The script scans for the classic 3-candle FVG pattern (where the 1st and 3rd candles do not overlap).
Visual: It draws a box (Green for Bullish, Red for Bearish) extending to the right.
The 50% Line: A dashed line is drawn through the center of the gap.
-- Phase 2: Mitigation (The Gray Zone)
This is the critical filter. The indicator waits for a candle to CLOSE past the 50% dashed line.
Once this happens, the gap is considered "Deeply Mitigated."
Visual: The box changes color to Gray. This tells the trader: "Price is deep in the zone, watch for a reaction."
-- Phase 3: The Signal (Rejection)
Once the box is Gray, the script watches for a "Rejection Candle."
Bullish Scenario: Price is deep in the gap (Gray). The script waits for a candle to close higher than it opened (a green candle).
Bearish Scenario: Price is deep in the gap (Gray). The script waits for a candle to close lower than it opened (a red candle).
Visual: A Triangle Label (▲ or ▼) appears, signaling an entry.
-- Phase 4: Invalidation
If the price closes completely past the far edge of the box (the Stop Loss level), the box is deleted immediately.
3. Key Options
These are the most important settings for the user:
-- Min Gap Size (%):
Filters out "noise." It ensures the script ignores tiny, insignificant gaps that are less than X% in height.
-- Max Visible Gaps:
Keeps your chart clean. It limits how many open boxes can be on the screen at once (e.g., only show the last 3 unclosed gaps).
-- Show Signal History Only:
Feature Highlight: When enabled, this hides all the "noise" of open or failed gaps. It only draws the boxes that successfully produced a Rejection Signal in the past.
Nifty Scalping System by Rakesh Sharma🎯 What This Indicator Does:
Core Features:
✅ Fast Entry/Exit Signals - Quick BUY/SELL labels on chart
✅ 3 Signal Modes:
Aggressive - More signals, faster entries
Moderate - Balanced (Recommended)
Conservative - Fewer but high-quality signals
✅ Automatic Target & Stop Loss - Plotted on chart as soon as you enter
✅ Time Filter - Only trades during your specified hours (9:20 AM - 3:15 PM default)
✅ Trade Statistics - Win rate, W/L ratio tracked automatically
✅ Live Dashboard - Shows trend, RSI, VWAP position, current trade status
Indicators Used:
📊 3 EMAs (9, 21, 50) - Trend direction
📈 Supertrend - Primary trend filter
💪 RSI - Momentum & overbought/oversold
💜 VWAP - Intraday support/resistance
📉 ATR - Dynamic stop loss & targets
📊 Volume - Confirmation of moves
⚙️ Best Settings for Nifty/Bank Nifty:
For 5-Minute Charts (Most Popular):
Signal Mode: Moderate
Target R:R: 1.5 (1:1.5 risk-reward)
Time Filter: 9:20 AM to 3:15 PM
For 3-Minute Charts (More Scalps):
Signal Mode: Aggressive
Target R:R: 1.0 (quick exits)
Time Filter: 9:20 AM to 3:15 PM
For 15-Minute Charts (Swing Scalping):
Signal Mode: Conservative
Target R:R: 2.0 (bigger targets)
Time Filter: 9:30 AM to 3:00 PM
💡 How to Use:
Step 1: Setup
Add indicator to 5-min Nifty or Bank Nifty chart
Choose your Signal Mode (start with Moderate)
Set Risk:Reward (1.5 is balanced)
Enable Time Filter (avoid first 10 mins)
Step 2: Trading
BUY Signal appears = Go LONG
Green label shows entry price
Green line = Target
Red line = Stop Loss
SELL Signal appears = Go SHORT
Red label shows entry price
Green line = Target
Red line = Stop Loss
Exit automatically when Target or SL is hit
Step 3: Risk Management
Automatic SL based on ATR (volatility)
Adjustable R:R ratio
Never trade outside session hours
🎯 Trading Rules (Important!):
✅ Take the Trade When:
Signal appears during trading session
Dashboard shows strong trend
Volume spike present
Price above/below VWAP (for buy/sell)
❌ Avoid Trading When:
First 10 minutes (9:15-9:25 AM)
Last 15 minutes (3:15-3:30 PM)
Dashboard shows "SIDEWAYS"
Major news events
📊 Dashboard Explained:
FieldWhat It MeansModeYour current signal sensitivityTrendOverall market directionRSIOverbought/Oversold/NeutralPrice vs VWAPAbove = Bullish, Below = BearishCurrent TradeShows if you're in a positionSessionTrading time active or notWin RateYour success %
🚀 Pro Tips for Nifty/Bank Nifty:
Best Timeframe: 5-minute chart
Best Time: 9:30 AM - 2:30 PM (avoid opening/closing rushes)
Risk per Trade: 1-2% of capital max
Follow the Trend: Take only BUY in uptrend, SELL in downtrend
Use Alerts: Set alerts so you don't miss signals
Start Small: Paper trade first with 1 lot
⚡ Quick Start Guide:
For Bank Nifty (5-min chart):
1. Signal Mode: Moderate
2. Target R:R: 1.5
3. Trading Hours: 9:20 AM - 3:15 PM
4. Watch for 3-5 signals per day
5. Average 30-50 points per trade
For Nifty 50 (5-min chart):
1. Signal Mode: Moderate
2. Target R:R: 1.5
3. Trading Hours: 9:20 AM - 3:15 PM
4. Watch for 3-5 signals per day
5. Average 15-30 points per trade
📈 Expected Performance:
Conservative Mode: 2-4 trades/day, 65-70% win rate
Moderate Mode: 4-8 trades/day, 55-65% win rate
Aggressive Mode: 8-15 trades/day, 45-55% win rate
This is a complete scalping system, Rakesh! All you need to do is:
Add to chart
Wait for signals
Follow the targets/stop losses
Track your stats
Ready to test it? Let me know if you want any adjustments! 🎯💰Claude can make mistakes. Please double-check responses.
📊 Volume Tension & Net Imbalance📊 Volume Tension & Net Imbalance (With Table + MultiLang + Alerts)
//
This indicator measures bullish vs. bearish pressure using volume-based tension and net imbalance.
It identifies accumulation zones, displays real-time market strength, trend direction, and triggers alerts on buildup entries.
Fully customizable table size, colors, and bilingual support (English/Russian).
VB Finviz-style MTF Screener📊 VB Multi-Timeframe Stock Screener (Daily + 4H + 1H)
A structured, high-signal stock screener that blends Daily fundamentals, 4H trend confirmation, and 1H entry timing to surface strong trading opportunities with institutional discipline.
🟦 1. Daily Screener — Core Stock Selection
All fundamental and structural filters run strictly on Daily data for maximum stability and signal quality.
Daily filters include:
📈 Average Volume & Relative Volume
💲 Minimum Price Threshold
📊 Beta vs SPY
🏢 Market Cap (Billions)
🔥 ATR Liquidity Filter
🧱 Float Requirements
📘 Price Above Daily SMA50
🚀 Minimum Gap-Up Condition
This layer acts like a Finviz-style engine, identifying stocks worth trading before momentum or timing is considered.
🟩 2. 4H Trend Confirmation — Momentum Check
Once a stock passes the Daily screen, the 4-hour timeframe validates trend strength:
🔼 Price above 4H MA
📈 MA pointing upward
This removes structurally good stocks that are not in a healthy trend.
🟧 3. 1H Entry Alignment — Timing Layer
The Hourly timeframe refines near-term timing:
🔼 Price above 1H MA
📉 Short-term upward movement detected
This step ensures the stock isn’t just good on paper—it’s moving now.
🧪 MTF Debug Table (Your Transparency Engine)
A live diagnostic table shows:
All Daily values
All 4H checks
All 1H checks
Exact PASS/FAIL per condition
Perfect for tuning thresholds or understanding why a ticker qualifies or fails.
🎯 Who This Screener Is For
Swing traders
Momentum/trend traders
Systematic and rules-based traders
Traders who want clean, multi-timeframe alignment
By combining Daily fundamentals, 4H trend structure, and 1H momentum, this screener filters the market down to the stocks that are strong, aligned, and ready.
3:55 PM Candle High/Low Levels (ARADO VERSION)a lil better in smaller tfs. Its a veryyyyy cool indicator guys (thanks ivan)
PST Super Simple System v2.5+PinkSlips Trading was built to give traders real structure, real tools, and real support — without the confusion or false promises you find everywhere else. Everything we provide is focused on helping you trade with clarity and confidence.
Professional-Grade Indicators
We develop custom TradingView indicators designed to simplify your decision-making. Clean, reliable, and built to support consistent trading.
Daily Live Trading Sessions
Members can watch the market with us in real time. We walk through bias, key levels, trade execution, and risk management so you can learn the process step-by-step.
Personal Guidance and Trade Planning
Whether you need help building a strategy, fixing your discipline, or understanding your data, we offer direct support and tailored plans to help you improve faster.
A Focused, Results-Driven Community
PinkSlips Trading is built for traders who want to get better — not for hype. You’ll be surrounded by people who take trading seriously and are committed to long-term growth.
VB-MainLiteVB-MainLite – v1.0 Initial Release
Overview
VB-MainLite is a consolidated market-structure and execution framework designed to streamline decision-making into a single chart-level view. The script combines multi-timeframe trend, volatility, volume, and liquidity signals into one cohesive visual layer, reducing indicator clutter while preserving depth of information for active traders.
Core Architecture
Trend Backbone – EMA 200
Dedicated EMA 200 acts as the primary trend filter and higher-timeframe bias reference.
Serves as the “spine” of the system for contextualizing all secondary signals (swings, reversals, volume events, etc.).
Custom MA Suite (Envelope Ready)
Four configurable moving averages with flexible source, length, and smoothing.
Default configuration (preset idea: “8/89 Envelope”):
MA #1: EMA 8 on high
MA #2: EMA 8 on low
MA #3: EMA 89 on high
MA #4: EMA 89 on low
All four are disabled by default to keep the chart minimal. Users can toggle them on from the Custom MAs group for envelope or cloud-style configurations.
Nadaraya–Watson Smoother (Swing Framework)
Gaussian-kernel Nadaraya–Watson regression applied to price (hl2) to build a smooth synthetic curve.
Two layers of functionality:
Swing labels (▲ / ▼) at inflection points in the smoothed curve.
Optional curve line that visually tracks the turning structure over the last ~500 bars.
Designed to surface early swing potential before standard MAs react.
Hull Moving Average (Trend Overlay)
Optional Hull MA (HMA) for faster trend visualization.
Color-coded by slope (buy/sell bias).
Default: off to prevent overloading the chart; can be enabled under Hull MA settings.
Momentum, Exhaustion & Pattern Engine
CCI-Based Bar Coloring
CCI applied to close with configurable thresholds.
Overbought / oversold CCI zones map directly into candle coloring to visually highlight short-term momentum extremes.
RSI Top / Bottom Exhaustion Finder
RSI logic applied separately to high-driven (tops) and low-driven (bottoms) sequences.
Plots:
Top arrows where high-side RSI stretches into high-risk territory.
Bottom arrows where low-side RSI indicates exhaustion on the downside.
Useful as confluence around the Nadaraya swing turns and EMA 200 regime.
Engulfing + MA Trend Engine (“Fat Bull / Fat Bear”)
Detects bullish and bearish engulfing patterns, then combines them with MA trend cross logic.
Only when both pattern and MA regime align does the engine flag:
Fat Bull (Engulf + MA aligned long)
Fat Bear (Engulf + MA aligned short)
Candles are marked via conditional barcolor to highlight strong, structured shifts in control.
Fat Finger Detection (Wick Spikes / Stop Runs)
Identifies abnormal wick extensions relative to the prior bar’s body range with configurable tolerance.
Supports detection of potential liquidity grabs, stop runs, or “excess” that may precede reversals or mean-reversion behavior.
Volume & Liquidity Intelligence
Bull Snort (Aggressive Buy Spikes)
Flags events where:
Volume is significantly above the 50-period average, and
Price closes in the upper portion of the bar and above prior close.
Plots a labeled marker below the bar to indicate aggressive upside initiative by buyers.
Pocket Pivots (Accumulation Flags)
Compares current volume vs prior 10 sessions with a filter on prior “up” days.
Highlights pocket pivot days where current green candle volume outclasses recent down-day volumes, suggesting stealth accumulation.
Delta Volume Core (Directional Volume by Price)
Internal volume-by-price style engine over a user-defined lookback.
Splits volume into up-close and down-close buckets across dynamic price bins.
Feeds into S&R and ICT zone logic to quantify where buying vs selling pressure built up.
Structural Context: S&R and ICT Zones
S&R Power Channel
Computes local high/low band over a configurable lookback window.
Renders:
Upper and lower S&R channel lines.
Shaded support / resistance zones using boxes.
Adds Buy Power / Sell Power metrics based on the ratio of up vs down bars inside the window, displayed directly in the zone overlays.
Drops ◈ markers where price interacts dynamically with the top or bottom band, highlighting reaction points.
ICT-Style Premium / Discount & Macro Zones
Two tiered structures:
Local Premium / Discount zones over a shorter SR window.
Macro Premium / Discount zones over a longer macro window.
Each zone:
Uses underlying directional volume to annotate accumulation vs distribution bias.
Provides Delta Volume Bias shading in the mid-band region, visually encoding whether local power flows are net-buying or net-selling.
Enables traders to quickly see whether current trade location is in a local/macro discount or premium context while still respecting volume profile.
Positioning Intelligence: PCD (Stocks)
Position Cost Distribution (PCD) – Stocks Only
Available for stock symbols on intraday up to daily timeframe (≤ 1D).
Uses:
TOTAL_SHARES_OUTSTANDING fundamentals,
Daily OHLCV snapshot, and
A bucketed distribution engine
to approximate cost basis distribution across price.
Outputs:
Horizontal “PCD bars” to the right of current price, density-scaled by estimated share concentration.
Color-coding by profitability relative to current price (profitable vs unprofitable positions).
Labels for:
Current price
Average cost
Profit ratio (share % below current price)
90% cost range
70% cost range
Range overlap as a measure of clustering / concentration.
Multi-Timeframe Trend: Two-Pole Gaussian Dashboard
Two-Pole Gaussian Filter (Line + Cloud)
Smooths a user-selected source (default: close) using a two-pole Gaussian filter with tunable alpha.
Plots:
A thin Gaussian trend line, and
A thick Gaussian “cloud” line with transparency, colored by slope vs past (offsetG).
Functions as a responsive trend backbone that is more sensitive than EMA 200 but less noisy than raw price.
Multi-Timeframe Gaussian Dashboard
Evaluates Gaussian trend direction across up to six timeframes (e.g., 1H / 2H / 4H / Daily / Weekly).
Renders a compact bottom-right table:
Header: symbol + overall bias arrow (up / down) based on average trend alignment.
Row of colored cells per timeframe (green for uptrend, magenta for downtrend) with human-readable TF labels (e.g., “60M”, “4H”, “1D”).
Gives an immediate read on whether intraday, swing, and higher-timeframe flows are aligned or fragmented.
Default Configuration & Usage Guidance
Default state after adding the script:
Enabled by default:
EMA 200 trend backbone
Nadaraya–Watson swing labels and curve
CCI bar coloring
RSI top/bottom arrows
Fat Bull / Fat Bear engine
Bull Snort & Pocket Pivots
S&R Power Channel
ICT Local + Macro zones
Two-pole Gaussian line + cloud + dashboard
PCD engine for stocks (auto-active where data is available)
Disabled by default (opt-in):
Custom MA suite (4x MAs, preset as EMA 8/8/89/89)
Hull MA overlay
How traders can use VB-MainLite in practice:
Use EMA 200 + Gaussian dashboard to define top-down directional bias and avoid trading directly against multi-TF trend.
Use Nadaraya swing labels, RSI exhaustion arrows, and CCI bar colors to time entries within that higher-timeframe bias.
Use Fat Bull / Fat Bear events as structured confirmation that both pattern and MA regime have flipped in the same direction.
Use Bull Snort, Pocket Pivots, and S&R / ICT zones to align execution with liquidity, volume, and location (premium vs discount).
On stocks, use PCD as a positioning map to understand trapped supply, support zones near crowded cost basis, and where profit-taking is likely.
Grok/Claude Quantum Signal Pro * Enhanced v2# QSig Pro+ v2 — Dynamic RSI Enhancement
## Release: Quantum Signal Pro Enhanced v2
**Author:** ralis24 (with Claude assistance)
**Version:** 2.0
**Platform:** TradingView (Pine Script v6)
---
## Overview
Version 2 introduces **Trend-Adaptive RSI Thresholds** — a significant enhancement that dynamically adjusts buy and sell levels based on real-time trend strength. This allows the indicator to more effectively capture dips in uptrends and sell bounces in downtrends, rather than waiting for extreme oversold/overbought conditions that rarely occur during strong directional moves.
---
## The Problem v2 Solves
In the original QSig Pro+, RSI thresholds were fixed at 30 (oversold) and 70 (overbought). While these levels work well in ranging markets, they create issues in trending conditions:
- **Strong Uptrends:** Price rarely drops to RSI 30. Pullbacks typically bottom around RSI 40-50, causing missed buy opportunities.
- **Strong Downtrends:** Relief rallies rarely push RSI above 70. Bounces often exhaust around RSI 55-65, causing missed sell opportunities.
The v2 solution: **Let the market's trend strength dictate the appropriate RSI levels.**
---
## New Feature: Dynamic RSI Thresholds
### How It Works
The indicator now detects three distinct market states and applies corresponding RSI thresholds:
| Market State | Detection Criteria | RSI Buy Level | RSI Sell Level |
|--------------|-------------------|---------------|----------------|
| **Strong Uptrend** | +DI > -DI, ADX > 24, ADX rising | < 40 | > 80 |
| **Strong Downtrend** | -DI > +DI, ADX > 24, ADX rising | < 20 | > 60 |
| **Neutral/Ranging** | ADX < 24 or ADX falling | < 30 | > 70 |
### Trend State Detection Logic
```
Strong Uptrend = (+DI > -DI) AND (ADX > threshold) AND (ADX > ADX )
Strong Downtrend = (-DI > +DI) AND (ADX > threshold) AND (ADX > ADX )
Neutral = Neither condition met
```
### Anti-Whipsaw Protection
To prevent rapid switching between threshold sets during choppy transitions, a **confirmation buffer** requires the trend state to persist for a configurable number of bars (default: 2) before the indicator switches regimes.
---
## New Input Parameters
A new input group "**Dynamic RSI Thresholds**" has been added with the following settings:
| Parameter | Default | Range | Description |
|-----------|---------|-------|-------------|
| Enable Trend-Adaptive RSI Levels | ON | toggle | Master switch for the feature |
| ADX Strong Trend Threshold | 24 | 15-40 | ADX must exceed this to qualify as "strong" trend |
| ADX Rising Lookback (bars) | 3 | 1-10 | ADX must be higher than N bars ago to confirm rising |
| Trend Confirmation Bars | 2 | 1-5 | Bars trend must persist before switching thresholds |
| RSI Buy Level (Strong Uptrend) | 40 | 30-55 | Oversold threshold during confirmed uptrends |
| RSI Sell Level (Strong Uptrend) | 80 | 70-90 | Overbought threshold during confirmed uptrends |
| RSI Buy Level (Strong Downtrend) | 20 | 10-30 | Oversold threshold during confirmed downtrends |
| RSI Sell Level (Strong Downtrend) | 60 | 50-70 | Overbought threshold during confirmed downtrends |
| RSI Buy Level (Neutral/Ranging) | 30 | 20-40 | Standard oversold threshold |
| RSI Sell Level (Neutral/Ranging) | 70 | 60-80 | Standard overbought threshold |
---
## Enhanced Info Panel
The information panel now displays two new rows:
1. **Trend State** — Shows current regime: "STRONG UP" (green), "STRONG DOWN" (red), or "NEUTRAL" (gray)
2. **RSI Levels** — Displays the currently active thresholds (e.g., "40 / 80" during uptrends)
Additionally, the **ADX row** now includes a directional arrow (↑ or ↓) indicating whether ADX is rising or falling.
---
## Enhanced Signal Labels
Buy and sell labels on the chart now include contextual information:
**Before (v1):**
```
BUY: 97,234.50
```
**After (v2):**
```
BUY: 97,234.50
STRONG UP | RSI<40
```
This provides immediate visual confirmation of which threshold regime triggered the signal.
---
## Enhanced Alert System
### New Alert Conditions
Three new alerts have been added for trend state changes:
- **🔼 Strong Uptrend Started** — Fires when market transitions to strong uptrend (thresholds shift to 40/80)
- **🔽 Strong Downtrend Started** — Fires when market transitions to strong downtrend (thresholds shift to 20/60)
- **⚖️ Trend Neutralized** — Fires when trend weakens and thresholds reset to 30/70
### Enhanced Webhook JSON
The JSON alert payload now includes additional fields for bot integration:
```json
{
"action": "BUY",
"symbol": "BTC/USDT",
"price": "97234.50",
"rsi": "38.5",
"rsi_threshold": "40",
"adx": "28.3",
"fisher": "-1.87",
"trend_state": "STRONG UP"
}
```
---
## Bonus Enhancement: Dynamic Fisher Thresholds
As an additional refinement, the Fisher Transform thresholds now adjust slightly based on trend state:
| Trend State | Fisher Buy Level | Fisher Sell Level |
|-------------|------------------|-------------------|
| Strong Uptrend | -1.5 (loosened) | -2.0 (standard) |
| Strong Downtrend | -2.0 (standard) | +1.5 (loosened) |
| Neutral | -2.0 (standard) | +2.0 (standard) |
This allows the indicator to trigger signals in strong trends where momentum oscillators rarely reach extreme levels.
---
## Practical Trading Impact
### Strong Uptrend Example (BTC rally)
- **Before:** Waiting for RSI < 30 means missing most pullback entries
- **After:** RSI < 40 triggers buy signals on normal pullbacks within the trend
### Strong Downtrend Example (Bear market bounce)
- **Before:** Waiting for RSI > 70 means holding through entire relief rallies
- **After:** RSI > 60 triggers sell signals on bounce exhaustion
### Ranging Market
- Thresholds remain at traditional 30/70 levels where mean reversion works best
---
## Backward Compatibility
The dynamic RSI feature can be completely disabled by turning off "Enable Trend-Adaptive RSI Levels" in the settings. When disabled, the indicator behaves identically to v1 using the neutral threshold values (30/70).
---
## Summary of Changes
| Component | v1 | v2 |
|-----------|----|----|
| RSI Thresholds | Fixed 30/70 | Dynamic based on trend state |
| Trend State Detection | Not present | +DI/-DI + ADX + Rising confirmation |
| Whipsaw Protection | Not present | Configurable confirmation bars |
| Info Panel Rows | 10 | 12 (added Trend State, RSI Levels) |
| ADX Display | Value only | Value + direction arrow |
| Signal Labels | Price only | Price + Trend State + Threshold |
| Alert Conditions | 10 | 13 (added 3 trend state alerts) |
| Webhook Fields | 5 | 7 (added rsi_threshold, trend_state) |
| Fisher Thresholds | Fixed | Adaptive (subtle adjustment) |
---
## Recommended Settings by Market Type
### Crypto (High Volatility)
- ADX Strong Trend Threshold: 24
- RSI Buy (Uptrend): 40-45
- RSI Sell (Downtrend): 55-60
### Forex (Medium Volatility)
- ADX Strong Trend Threshold: 22
- RSI Buy (Uptrend): 38-42
- RSI Sell (Downtrend): 58-62
### Stocks/Indices (Lower Volatility)
- ADX Strong Trend Threshold: 20
- RSI Buy (Uptrend): 35-40
- RSI Sell (Downtrend): 60-65
---
## Installation
1. Open TradingView and navigate to Pine Editor
2. Remove or rename existing QSig Pro+ indicator
3. Paste the complete v2 code
4. Click "Add to Chart"
5. Configure Dynamic RSI Thresholds in settings as desired
---
*QSig Pro+ v2 — Smarter entries through trend-aware signal generation*
Trend Flip Exhaustion SignalsThis Pine Script is designed to generate buy and short trading signals based on a combination of technical indicators. It calculates fast and slow EMAs, RSI, a linear regression channel, and a simplified TTM squeeze histogram to measure momentum.
- Short signals trigger when price is above both EMAs, near the upper regression channel, momentum is weakening, volume is fading, and RSI is overbought.
- Buy signals trigger when price is below both EMAs, near the lower regression channel, momentum is strengthening, volume is surging, and RSI is oversold.
- Signals are displayed as labels anchored to price bars (with optional plotshape arrows for backup).
- The script also plots the EMAs and regression channel for visual context.
In short - it’s a trend‑following entry tool that highlights potential exhaustion points for shorts and potential reversals for buys, with clear on‑chart markers to guide decision‑making.
Algo ۞ Halo 7MAs WonderA complete trend following and important MA crossing tool.
The indicator is self-explanatory. You decide where you want the triggers to go.
Enjoy!
PST Bread Checklist v4Uses 50/200 EMA for higher-timeframe trend
Uses RSI zones + cross for entry
Adds volatility filter (ATR vs its own average)
Optional session filter (RTH 09:30–16:00)
Has a cooldown so you don’t get 10 labels in a row
Shows a checklist box + last signal
BAY_PIVOT S/R(4 Full Lines + ALL Labels)//@version=5
indicator("BAY_PIVOT S/R(4 Full Lines + ALL Labels)", overlay=true, max_labels_count=500, max_lines_count=500)
// ────────────────────── TOGGLES ──────────────────────
showPivot = input.bool(true, "Show Pivot (Full Line + Label)")
showTarget = input.bool(true, "Show Target (Full Line + Label)")
showLast = input.bool(true, "Show Last Close (Full Line + Label)")
showPrevClose = input.bool(true, "Show Previous Close (Full Line + Label)")
useBarchartLast = input.bool(true, "Use Barchart 'Last' (Settlement Price)")
showR1R2R3 = input.bool(true, "Show R1 • R2 • R3")
showS1S2S3 = input.bool(true, "Show S1 • S2 • S3")
showStdDev = input.bool(true, "Show ±1σ ±2σ ±3σ")
showFib4W = input.bool(true, "Show 4-Week Fibs")
showFib13W = input.bool(true, "Show 13-Week Fibs")
showMonthHL = input.bool(true, "Show 1M High / Low")
showEntry1 = input.bool(false, "Show Manual Entry 1")
showEntry2 = input.bool(false, "Show Manual Entry 2")
entry1 = input.float(0.0, "Manual Entry 1", step=0.25)
entry2 = input.float(0.0, "Manual Entry 2", step=0.25)
stdLen = input.int(20, "StdDev Length", minval=1)
fib4wBars = input.int(20, "4W Fib Lookback")
fib13wBars = input.int(65, "13W Fib Lookback")
// ────────────────────── DAILY CALCULATIONS ──────────────────────
high_y = request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on)
low_y = request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on)
close_y = request.security(syminfo.tickerid, "D", close , lookahead=barmerge.lookahead_on)
pivot = (high_y + low_y + close_y) / 3
r1 = pivot + 0.382 * (high_y - low_y)
r2 = pivot + 0.618 * (high_y - low_y)
r3 = pivot + (high_y - low_y)
s1 = pivot - 0.382 * (high_y - low_y)
s2 = pivot - 0.618 * (high_y - low_y)
s3 = pivot - (high_y - low_y)
prevClose = close_y
last = useBarchartLast ? request.security(syminfo.tickerid, "D", close , lookahead=barmerge.lookahead_off) : close
target = pivot + (pivot - prevClose)
// StdDev + Fibs + Monthly (unchanged)
basis = ta.sma(close, stdLen)
dev = ta.stdev(close, stdLen)
stdRes1 = basis + dev
stdRes2 = basis + dev*2
stdRes3 = basis + dev*3
stdSup1 = basis - dev
stdSup2 = basis - dev*2
stdSup3 = basis - dev*3
high4w = ta.highest(high, fib4wBars)
low4w = ta.lowest(low, fib4wBars)
fib382_4w = high4w - (high4w - low4w) * 0.382
fib50_4w = high4w - (high4w - low4w) * 0.500
high13w = ta.highest(high, fib13wBars)
low13w = ta.lowest(low, fib13wBars)
fib382_13w_high = high13w - (high13w - low13w) * 0.382
fib50_13w = high13w - (high13w - low13w) * 0.500
fib382_13w_low = low13w + (high13w - low13w) * 0.382
monthHigh = ta.highest(high, 30)
monthLow = ta.lowest(low, 30)
// ────────────────────── COLORS ──────────────────────
colRed = color.rgb(255,0,0)
colLime = color.rgb(0,255,0)
colYellow = color.rgb(255,255,0)
colOrange = color.rgb(255,165,0)
colWhite = color.rgb(255,255,255)
colGray = color.rgb(128,128,128)
colMagenta = color.rgb(255,0,255)
colPink = color.rgb(233,30,99)
colCyan = color.rgb(0,188,212)
colBlue = color.rgb(0,122,255)
colPurple = color.rgb(128,0,128)
colRed50 = color.new(colRed,50)
colGreen50 = color.new(colLime,50)
// ────────────────────── 4 KEY FULL LINES ──────────────────────
plot(showPivot ? pivot : na, title="PIVOT", color=colYellow, linewidth=3, style=plot.style_linebr)
plot(showTarget ? target : na, title="TARGET", color=colOrange, linewidth=2, style=plot.style_linebr)
plot(showLast ? last : na, title="LAST", color=colWhite, linewidth=2, style=plot.style_linebr)
plot(showPrevClose ? prevClose : na, title="PREV CLOSE",color=colGray, linewidth=1, style=plot.style_linebr)
// ────────────────────── LABELS FOR ALL 4 KEY LEVELS (SAME STYLE AS OTHERS) ──────────────────────
f_label(price, txt, bgColor, txtColor) =>
if barstate.islast and not na(price)
label.new(bar_index, price, txt, style=label.style_label_left, color=bgColor, textcolor=txtColor, size=size.small)
if barstate.islast
showPivot ? f_label(pivot, "PIVOT " + str.tostring(pivot, "#.##"), colYellow, color.black) : na
showTarget ? f_label(target, "TARGET " + str.tostring(target, "#.##"), colOrange, color.white) : na
showLast ? f_label(last, "LAST " + str.tostring(last, "#.##"), colWhite, color.black) : na
showPrevClose ? f_label(prevClose, "PREV CLOSE "+ str.tostring(prevClose, "#.##"), colGray, color.white) : na
// ────────────────────── OTHER LEVELS – line stops at label ──────────────────────
f_level(p, txt, tc, lc, w=1) =>
if barstate.islast and not na(p)
lbl = label.new(bar_index, p, txt, style=label.style_label_left, color=lc, textcolor=tc, size=size.small)
line.new(bar_index-400, p, label.get_x(lbl), p, extend=extend.none, color=lc, width=w)
if barstate.islast
if showR1R2R3
f_level(r1, "R1 " + str.tostring(r1, "#.##"), color.white, colRed)
f_level(r2, "R2 " + str.tostring(r2, "#.##"), color.white, colRed)
f_level(r3, "R3 " + str.tostring(r3, "#.##"), color.white, colRed, 2)
if showS1S2S3
f_level(s1, "S1 " + str.tostring(s1, "#.##"), color.black, colLime)
f_level(s2, "S2 " + str.tostring(s2, "#.##"), color.black, colLime)
f_level(s3, "S3 " + str.tostring(s3, "#.##"), color.black, colLime, 2)
if showStdDev
f_level(stdRes1, "+1σ " + str.tostring(stdRes1, "#.##"), color.white, colPink)
f_level(stdRes2, "+2σ " + str.tostring(stdRes2, "#.##"), color.white, colPink)
f_level(stdRes3, "+3σ " + str.tostring(stdRes3, "#.##"), color.white, colPink, 2)
f_level(stdSup1, "-1σ " + str.tostring(stdSup1, "#.##"), color.white, colCyan)
f_level(stdSup2, "-2σ " + str.tostring(stdSup2, "#.##"), color.white, colCyan)
f_level(stdSup3, "-3σ " + str.tostring(stdSup3, "#.##"), color.white, colCyan, 2)
if showFib4W
f_level(fib382_4w, "38.2% 4W " + str.tostring(fib382_4w, "#.##"), color.white, colMagenta)
f_level(fib50_4w, "50% 4W " + str.tostring(fib50_4w, "#.##"), color.white, colMagenta)
if showFib13W
f_level(fib382_13w_high, "38.2% 13W High " + str.tostring(fib382_13w_high, "#.##"), color.white, colMagenta)
f_level(fib50_13w, "50% 13W " + str.tostring(fib50_13w, "#.##"), color.white, colMagenta)
f_level(fib382_13w_low, "38.2% 13W Low " + str.tostring(fib382_13w_low, "#.##"), color.white, colMagenta)
if showMonthHL
f_level(monthHigh, "1M HIGH " + str.tostring(monthHigh, "#.##"), color.white, colRed50, 2)
f_level(monthLow, "1M LOW " + str.tostring(monthLow, "#.##"), color.white, colGreen50, 2)
// Manual entries
plot(showEntry1 and entry1 > 0 ? entry1 : na, "Entry 1", color=colBlue, linewidth=2, style=plot.style_linebr)
plot(showEntry2 and entry2 > 0 ? entry2 : na, "Entry 2", color=colPurple, linewidth=2, style=plot.style_linebr)
// Background
bgcolor(close > pivot ? color.new(color.blue, 95) : color.new(color.red, 95))
AlphaTrend++ offset labelsAlphaTrend++
Overview
The AlphaTrend++ is an advanced Pine Script indicator designed to help traders identify buy and sell opportunities in trending and volatile markets. Building on trend-following principles, it uses a modified Average True Range (ATR) calculation combined with volume or momentum data to plot a dynamic trend line. The indicator overlays on the price chart, displaying a colored trend line, a filled trend zone, buy/sell signals, and optional stop-loss tick labels, making it ideal for day trading or swing trading, particularly in markets like futures (e.g., MES).
What It Does
This indicator generates buy and sell signals based on the direction and momentum of a custom trend line, filtered by optional time restrictions and signal frequency logic. The trend line adapts to price action and volatility, with a filled zone highlighting trend strength. Buy/sell signals are plotted as labels, and stop-loss distances are displayed in ticks (customizable for instruments like MES). The indicator supports standard chart types for realistic signal generation.
How It Works
The indicator employs the following components:
Trend Line Calculation: A dynamic trend line is calculated using ATR adjusted by a user-defined multiplier, combined with either Money Flow Index (MFI) or Relative Strength Index (RSI) depending on volume availability. The line tracks price movements, adjusting upward or downward based on trend direction and volatility.
Trend Zone: The area between the current trend line and its value two bars prior is filled, colored green for bullish trends (upward movement) or red for bearish trends (downward movement), providing a visual cue of trend strength.
Signal Generation: Buy signals occur when the trend line crosses above its value two bars ago, and sell signals occur when it crosses below, with optional filtering to reduce signal noise (based on bar timing logic). Signals can be restricted to a 9:00–15:00 UTC trading window.
Stop-Loss Ticks: For each signal, the indicator calculates the distance to the trend line (acting as a stop-loss level) in ticks, using a user-defined tick size (default 0.25 for MES). These are displayed as labels below/above the signal.
Time Filter: An optional filter limits signals to 9:00–15:00 UTC, aligning with active trading sessions like the US market open.
The indicator ensures compatibility with standard chart types (e.g., candlestick or bar charts) to avoid unrealistic results associated with non-standard types like Heikin Ashi or Renko.
How to Use It
Add to Chart: Apply the indicator to a candlestick or bar chart on TradingView.
Configure Settings:
Multiplier: Adjust the ATR multiplier (default 1.0) to control trend line sensitivity. Higher values widen the stop-loss distance.
Common Period: Set the ATR and MFI/RSI period (default 14) for trend calculations.
No Volume Data: Enable if volume data is unavailable (e.g., for certain forex pairs), switching from MFI to RSI.
Tick Size: Set the tick size for stop-loss calculations (default 0.25 for MES futures).
Show Buy/Sell Signals: Toggle signal labels (default enabled).
Show Stop Loss Ticks: Toggle stop-loss tick labels (default enabled).
Use Time Filter: Restrict signals to 9:00–15:00 UTC (default disabled).
Use Filtered Signals: Enable to reduce signal frequency using bar timing logic (default enabled).
Interpret Signals:
Buy Signal: A blue “BUY” label below the bar indicates a potential long entry (trend line crossover, passing filters).
Sell Signal: A red “SELL” label above the bar indicates a potential short entry (trend line crossunder, passing filters).
Trend Zone: Green fill suggests bullish momentum; red fill suggests bearish momentum.
Stop-Loss Ticks: Gray labels show the stop-loss distance in ticks, helping with risk management.
Monitor Context: Use the trend line and filled zone to confirm the market’s direction before acting on signals.
Unique Features
Adaptive Trend Line: Combines ATR with MFI or RSI to create a responsive trend line that adjusts to volatility and market conditions.
Tick-Based Stop-Loss: Displays stop-loss distances in ticks, customizable for specific instruments, aiding precise risk management.
Signal Filtering: Optional bar timing logic reduces false signals, improving reliability in choppy markets.
Trend Zone Visualization: The filled zone between trend line values enhances trend clarity, making it easier to assess momentum.
Time-Restricted Trading: Optional 9:00–15:00 UTC filter aligns signals with high-liquidity sessions.
Notes
Use on standard candlestick or bar charts to ensure accurate signals.
Test the indicator on a demo account to optimize settings for your market and timeframe.
Combine with other analysis (e.g., support/resistance, volume spikes) for better decision-making.
The indicator is not a standalone system; use it as part of a broader trading strategy.
Limitations
Signals may lag in highly volatile or low-liquidity markets due to ATR-based calculations.
The 9:00–15:00 UTC time filter may not suit all markets; disable it for 24-hour assets like forex or crypto.
Stop-loss tick calculations assume consistent tick sizes; verify compatibility with your instrument.
This indicator is designed for traders seeking a robust, trend-following tool with customizable risk management and signal filtering, optimized for active trading sessions.
This update enhances label customization, clarity, and signal usability while preserving all existing AlphaTrend++ logic. The goal is to improve readability during live trading and allow traders to personalize the visual footprint of entries and stop-loss levels.
Improvements
• Cleaner Label Placement
Labels now maintain consistent spacing from the candle, regardless of volatility or ATR expansion.
• Enhanced Visual Structure
BUY/SELL signals remain bold and clear, while SL ticks use a more compact and optional sizing scheme.
• Better User Control
New UI inputs:
Entry Label Size
SL Label Size
SL Label Offset (Ticks)nces.
Trend Trader//@version=6
indicator("Trend Trader", shorttitle="Trend Trader", overlay=true)
// User-defined input for moving averages
shortMA = input.int(10, minval=1, title="Short MA Period")
longMA = input.int(100, minval=1, title="Long MA Period")
// User-defined input for the instrument selection
instrument = input.string("US30", title="Select Instrument", options= )
// Set target values based on selected instrument
target_1 = instrument == "US30" ? 50 :
instrument == "NDX100" ? 25 :
instrument == "GER40" ? 25 :
instrument == "GOLD" ? 5 : 5 // default value
target_2 = instrument == "US30" ? 100 :
instrument == "NDX100" ? 50 :
instrument == "GER40" ? 50 :
instrument == "GOLD" ? 10 : 10 // default value
// User-defined input for the start and end times with default values
startTimeInput = input.int(12, title="Start Time for Session (UTC, in hours)", minval=0, maxval=23)
endTimeInput = input.int(17, title="End Time Session (UTC, in hours)", minval=0, maxval=23)
// Convert the input hours to minutes from midnight
startTime = startTimeInput * 60
endTime = endTimeInput * 60
// Function to convert the current exchange time to UTC time in minutes
toUTCTime(exchangeTime) =>
exchangeTimeInMinutes = exchangeTime / 60000
// Adjust for UTC time
utcTime = exchangeTimeInMinutes % 1440
utcTime
// Get the current time in UTC in minutes from midnight
utcTime = toUTCTime(time)
// Check if the current UTC time is within the allowed timeframe
isAllowedTime = (utcTime >= startTime and utcTime < endTime)
// Calculating moving averages
shortMAValue = ta.sma(close, shortMA)
longMAValue = ta.sma(close, longMA)
// Plotting the MAs
plot(shortMAValue, title="Short MA", color=color.blue)
plot(longMAValue, title="Long MA", color=color.red)
// MACD calculation for 15-minute chart
= request.security(syminfo.tickerid, "15", ta.macd(close, 12, 26, 9))
macdColor = macdLine > signalLine ? color.new(color.green, 70) : color.new(color.red, 70)
// Apply MACD color only during the allowed time range
bgcolor(isAllowedTime ? macdColor : na)
// Flags to track if a buy or sell signal has been triggered
var bool buyOnce = false
var bool sellOnce = false
// Tracking buy and sell entry prices
var float buyEntryPrice_1 = na
var float buyEntryPrice_2 = na
var float sellEntryPrice_1 = na
var float sellEntryPrice_2 = na
if not isAllowedTime
buyOnce :=false
sellOnce :=false
// Logic for Buy and Sell signals
buySignal = ta.crossover(shortMAValue, longMAValue) and isAllowedTime and macdLine > signalLine and not buyOnce
sellSignal = ta.crossunder(shortMAValue, longMAValue) and isAllowedTime and macdLine <= signalLine and not sellOnce
// Update last buy and sell signal values
if (buySignal)
buyEntryPrice_1 := close
buyEntryPrice_2 := close
buyOnce := true
if (sellSignal)
sellEntryPrice_1 := close
sellEntryPrice_2 := close
sellOnce := true
// Apply background color for entry candles
barcolor(buySignal or sellSignal ? color.yellow : na)
/// Creating buy and sell labels
if (buySignal)
label.new(bar_index, low, text="BUY", style=label.style_label_up, color=color.green, textcolor=color.white, yloc=yloc.belowbar)
if (sellSignal)
label.new(bar_index, high, text="SELL", style=label.style_label_down, color=color.red, textcolor=color.white, yloc=yloc.abovebar)
// Creating labels for 100-point movement
if (not na(buyEntryPrice_1) and close >= buyEntryPrice_1 + target_1)
label.new(bar_index, high, text=str.tostring(target_1), style=label.style_label_down, color=color.green, textcolor=color.white, yloc=yloc.abovebar)
buyEntryPrice_1 := na // Reset after label is created
if (not na(buyEntryPrice_2) and close >= buyEntryPrice_2 + target_2)
label.new(bar_index, high, text=str.tostring(target_2), style=label.style_label_down, color=color.green, textcolor=color.white, yloc=yloc.abovebar)
buyEntryPrice_2 := na // Reset after label is created
if (not na(sellEntryPrice_1) and close <= sellEntryPrice_1 - target_1)
label.new(bar_index, low, text=str.tostring(target_1), style=label.style_label_up, color=color.red, textcolor=color.white, yloc=yloc.belowbar)
sellEntryPrice_1 := na // Reset after label is created
if (not na(sellEntryPrice_2) and close <= sellEntryPrice_2 - target_2)
label.new(bar_index, low, text=str.tostring(target_2), style=label.style_label_up, color=color.red, textcolor=color.white, yloc=yloc.belowbar)
sellEntryPrice_2 := na // Reset after label is created






















