PG ATM Strike Line with Call & Put PremiumsPine Script: ATM Strike Line with Call & Put Premiums (Simplified)This Pine Script for TradingView displays the At-The-Money (ATM) strike price, futures price, call/put premiums (time value), and two ratios—Premium Ratio (PR) and Volume Ratio (VR)—for a user-selected underlying asset (e.g., NIFTY, BANKNIFTY, or stocks). It helps traders gauge near-term market direction using options data.How the Script WorksInputs:Expiry: Select year (e.g., '25), month (01–12), day (01–31) for option expiry (e.g., '251028').
Timeframe: Choose data timeframe (e.g., Daily, 15-min).
Symbol: Auto-detects chart symbol or select from Indian indices/stocks.
Strike: Auto-ATM (based on futures) or manual strike input.
Interval: Auto (e.g., 100 for NIFTY) or custom strike interval.
Colors: Customizable for ATM line, labels (Futures Price, CPR, PPR, VR, PR).
Calculations:Futures Price (FP): Fetches front-month futures price (e.g., NSE:NIFTY1!).
ATM Strike: Rounds futures price to nearest strike interval.
Option Data: Retrieves Last Traded Price (LTP) and volume for ATM call/put options (e.g., NSE:NIFTY251028C24200).
Call Premium (CPR): Call LTP minus intrinsic value (max(0, FP - Strike)).
Put Premium (PPR): Put LTP minus intrinsic value (max(0, Strike - FP)).
Premium Ratio (PR): PPR / CPR.
Volume Ratio (VR): Put Volume / Call Volume.
Visuals:Draws ATM strike line on chart.
Displays labels: FP (futures price), CPR (call premium), PPR (put premium), VR, PR.
VR/PR labels: Red (≥ 1.25, bearish), Green (≤ 0.75, bullish), Gray (0.75–1.25, neutral).
Updates on last confirmed bar to avoid redraws.
Using PR and VR for Market DirectionPremium Ratio (PR):PR ≥ 1.25 (Red): High put premiums suggest bearish sentiment (expect price drop).
PR ≤ 0.75 (Green): High call premiums suggest bullish sentiment (expect price rise).
0.75 < PR < 1.25 (Gray): Neutral, no clear direction.
Use: High PR favors bearish trades (e.g., buy puts); low PR favors bullish trades (e.g., buy calls).
Volume Ratio (VR):VR ≥ 1.25 (Red): High put volume indicates bearish activity.
VR ≤ 0.75 (Green): High call volume indicates bullish activity.
0.75 < VR < 1.25 (Gray): Neutral trading activity.
Use: High VR suggests bearish moves; low VR suggests bullish moves.
Combined Signals:High PR & VR: Strong bearish signal; consider put buying or call selling.
Low PR & VR: Strong bullish signal; consider call buying or put selling.
Mixed/Neutral: Use price action or support/resistance for confirmation.
Tips:Combine with technical analysis (e.g., trends, levels).
Match timeframe to trading horizon (e.g., 15-min for intraday).
Monitor FP for context; check volatility or news for accuracy.
ExampleNIFTY: FP = 24,237.50, ATM = 24,200, CPR = 120.25, PPR = 180.50, PR = 1.50 (Red), VR = 1.30 (Red).
Insight: High PR/VR suggests bearish bias; consider bearish trades if price nears resistance.
Action: Buy puts or exit longs, confirm with price action.
Conclusion: This script provides a concise tool for options traders, showing ATM strike, premiums, and PR/VR ratios. High PR/VR (≥ 1.25) signals bearish sentiment, low PR/VR (≤ 0.75) signals bullish sentiment, and neutral (0.75–1.25) suggests indecision. Combine with technical analysis for robust trading decisions in the Indian options market.
Volatilidad
HV Spike Strategy (HVP + OR Breakout + Reversal + TP/SL Modes)Here is a script that I tried to make it simple, although it has several parameters, I will try to explain, here we go:
Logic: Open Range Breakout: otherwise knows as First Candle Rule, usually used for the first candle in the opening of a market session, in my strategy there is an option to use it even for Crypto that operate 24/7, how to do that? Simply by detecting Volatility from the HVP (Historical Volatility Percentile). Then the ORB logic kicks in and the first candle with high volatility gives the ranges for the trades. The proper HVP Activation Threshold has to be selected for each currency pair/index/crypto in order to have maximum profit.
Enter a trade: when the price goes 100% above/below the First Candle Rule Range. That way it is filtering fake breakouts. Also if the price reverses back into the range the strategy takes the opposite trade.
Exit a trade: SL/TP By percentage or ATR, selection in the input menu.
My intention is to avoid using lagging indicators or guessing of Price Action, purely Bull/Bear indication by the first candle.
I hope you find this helpful! Wishing all successful Trades!
ATR Trailing Stop with Entry Date & First-Day MultiplierATR based trailing stop based on a X post of Aksel Kibar.
Jesses 1.2This indicator detects Break of Structure (BOS) using a strict “break-only + one opposite candle to the left” rule. On confirmation, it draws a sticky zone box (orange for BUY, teal for SELL) anchored to the origin candle and extends it until breached. It includes session filtering (Sydney/Tokyo, London, New York in NZ time), optional origin-candle tint with adjustable opacity, and alerts that trigger only when a box is created. Internally it tracks bullish/bearish runs, enforces one-per-reference logic, rotates recent boxes, and freezes active boxes at the daily boundary.
Nosreme v6 - Kulture MetricsNosreme v6 — Kulture Metrics
The evolution of Klarity.
Nosreme brings refined volume intelligence and conviction-based trade mapping to the Kulture Metrics framework.
It only triggers when trend structure and real participation align — filtering false breakouts and fake volume.
Core Elements
• Simple Moving Average (SMA) defines trend bias
• Volume SMA filter validates momentum participation
• ATR-based dynamic risk levels project targets & stops
• Visual “BUY/SELL (Nosreme)” markers at confirmed triggers
• Background shading for directional bias (green = bullish, red = bearish)
Usage
Add to chart, any asset or timeframe (ideal: 15 min – 4 h).
Set alerts “Once per bar close” on Nosreme BUY or Nosreme SELL.
Tune ATR Multiplier / R:R ratio to match volatility profile.
Kulture Metrics • Detroit × Atlanta • Billions Mindset • © 2025
Precision. Discipline. Nosreme.
Fishnet Squeeze [Osprey]🟠 Overview
The SMA Fishnet with Squeeze indicator combines a multi-timeframe moving average ribbon system with an advanced squeeze detection algorithm to help traders identify both trend direction and potential breakout opportunities.
🟠 How to Use This Indicator
- Squeeze Breakout Trading
When the indicator signals a squeeze (yellow diamond marker and highlighted background), prepare for a potential breakout in either direction
- Support and Resistance Identification
The twelve SMA levels act as dynamic support and resistance zones. Price often bounces or pauses at these levels, especially at the convergence of multiple SMAs.
Squeeze Settings
- **Enable/Disable**: Toggle squeeze detection on or off
- **Lookback Period**: Adjust the historical comparison window (20-200 bars)
- **Percentile Threshold**: Set sensitivity for squeeze detection (1-20%)
- **Minimum Duration**: Define how many bars must confirm a squeeze (1-10)
- **Visual Customization**: Modify squeeze marker colors to suit your preferences
‼️ Test different values for Lookback Period ! Lower lookback period = more frequent squeeze marks. I suggest using 31 or 100.
🟠 The Fishnet Structure
The indicator employs twelve SMAs ranging from ultra-short-term (3-period) to long-term (200-period), creating a "fishnet" pattern on your chart. This graduated approach provides a comprehensive view of price action across multiple timeframes simultaneously:
🟠 Advanced Squeeze Detection Algorithm
The squeeze detection component identifies periods when all twelve SMAs converge into an unusually tight range, indicating market indecision and potential energy buildup. The algorithm uses several sophisticated filters:
1. ATR-Normalized Range Calculation: The indicator normalizes the SMA range using Average True Range (ATR) to ensure consistent squeeze detection across different volatility environments and price levels.
2. Historical Percentile Analysis: Compares the current normalized range against a customizable lookback period (default: 31 bars) to identify when SMAs are in the bottom percentile of historical tightness.
3. Statistical Validation: Uses z-score analysis to confirm that the current range is significantly below the mean, filtering out false signals.
4. Duration Confirmation: Requires the squeeze condition to persist for a minimum number of consecutive bars (default: 3) to validate genuine compression.
5. Local Minimum Verification: Confirms that the current squeeze represents the tightest point in recent history (20-bar window).
Directional EMA - For Loop | Lyro RSDirectional EMA - For Loop | Lyro RS
Introduction
This indicator combines multi-type moving averages, loop-based momentum scoring, and divergence detection for adaptive trend and reversal analysis.
Key Features:
Multiple Moving Average Selection System: Choose from 16 different MA types - HMA, ALMA and JMA etc. To match your style best.
For Loop Based Scoring: Uses a From / To system to calculate cumulative buying/selling pressure across recent price action.
Signal Threshold: Long / Short threshold levels to control the sensitivity for different market conditions.
Divergence Detection: Regular bullish / bearish with clear labels for potential reversal points.
Clean Visuals: Multiple color themes with table and color based indicator line for easy reading.
How It Works:
Core Calculation: The indicator first creates a directional signal by comparing price to your selected moving average, normalized for current volatility.
Loop Analysis: This signal feeds into a for-loop that scores recent price history, generating a cumulative momentum value.
Signal Generation:
Bullish signals trigger when the score crosses above the Upper Threshold
Bearish signals trigger when the score crosses below the Lower Threshold
Divergence Alerts: Automatically detects when price makes new highs/lows that aren't confirmed by the oscillator.
Practical Use:
Trend Identification: The color-coded oscillator and signal table help confirm trend direction.
Reversal Warning: Divergence labels highlight potential trend exhaustion points for careful watch.
Customization:
Adjust MA type and length for sensitivity tuning
Modify loop parameters (From/To) to change analysis depth
Fine-tune threshold levels for signal frequency
Enable/disable divergence detection as needed
⚠️ Disclaimer
This tool is for technical analysis education only. It does not guarantee results or constitute financial advice. Always use proper risk management and combine with other analysis methods. Past performance doesn't predict future results.
Bollinger Band Spread (Dunk)Bollinger Band Width measures the distance between the upper and lower Bollinger Bands. It reflects market volatility—wider bands mean higher volatility, narrower bands mean lower volatility.
When the width contracts to low levels, it can signal price consolidation and potential breakouts. When the width expands, it indicates active markets or strong trends.
Traders use it to spot volatility squeezes, confirm breakouts, and compare relative volatility across assets or timeframes.
Inflection Nexus - SPAInflection Nexus - SPA: Self-Adapting Trend Reversal System
Overview
Inflection Nexus - SPA (Shadow Portfolio Adaptation) is an adaptive trend-following indicator that automatically optimizes its parameters in real-time through a unique shadow testing methodology. Unlike traditional static indicators that use fixed ATR periods and multipliers, this system continuously evaluates multiple parameter combinations in the background and dynamically adjusts to current market conditions without manual intervention.
What Makes This Original
The core innovation is the Shadow Portfolio Adaptation (SPA) engine, which runs parallel virtual portfolios in the background to test different ATR period and multiplier combinations. The system tracks the performance of these shadow portfolios over rolling windows and automatically switches to the best-performing parameter set. This creates a self-improving indicator that adapts to changing volatility regimes, trending vs. ranging markets, and shifting market dynamics without requiring user reconfiguration.
This is not simply a combination of existing indicators. The SPA engine is a novel approach that transforms the traditional Supertrend methodology from a static tool into an adaptive system with built-in machine learning principles.
Core Components and How They Work Together
1. Adaptive Supertrend Foundation
The base trend detection uses an ATR-based Supertrend calculation with your chosen source (default: hlcc4 for smoothness). Rather than using fixed parameters, the system starts with your configured ATR Period and Multiplier as baseline values.
2. Shadow Portfolio Adaptation Engine
This is where the innovation happens. The system simultaneously tests multiple parameter variations in the background:
- Creates shadow portfolios with different ATR periods (spanning from your base period minus a range to plus a range)
- Tests different ATR multipliers for each period
- Each shadow portfolio tracks virtual trade performance over a configurable lookback window
- Calculates a confidence score based on win rate, profit factor, and trade frequency
- Automatically switches to the best-performing parameter combination
- Implements smooth transitions to prevent whipsaw from parameter changes
The adaptation happens continuously, allowing the system to shift from tight, responsive settings during low volatility to wider, more conservative settings during high volatility periods.
3. Signal Generation Logic
The system offers two complementary signal modes:
Reversal Mode (default): Identifies potential trend exhaustion points. A sell signal requires price to make a new structural high while the trend is bullish, then flip bearish. This captures the exact moment a trend runs out of momentum. The "Require New High/Low During Trend" filter ensures signals only occur at genuine extremes, not mid-range noise.
Breakout Mode (optional): Identifies trend continuation. Signals occur when price breaks to new highs/lows in the direction of the current trend, confirming momentum rather than reversing it.
4. Multi-Layer Confirmation Filters
Each signal passes through optional quality filters:
- RSI Momentum Filter : Ensures buy signals occur after RSI has been oversold (preventing buying into exhaustion) and sell signals occur after RSI has been overbought
- Volume Spike Confirmation : Requires increased volume relative to recent average, confirming conviction behind the move
- Major Level Filter : Ensures signals only occur after significant price moves (measured in ATR multiples), filtering out minor fluctuations
5. Risk Management Integration
The dashboard displays real-time metrics including:
- Current regime classification (Trending, Volatile, Ranging)
- Shadow portfolio performance tracking
- Adaptive confidence scores
- Parameter evolution log
- Market heat map showing probability zones
How to Use This Indicator
Setup:
1. Apply the indicator to your chart
2. Start with default settings for your first session
3. The SPA engine requires a warm-up period (controlled by "Learning Window") to gather sufficient data - expect optimal adaptation after 100-200 bars
4. Enable the dashboard to monitor the adaptation process and current market regime
Signal Interpretation:
- Long signals (green triangles below price): Enter long when the system detects a potential bullish reversal or breakout
- Short signals (red triangles above price): Enter short when the system detects a potential bearish reversal or breakout
- Dashboard color coding : Green regime = favorable for trend-following, Yellow = volatile (use caution), Red = choppy (consider reducing position size)
Best Practices:
- Use Reversal Mode in swing trading environments where you want to catch major turning points
- Use Breakout Mode in strong trending markets where you want confirmation entries
- Enable both modes for comprehensive coverage, but filter by the regime indicator
- The "Min Bars Between Signals" setting prevents over-trading - start at 10-12 bars for most timeframes
- Pay attention to the "Map Heat" metric - higher active cells indicate more defined market structure
Parameter Optimization:
The system is designed to self-optimize, but you can guide it:
- Sensitivity : Lower values (15-25) for intraday scalping, higher values (40-60) for swing trading
- ATR Period : Your baseline starting point - the SPA engine will explore around this value
- Multiplier : Your baseline band width - the engine tests variations of this
- Learning Window : How many bars of data the shadow portfolios evaluate (200-500 for most markets)
- Adaptation Frequency : How often the system checks for better parameters (30-50 bars balances responsiveness and stability)
Dashboard Insights:
The three-panel dashboard provides real-time intelligence:
- Panel A shows current signal state, trend direction, and overall market regime
- Panel B displays shadow portfolio statistics, confidence scores, and the adaptation log
- The regime classification helps you understand if current market conditions favor trending strategies or if you should reduce exposure
Calculation Methodology
The system operates in three phases:
Phase 1 - Base Calculation:
- Calculates ATR using your specified period and method (RMA for smoothness)
- Identifies structural highs/lows using the sensitivity parameter
- Computes initial Supertrend bands: Price ± (ATR × Multiplier)
Phase 2 - Shadow Testing:
- Creates a grid of parameter combinations (ATR periods from base-5 to base+15, multipliers from base-0.5 to base+1.0)
- For each combination, simulates trade entries and exits over the learning window
- Tracks metrics: win rate, profit factor, max drawdown, trade count
- Calculates a confidence score using weighted metrics (win rate × 0.4 + profit factor × 0.3 + normalized trade frequency × 0.3)
Phase 3 - Adaptive Selection:
- Every N bars (adaptation frequency), ranks all shadow portfolios by confidence score
- Selects the highest-scoring parameter set
- Implements parameter change with transition smoothing to prevent signal disruption
- Logs the change and updates the dashboard
This creates a continuous feedback loop where the indicator learns from recent market behavior and adjusts its sensitivity accordingly.
Ideal Market Conditions
Best Performance:
- Markets with clear swing structure (forex majors, liquid stocks, major indices)
- Timeframes from 5-minute to daily (indicator adapts across timeframes)
- Trending markets with periodic consolidations (where reversals are meaningful)
Challenging Conditions:
- Extremely low liquidity assets (insufficient price action for adaptation)
- Very low timeframes (1-minute or below) where noise dominates
- Markets in deep consolidation for extended periods (the system will reduce signal frequency appropriately)
Technical Notes
- The indicator uses lookback functions with a 5000-bar maximum, ensuring sufficient historical context
- Shadow portfolios are lightweight - they don't execute actual trades, only track hypothetical P&L
- The confidence-based selection prevents the system from chasing random variations
- The minimum bars between signals prevents over-fitting to short-term fluctuations
- All calculations are performed on closed bars to prevent repainting
Recommended Settings by Trading Style
Day Trading (5-15 min charts):
- Sensitivity: 20-30
- ATR Period: 14-20
- Multiplier: 1.2-1.5
- Min Bars Between Signals: 8-12
- Enable RSI Filter: Yes
Swing Trading (1H-4H charts):
- Sensitivity: 30-50
- ATR Period: 20-30
- Multiplier: 1.5-2.0
- Min Bars Between Signals: 10-15
- Enable Major Levels Only: Optional
Position Trading (Daily charts):
- Sensitivity: 50-80
- ATR Period: 30-40
- Multiplier: 2.0-2.5
- Min Bars Between Signals: 5-10
- Enable Breakout Mode: Consider
The SPA engine will refine these starting points automatically based on actual market performance.
Important Disclaimers
This indicator is a technical analysis tool designed to identify potential trend changes and continuation points. It should not be used as a standalone trading system. Always combine with proper risk management, position sizing, and additional confirmation methods. Past performance of the adaptation engine does not guarantee future results. The shadow portfolio system is designed to improve parameter selection, but no indicator can predict market movements with certainty.
— Dskyz, Trade with insight. Trade with anticipation.
Cybertrading-Insidebar hunter pro robotThe Cybertrading-Inside Pro strategy is an advanced version of Cyber-Inside.
It automates ATR-based inside-bar trading with optional pullback entries, full risk/reward visualization, time filtering, pending-order handling, and fixed chart watermark branding (“CollegePips / CyberTrading”).
⚙️ Technical Overview
1. Core Structure
Uses ATR(14) to measure volatility and classify candle ranges.
Candles are labeled as Spinning, Standard, Long, or Huge based on their range vs. ATR.
Only valid candles (Standard or Long) qualify to confirm a setup.
2. Inside-Bar Logic
The setup requires the current candle’s high/low to be fully contained inside the previous candle (an inside bar).
A wick-break must occur — the wick slightly breaks the previous inside bar’s range while the body remains inside.
This pattern forms a Pierce-Only signal.
Direction:
Wick down → potential Long entry
Wick up → potential Short entry
3. Timing and Entry Conditions
With the time filter enabled, trades trigger only between defined hours (e.g., 07–22).
If Enable Pullback is on, the entry is placed using a limit order offset by pullbackATR × ATR from the signal candle.
If the pullback entry isn’t triggered within pullbackMaxBars, the pending order is canceled automatically.
You can also enable display-only entries without execution (Enable Entry Without Pullback).
4. Risk & Target Management
Stop loss is placed beyond the second-previous candle’s high/low ± stopBuffer × ATR.
Take-profit is based on the chosen risk/reward multiple (RR) or the previous candle’s high/low.
Position size auto-adjusts to keep total risk equal to riskPercent of equity.
5. Visual Components
Dynamic chart objects include:
Red box: risk zone (entry → stop)
Green/blue box: reward zone (entry → target)
Dotted diagonal line: risk-to-reward path
Arrows: actual fill points
6. Order Management System
Each signal creates a unique order ID (pendingId) and exit ID (planExitId).
On a valid fill (newLong / newShort), real stop, target, and position size are applied.
If an order isn’t filled within the timeout window, it’s canceled and reset automatically.
7. Advantages
✅ Smart inside-bar pattern recognition
✅ Automated risk control and dynamic sizing
✅ Clear visual feedback for analysis
✅ Fully backtest-ready for research or education
CyberTrading-Inside Hunt RobotThis Pine Script strategy, titled "Cyber-Inside", is a fully automated entry and risk management system built around inside bar pierce patterns and ATR-based dynamic stops/targets. It identifies specific candle formations, calculates position sizing based on risk percentage, and visually displays risk/reward zones and trade labels on the chart.
Detailed Explanation
1. Core Logic
The script searches for inside bars — candles whose high and low are contained within the previous bar — that appear after a valid “normal” or “long” range candle.
Then it waits for a wick pierce (a candle that breaks the previous inside bar's range slightly but closes inside).
That wick pierce acts as a potential reversal or continuation signal:
wickDown → possible long entry
wickUp → possible short entry
2. ATR-based Classification
Each candle is compared to the ATR(24):
Spinning (small) → below 0.8 × ATR
Standard → between 0.8× and 1.2× ATR
Long → between 1.2× and 2.5× ATR
Huge → above 2.5× ATR
Only certain candle types (standard or long) in the previous bars qualify for pattern validation.
3. Entry Conditions
A trade signal occurs when:
The current bar forms a wick pierce of a prior inside bar pattern.
No active position exists (strategy.position_size == 0).
Then:
For longs, entry at close, stop at previous low minus ATR buffer.
For shorts, entry at close, stop at previous high plus ATR buffer.
4. Risk Management
The stop distance defines the risk per trade, and the position size is adjusted dynamically so that only the chosen riskPercent (e.g., 1%) of equity is at risk.
If useRR is enabled, a take-profit target is placed using the defined risk/reward multiple (rr, e.g. 1:3).
If disabled, the target defaults to the previous candle’s high or low.
5. Visualization
The strategy visually marks:
Entry points (triangles)
Red box = risk zone (entry → stop)
Green box = reward zone (entry → target)
Optional diagonal and horizontal lines for clarity
Labels updated after trade closes with PnL values (profit or loss)
6. Application
This system helps traders:
Automate inside-bar breakout or reversal entries
Maintain strict risk-based position sizing
Visually assess trade zones and risk/reward areas
Backtest and evaluate performance consistency on various timeframes and assets
Average Daily Range [Blaz]Version 1.0 – Published October 2025: Initial release
1. Overview & Purpose
The Average Daily Range is an advanced volatility assessment tool designed to give traders a clear, real-time view of the market's expected daily movement. It calculates the average range between daily highs and lows over a user-defined historical period and projects this average onto the current trading session.
By visualising the potential high and low boundaries for the day, this indicator assists in setting realistic profit targets, managing risk effectively, and identifying when price action is becoming overextended relative to its recent volatility profile. It is an essential tool for day traders and swing traders across all markets, including Forex, Stocks, Crypto, Futures, and Commodities.
2. Core Functionality & Key Features
The indicator provides a dynamic, multi-faceted analysis of daily volatility:
Historical ADR Calculation: Automatically computes the Average Daily Range based on the specified number of previous trading days (configurable from 1 to 20).
Real-Time Range Tracking: Monitors and displays the current day's live price range as it develops.
Percentage Used Metric: Shows the percentage of the historical ADR that the current day's range has already consumed, providing an immediate gauge of remaining volatility potential.
Remaining Range Projection: Visually highlights the potential upward and downward movement remaining to meet the average range, displayed as semi-transparent areas on the chart.
Daily Open Reference: Plots customisable vertical separation lines and horizontal price lines at the daily open to clearly anchor the current session's price action.
3. Visual Components & Analytical Insights
A fully configured Average Daily Range setup displays several key analytical components that work together to provide a comprehensive volatility overview.
3.1. Information Table
A highly customizable data table provides a concise summary of all critical metrics at a glance:
Historical Ranges: Displays the individual daily ranges for the selected lookback period.
ADR Value: The calculated average range.
Today's Range: The live, developing range for the current session.
% Used: A colour-coded percentage (turning orange upon exceeding 100% and red upon exceeding 150%) showing how much of the average volatility has been consumed.
3.2. Visual Range Projections
Remaining Range Zones: When the current day's range is below the historical average, semi-transparent zones extend from the current day's extreme high and low, illustrating the additional movement required to reach the ADR. This provides an instant visual cue for potential target zones.
Daily Open Markers: Clean, customisable lines mark the start of each trading day (vertical line) and the daily open price (horizontal line), helping to contextualise intraday price moves.
4. Input Parameters and Settings
4.1. General Settings
Lookback: Set the number of days used to calculate the Average Daily Range (1-20).
Set Alert: Configure alerts to be notified when the current day's range consumes a significant portion (e.g., 100% or more) of the historical ADR.
4.2. Table Customization
Visibility & Style: Toggle the table and historical data on/off. Fully customise the header and body colours, text colours, border style, and font sizes.
Placement & Orientation: Precisely position the table anywhere on the chart (Top/Bottom/Centre, Left/Right) and choose between Horizontal or Vertical layout to best suit your chart layout.
4.3. Visual Style Controls
Remaining Range: Toggle the projection zones on/off and customise their colour and transparency.
Daily Open Markers: Independently control the visibility, colour, style, and width of the daily separation line and the open price line.
5. Protected Logic & Original Design
The Average Daily Range indicator incorporates proprietary logic for efficiently tracking intraday extremes, managing historical data arrays, and dynamically rendering visual elements. The closed-source nature of this tool protects the author's original code structure and optimisation techniques, particularly the real-time area fill projection logic for the remaining daily range and the dynamic table management system. This ensures the indicator remains performant and reliable while being freely accessible to the entire TradingView community.
6. Disclaimer & Terms of Use
This indicator, titled Average Daily Range , has been independently developed by the author. The code and its structural logic are original and were written entirely from scratch to reflect a unique and efficient approach to volatility analysis. The internal mechanics were written from scratch and are not based on any publicly available script or third-party code.
This tool is provided solely for educational and informational purposes. It is not intended as financial advice, investment guidance, or a specific recommendation to buy or sell any financial instrument. The indicator is designed to assist with technical analysis based on volatility but does not guarantee accuracy or profitability.
Trading financial markets involves significant risk, including the possibility of loss of capital. By using this indicator, you acknowledge and accept that you are solely responsible for any decisions you make and for all trading outcomes. No part of this script should be considered a signal or assurance of success in the market.
[Kpt-Ahab] Assistant: Risk & DCA PlannerScript Description – Assistant: Risk & DCA Planner
The Risk & DCA Planner is a technical assistant for position and risk management.
It automatically calculates, based on volatility (ATR%), swing structure, and your settings:
Stop-Loss (SL) and corresponding Take-Profit targets (TPs) in R-multiples
DCA (Dollar-Cost-Averaging) levels — both price and amount
A market suitability check (based on volatility & volume)
Plus a clear table and summary label displayed on the chart
The script helps you plan risk, scaling, and profit targets consistently and quantitatively.
Core Logic
Risk Profile
Three modes: Low, Normal, High.
These define how reactive the script behaves internally:
Low → conservative, longer lookbacks, tighter analysis
Normal → balanced
High → aggressive, faster reaction, wider stops
Stop-Loss (SL)
Automatically calculated from ATR% and recent swing structure, limited by minimum and maximum thresholds.
The SL percentage defines the R-unit, which all TPs and DCA levels are based on.
Take-Profits (TPs)
Up to six targets, each a multiple of the defined risk (e.g., 1R, 2R, 3R).
Prices are automatically adjusted depending on long or short direction.
DCA Strategy
Optional. Adds scaling levels evenly between Entry and SL or in multiples of the ATR.
Each DCA allocation grows geometrically until the maximum position size is reached.
Suitability Check
Evaluates whether the market is within an appropriate ATR% range and has sufficient volume.
The table displays “OK” or “Caution” depending on volatility and historical consistency.
Visualization
Lines for SL, TPs, and DCA levels
A table with all parameters, prices, and risk data
A chart label summarizing key info (profile, direction, SL%, TPs, DCA, etc.)
Ant_JJun 5분봉 데이 트레이딩 지표[체험판]Ant_JJun — 5분봉 단기 규칙 기반 데이 트레이딩 프레임워크
(Ichimoku 구조 + 거래량 논리 기반)
이 지표는 BTC 5분봉 환경에서의 단기 트레이딩 의사결정을 돕기 위해 설계되었습니다.
목표는 진입 신호의 빈도를 늘리는 것이 아니라, 추세 구간과 비추세 구간을 구별하여 불필요한 노출을 줄이는 것에 있습니다.
많은 보조지표는 가격이 이미 움직인 뒤에만 유효하게 작동합니다.
이 시스템은 반대로, 방향성이 형성되기 전의 횡보 구간에서 자본 손실을 억제하는 것을 우선합니다. 이를 위해 일목 구조(선행스팬 기반)로 환경을 분류하고, 거래량 비대칭과 캔들 성향을 추가 필터로 사용합니다.
핵심 작동 개념
• 선행스팬 기반 구조 판별로 추세/중립 환경을 분리
• 구조 + 거래량 + 캔들조건이 모두 정렬될 때만 방향 라벨 출력
• 정렬되지 않을 경우 진입 강제가 아닌 ‘대기’ 상태 유지
• 리페인트 없음 / 사후 라벨 생성 없음 / 실시간 판정
사용 환경
• 5분봉 단기 매매
• 데이터 발표 등 변동성 이벤트 인접 구간 관찰 목적
• 자동매매가 아닌 규칙 기반 의사결정 필터링용
이 스크립트는 독자적 방식이 포함되어 있어 공개 배포되지 않습니다.
Ant_JJun — 5-Minute Rule-Based Day-Trading Framework
(Ichimoku structure + volume logic)
This indicator is designed to support short-term decision-making on the BTC 5-minute chart.
Its goal is not to increase signal frequency, but to reduce unnecessary exposure by distinguishing trending from non-trending conditions.
Most indicators only function effectively after price has already moved.
This framework prioritizes capital protection during pre-move consolidation.
It classifies market context using Ichimoku leading spans, and adds volume imbalance and candle behavior as additional filters.
Core operating logic
• Leading-span structure to classify trend vs. neutral zones
• Directional labels only when structure + volume + candle conditions align
• When alignment is absent, the system remains in a waiting state rather than forcing entries
• No repainting / no post-hoc labels / real-time evaluation only
Intended environment
• 5-minute intraday trading
• Particularly around volatility events such as economic data releases
• Used as a rule-based decision filter rather than an automation engine
This script is not publicly distributed due to proprietary methodology.
Ant_JJun 5-Minute Day-Trading IndicatorThis invite-only indicator is designed for short-term BTC and crypto trading, focusing on precision during volatile data-driven markets and capital protection during sideways conditions.
It integrates Ichimoku-based structure mapping with volume asymmetry analysis and proprietary rule-based filters.
Unlike a traditional mashup, this system does not simply overlay multiple indicators.
It uses Ichimoku’s leading spans to classify structural bias (trend vs. neutral), then evaluates directional confirmation through candle displacement and volume pressure imbalance.
Only when both structure and momentum align is a directional label printed.
If the system detects indecision (flat or overlapping clouds with contracting volume), it enters a neutral state to avoid unnecessary exposure.
Key concept:
— Preventing bleed during non-trending phases
— Adaptive response around macro/volatility events (e.g., CPI, PMI)
— Rule-based execution to remove emotional decision-making
Usage notes:
— Intended for 5-minute intraday use
— Long/Short labels appear only on rule-confirmed entries
— No repainting / no backfill logic
— Analytical use only — not investment advice
mfi_maThis combination is a powerful technical analysis strategy that merges momentum and volume (from the MFI) with the underlying trend direction (from the Moving Average). The core philosophy is simple: Use the Moving Average to determine the market's direction, and use the MFI to find optimal entry points within that trend.
This approach moves beyond using the MFI in isolation, which can generate false signals in a strong, trending market. It adds a crucial layer of context, significantly improving the quality of your signals.
XAUUSD Family Scalping (5min)🟡 XAUUSD Family Scalping 5-Min — Momentum Precision Indicator
Overview
This indicator is built for XAUUSD (Gold) on the 5-minute timeframe and is designed for short-term momentum scalping.
It helps traders identify early reversal zones, confirm momentum direction, and detect exhaustion points during high-volatility market moves.
Core Concept
The indicator measures momentum strength and price acceleration using a smoothed oscillator.
It features two adjustable thresholds:
Overbought level: 58
Oversold level: -58
When the momentum line crosses above or below these zones, it signals potential trend continuation or reversal opportunities.
Features
Detects short-term momentum shifts on XAUUSD 5M.
Works with EMA-based trend confirmation (optional).
Adaptive smoothing reduces noise and false reversals.
Highlights overbought/oversold areas visually.
Can be combined with price action or other oscillators for confluence.
Usage
Instrument: XAUUSD (Gold)
Best timeframe: 5-minute (scalping setup)
Use case: Detecting momentum exhaustion and reversal entries.
Sessions: London & New York recommended.
Disclaimer
This indicator is for market analysis and educational purposes.
No indicator guarantees profit — use proper risk management and test before live trading.
[Aegis]DCA grid Strategy for Crypto### **Crypto Market Long-Only Strategy (DCA with Risk Mitigation)**
This strategy is a Long-only approach, often using a Dollar-Cost Averaging (DCA) method for staggered entries. It is designed to mitigate the risk of being unable to exit a position for a prolonged period, which typically occurs when a series of initial DCA entries result in a losing trade.
The strategy has the following characteristics:
#### **1. Markets**
* Trade in highly liquid Perpetual Futures markets for cryptocurrencies.
#### **2. Position Sizing**
The initial entry quantity is determined by setting the **Initial Entry Ratio** in the input values.
* If the **Subsequent Entry Multiplier** is 1, the maximum position size upon final entry is determined by:
$$\text{Initial Entry Quantity} \times \text{Number of Entries}$$
* If the **Subsequent Entry Multiplier** is $x$, the maximum position size is determined by the following cumulative sum:
$$\text{1st Entry Quantity} + (\text{1st Entry Quantity} \times x) + (\text{2nd Entry Quantity} \times x) + \dots + ((\text{n-1)th Entry Quantity} \times x)$$
#### **3. Entries**
* The **1st Entry** is determined by the **Entry Sensitivity**. The first entry is automatically calculated based on an oversold condition; setting a higher sensitivity value will trigger the 1st entry in a more significant oversold situation.
* Entries from the **2nd Entry onwards** are made sequentially based on the generated **Grid Spacing**.
* The **Grid Spacing** is calculated as an equal interval:
$$\text{Grid Spacing} = \frac{\text{Final Entry Distance}}{(\text{Number of Entries} - 1)}$$
#### **4. Exits**
This strategy **does not distinguish between Stop-Loss and Take-Profit**. All entered quantities are liquidated simultaneously upon mean reversion. This transaction may result in either a loss or a profit. Generally:
* If the price recovery is rapid, the trade finishes with a profit.
* If the price recovery is slow, the trade finishes with a loss.
Therefore, the **'resilience' or 'recovery speed'** of the underlying asset significantly influences the long-term performance of the strategy.
크립토 시장에 특화된 Long only전략입니다. DCA 방식의 분할 매수 전략이 대체로 이익 거래가 아닌 경우, 장기간 탈출하지 못할 리스크를 보완한 전략입니다.
이 전략은 다음과 같은 특징을 가지고 있습니다.
##### 1. 시장 (Markets)
• 유동성이 풍부한 코인 무기한 선물 시장에서 거래한다.
##### 2. 포지션 크기 (Position Sizing)
인풋 값에 최초진입비율을 설정함으로써 1차 진입의 수량이 결정됩니다.
- 추가 진입배수가 1일 때, 최대 진입 시 포지션 크기는 "1차 진입수량 * 진입횟수"에 의해 결정됩니다.
- 추가 진입배수가 x일때,
1차진입물량 + (1차진입 물량 * x) + (2차진입 물량 * x) ..... + (n-1)차 진입물량 * x 의 방식으로 최대 진입 시 포지션 크기가 결정 됩니다
##### 3. 진입 (Entries)
- 1차 진입은 진입 둔감도에 의해 결정됩니다. 1차 진입은 과매도 상황을 자동적으로 계산하여 결정되며, 둔감도를 높은 값으로 설정하면 더 큰 과매도 상황에서 1차 진입이 결정됩니다.
- 2차 이후의 진입은 생성된 그리드 간격에 의해 순차적으로 진입하게 됩니다.
- 그리드 간격은 최종 진입 간격 / (진입 횟수 - 1) 으로 등간격으로 이루어집니다.
##### 4. 청산 (Exits)
이 전략은 손절과 익절을 구분하지 않습니다. 평균 회귀를 하는 경우 진입한 모든 물량을 일시에 청산하며, 이 거래는 손실 거래일 수도, 이익 거래일 수도 있습니다. 일반적으로, 가격 회복이 빠르게 되는 경우 이익 거래로 마무리되고, 가격 회복이 느린 경우 손실 거래로 마무리되기 때문에, 장기적으로 종목의 '회복탄력성'이 전략의 성과에 영향을 줄 수 있습니다.
[Aegis]Original Turtle System for CryptoAs Richard Dennis once said, "Even if I published all the Turtle rules in the newspaper right now, no one would be able to 'execute' them," and 40 years later, even in modern financial markets (like the crypto market) where all the conditions have been disclosed, this strategy continues to deliver amazing performance. The following outlines the original Turtle rules as disclosed by Curtis Faith in his book *Way of the Turtle*, and a TradingView algorithm that translates these rules for application in the crypto market.
---
### **The Original Turtle Trading Rules**
#### **1. Markets**
* Trade in liquid futures markets.
#### **2. Position Sizing**
The volatility measure, **N**, is used as the basis for all calculations.
**True Range (TR) Calculation:** Select the largest of the following three values:
* Current High - Current Low
* $|\text{Current High} - \text{Previous Close}|$ (Absolute Value)
* $|\text{Current Low} - \text{Previous Close}|$ (Absolute Value)
**N (Average True Range, ATR) Calculation:**
$$N = \frac{(19 \times \text{PDN} + \text{TR})}{20}$$
* **PDN:** Previous Day's N value
* **TR:** Current True Range
This is similar to a 20-day Exponential Moving Average, and is sometimes calculated using a Simple Moving Average.
**Unit Size Calculation:**
$$\text{Unit Size (Number of Contracts)} = \frac{1\% \text{ of Account Equity}}{(\text{N} \times \text{Dollars per Point})}$$
* **Dollars per Point (Tick Value):** The value of a 1-point change in price.
#### **3. Entries**
* **Entry:** Buy when the 55-day high is broken to the upside, and sell when the 55-day low is broken to the downside.
#### **5. Stops**
* The stop-loss for every unit is set at a price **2N** unfavorable from the entry price.
* For each additional unit added, the stop price for the **entire position** is adjusted favorably by **1/2 N**.
* In other words, the stop price of the last unit entered becomes the stop price for the entire position.
#### **6. Exits**
The exit rule for profitable positions (before a stop is hit) is as follows:
* **Long Positions:** Exit when the 20-day low is broken to the downside.
* **Short Positions:** Exit when the 20-day high is broken to the upside.
*Note: This exit rule is followed only if the price has moved up by a value greater than or equal to the N value multiplied by the criterion for changing the take-profit line (the original Korean text mentions a condition based on N, which is commonly interpreted as requiring a profit before applying the channel exit).*
리처드 데니스가 앞서 "내가 지금 당장 터틀의 모든 규칙을 신문에 공표한다고 해도 아무도 '실행'하지 못할 것"라고 말했듯 40년이 흘러 모든 조건이 공개된 현대 금융시장(크립토 시장)에서도 여전히 이 전략은 놀라운 퍼포먼스를 기록하고 있습니다. 아래는 커티스 페이스가 자신의 저서 '터틀의 방식'에 공개한 오리지널 터틀 규칙과 이를 알고리즘으로 변환하여 크립토마켓에 적용한 트레이딩뷰 알고리즘 입니다.
##### 1. 시장 (Markets)
• 유동성이 풍부한 선물 시장에서 거래한다.
##### 2. 포지션 크기 (Position Sizing)
변동성 측정 단위인 N을 모든 계산의 기초로 사용한다.
**True Range (TR) 계산:** 다음 세 가지 값 중 가장 큰 값을 선택한다.
- • 현재 고가 - 현재 저가
- • |현재 고가 - 전일 종가| (절대값)
- • |현재 저가 - 전일 종가| (절대값)
**N (Average True Range, ATR) 계산:**
N = (19 × PDN + TR) / 20
- • PDN: 이전 날의 N 값
- • TR: 현재 True Range
이는 20일 지수이동평균과 유사하며, 단순이동평균으로 계산하기도 한다.
**1 유닛(Unit)의 크기 계산:**
유닛 크기 (계약 수) = 계좌 자산의 1% / (N × 틱 가치)
• 틱 가치(Dollars per Point): 1포인트 변동 시의 가치
##### 3. 진입 (Entries)
- • 진입: 55일 고가를 상향 돌파하면 매수, 55일 저가를 하향 돌파하면 매도한다.
##### 5. 손절 (Stops)
- • 모든 유닛에 대한 손절 기준은 진입 가격으로부터 2N 만큼 불리한 가격에 설정한다.
- • 유닛이 추가될 때마다 전체 포지션의 손절 가격을 1/2 N 만큼 유리한 방향으로 상향 조정한다.
- • 즉, 마지막으로 진입한 유닛의 손절 가격이 전체 포지션의 손절 가격이 된다.
##### 6. 청산 (Exits)
손절에 도달하기 전 수익 중인 포지션의 청산 규칙은 다음과 같다.
- • 매수 포지션: 20일 저가를 하향 돌파할 때 청산한다.
- • 매도 포지션: 20일 고가를 상향 돌파할 때 청산한다.
단, N값에 익절선 변경 기준을 곱한 값 이상으로 가격이 상승할 경우, 위 규칙을 따른다.
VIX Overnight Unch or Up AlertThis indicator alerts when VIX opens the day unchanged or higher on the day. If in fact VIX opens up unchanged or higher, it will display near the first bar of the day, previous day's close time and level and the opening time and level. The close time is typically 16:15 New York Time and the opening time is 09:30 or the first print a few minutes later. I use TVC:VIX instead of CBOT because TVC for me is real time. I also use the 1 minute chart and the script is coded as 1 minute.
Reversal Signal [aganac3]This indicator is an advanced reversal detection system designed to identify high-probability turning points in price action using RSI dynamics, EMA structure, ATR volatility, and volume-based confirmation.
The script automatically generates BUY/SELL signals, calculates target profit levels (TP1–TP3) and stop loss (SL) using ATR projections, and provides adaptive signal filtering based on market conditions and higher-timeframe trend bias.
It is built for traders who need a precise, all-in-one reversal detection and trade-management system for intraday and swing trading across any market (forex, gold, crypto, or stocks).
⚙️ Main Features
🔸 1. Smart Reversal Probability Engine
Calculates bullish/bearish probabilities (0–100%) using:
RSI deviation & slope
EMA bias (50 vs 200)
ATR volatility conditions
Candle structures (Engulfing, Pin Bar)
Demand/Supply zone proximity
Volume & momentum bursts
Adaptive weighting via sigmoid normalization for smooth probability transitions.
🔸 2. Multi-Timeframe Confirmation
Imports higher-timeframe (HTF) EMAs (default: 15-minute) for trend confirmation.
Suppresses false signals against dominant HTF direction:
Uptrend → fewer SELL signals
Downtrend → fewer BUY signals
🔸 3. Adaptive Sensitivity & Alert Modes
Sensitivity Options: Aggressive / Normal / Conservative
Controls reaction speed and signal frequency.
Alert Modes: Normal / Strict
Normal: at least 3 confirmations required
Strict: must confirm with pattern, volume, and candle bias
Alert threshold: customizable (default: 85%)
🔸 4. Demand & Supply Zone Logic
Automatically determines zone position based on recent price range.
BUY bias favored when price in demand zone (bottom 35%)
SELL bias favored when price in supply zone (top 35%)
🔸 5. Volatility & Volume Confirmation
Detects ATR spikes and volume surges for strong reversals.
Optional weighting for burst acceleration and pressure (momentum direction).
🔸 6. Target Projection (TP/SL System)
Auto-plots:
TP1, TP2, TP3 = ATR-based target levels
SL = ATR-based stop loss
Dashed lines with floating price labels, lines and labels auto-delete when hit (to maintain a clean chart).
Fully automated trade management visualization.
🔸 7. Signal Cooldown & Cleanup
Customizable cooldown (default 10 bars) to prevent over-signaling.
Automatic reset of TP/SL after trade conclusion (TP or SL hit).
🔸 8. Visuals & Alerts
BUY = 🔼 green triangle below bar
SELL = 🔽 red triangle above bar
Alerts available for:
“Bullish Reversal”
“Bearish Reversal”
Clean overlay design — ideal for dark or light chart themes.
🔸 9. Use Cases
XAU/USD (Gold): short-term scalping or intraday reversals
Crypto (BTC/ETH): H1–H4 swing setups
Stocks: Daily trend reversals
Indices: Multi-TF trend exhaustion tracking






















