SCTI - D14SCTI - D14 Comprehensive Technical Analysis Suite
English Description
SCTI D14 is an advanced multi-component technical analysis indicator designed for professional traders and analysts. This comprehensive suite combines multiple analytical tools into a single, powerful indicator that provides deep market insights across various timeframes and methodologies.
Core Components:
1. EMA System (Exponential Moving Averages)
13 customizable EMA lines with periods ranging from 8 to 2584
Fibonacci-based periods (8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584)
Color-coded visualization for easy trend identification
Individual toggle controls for each EMA line
2. TFMA (Multi-Timeframe Moving Averages)
Cross-timeframe analysis with 3 independent EMA calculations
Real-time labels showing trend direction and price relationships
Customizable timeframes for each moving average
Percentage deviation display from current price
3. PMA (Precision Moving Average Cloud)
7-layer moving average system with customizable periods
Fill areas between moving averages for trend visualization
Support and resistance zone identification
Dynamic color-coded trend clouds
4. VWAP (Volume Weighted Average Price)
Multiple anchor points (Session, Week, Month, Quarter, Year, Earnings, Dividends, Splits)
Standard deviation bands for volatility analysis
Automatic session detection and anchoring
Statistical price level identification
5. Advanced Divergence Detector
12 technical indicators for divergence analysis (MACD, RSI, Stochastic, CCI, Williams %R, Bias, Momentum, OBV, VW-MACD, CMF, MFI, External)
Regular and hidden divergences detection
Bullish and bearish signals with visual confirmation
Customizable sensitivity and filtering options
Real-time alerts for divergence formations
6. Volume Profile & Node Analysis
Comprehensive volume distribution analysis
Point of Control (POC) identification
Value Area High/Low (VAH/VAL) calculations
Volume peaks and troughs detection
Support and resistance levels based on volume
7. Smart Money Concepts
Market structure analysis with Break of Structure (BOS) and Change of Character (CHoCH)
Internal and swing structure detection
Equal highs and lows identification
Fair Value Gaps (FVG) detection and visualization
Liquidity zones and institutional flow analysis
8. Trading Sessions
9 major trading sessions (Asia, Sydney, Tokyo, Shanghai, Hong Kong, Europe, London, New York, NYSE)
Real-time session status and countdown timers
Session volume and performance tracking
Customizable session boxes and labels
Statistical session analysis table
Key Features:
Modular Design: Enable/disable any component independently
Real-time Analysis: Live updates with market data
Multi-timeframe Support: Works across all chart timeframes
Customizable Alerts: Set alerts for any detected pattern or signal
Professional Visualization: Clean, organized display with customizable colors
Performance Optimized: Efficient code for smooth chart performance
Use Cases:
Trend Analysis: Identify market direction using multiple EMA systems
Entry/Exit Points: Use divergences and structure breaks for timing
Risk Management: Utilize volume profiles and session analysis for better positioning
Multi-timeframe Analysis: Confirm signals across different timeframes
Institutional Analysis: Track smart money flows and market structure
Perfect For:
Day traders seeking comprehensive market analysis
Swing traders needing multi-timeframe confirmation
Professional analysts requiring detailed market structure insights
Algorithmic traders looking for systematic signal generation
---
中文描述
SCTI - D14是一个先进的多组件技术分析指标,专为专业交易者和分析师设计。这个综合套件将多种分析工具整合到一个强大的指标中,在各种时间框架和方法论中提供深度市场洞察。
核心组件:
1. EMA系统(指数移动平均线)
13条可定制EMA线,周期从8到2584
基于斐波那契的周期(8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584)
颜色编码可视化,便于趋势识别
每条EMA线的独立切换控制
2. TFMA(多时间框架移动平均线)
跨时间框架分析,包含3个独立的EMA计算
实时标签显示趋势方向和价格关系
每个移动平均线的可定制时间框架
显示与当前价格的百分比偏差
3. PMA(精密移动平均云)
7层移动平均系统,周期可定制
移动平均线间填充区域用于趋势可视化
支撑阻力区域识别
动态颜色编码趋势云
4. VWAP(成交量加权平均价格)
多个锚点(交易时段、周、月、季、年、财报、分红、拆股)
标准差带用于波动性分析
自动时段检测和锚定
统计价格水平识别
5. 高级背离检测器
12个技术指标用于背离分析(MACD、RSI、随机指标、CCI、威廉姆斯%R、Bias、动量、OBV、VW-MACD、CMF、MFI、外部指标)
常规和隐藏背离检测
看涨看跌信号配视觉确认
可定制敏感度和过滤选项
背离形成的实时警报
6. 成交量分布与节点分析
全面的成交量分布分析
控制点(POC)识别
价值区域高/低点(VAH/VAL)计算
成交量峰值和低谷检测
基于成交量的支撑阻力水平
7. 聪明钱概念
市场结构分析,包括结构突破(BOS)和结构转变(CHoCH)
内部和摆动结构检测
等高等低识别
公允价值缺口(FVG)检测和可视化
流动性区域和机构资金流分析
8. 交易时区
9个主要交易时段(亚洲、悉尼、东京、上海、香港、欧洲、伦敦、纽约、纽交所)
实时时段状态和倒计时器
时段成交量和表现跟踪
可定制时段框和标签
统计时段分析表格
主要特性:
模块化设计:可独立启用/禁用任何组件
实时分析:随市场数据实时更新
多时间框架支持:适用于所有图表时间框架
可定制警报:为任何检测到的模式或信号设置警报
专业可视化:清洁、有序的显示界面,颜色可定制
性能优化:高效代码确保图表流畅运行
使用场景:
趋势分析:使用多重EMA系统识别市场方向
入场/出场点:利用背离和结构突破进行时机选择
风险管理:利用成交量分布和时段分析进行更好定位
多时间框架分析:在不同时间框架间确认信号
机构分析:跟踪聪明钱流向和市场结构
适用于:
寻求全面市场分析的日内交易者
需要多时间框架确认的摆动交易者
需要详细市场结构洞察的专业分析师
寻求系统化信号生成的算法交易者
Kitaran
MACD-V MomentumThe MACD-V (Moving Average Convergence Divergence – Volatility Normalized) is an award-winning momentum indicator created by Alex Spiroglou, CFTe, DipTA (ATAA). It improves on the traditional MACD by normalizing momentum with volatility, solving several well-known limitations of classic indicators:
✅ Time stability – readings are consistent across history
✅ Cross-market comparability – works equally on stocks, crypto, forex, and commodities
✅ Objective momentum framework – universal thresholds at +150 / -150, +50 / -50
✅ Cleaner signals – reduces false signals in ranges and lag in high momentum
By dividing the MACD spread by ATR, the indicator expresses momentum in volatility units, allowing meaningful comparison across timeframes and markets.
MACD-V defines seven objective momentum states:
Risk (Oversold): below -150
Rebounding: -150 to +50 and above signal
Rallying: +50 to +150 and above signal
Risk (Overbought): above +150
Retracing: above -50 and below signal
Reversing: -150 to -50 and below signal
Ranging: between -50 and +50 for N bars
Optional background tints highlight the active regime (Bull above 200-MA, Bear below 200-MA).
Rare extremes (e.g., MACD-V < -100 in a bull regime) are tagged for additional context.
Use Cases
Identify and track momentum lifecycles across any market
Spot rare extremes for potential reversal opportunities
Filter out low-momentum whipsaws in ranging conditions
Compare momentum strength across multiple symbols
Support systematic and rule-based strategy development
Dominance Signal Apex [CHE]]Dominance Signal Apex — Triple-confirmed entry markers with stateful guardrails
Summary
This indicator focuses on entry timing by plotting markers only when three conditions align: a closed-bar Heikin-Ashi bias, a monotonic stack of super-smoother filters, and the current HMA slope. A compact state machine provides guardrails: it starts a directional state on closed-bar Heikin-Ashi bias, maintains it only while the smoother stack remains ordered, and renders a marker only if HMA slope agrees. This design aims for selective signals and reduces isolated prints during mixed conditions. Markers fade over time to visualize the age and persistence of the current state.
Motivation: Why this design?
Common triggers flip frequently in noise or react late when regimes shift. The core idea is to gate entry markers through a closed-bar state plus independent filter alignment. The state machine limits premature prints, removes markers when alignment breaks, and uses the HMA as a final directional gate. The result is fewer mixed-context entries and clearer clusters during sustained trends.
What’s different vs. standard approaches?
Reference baseline: Single moving-average slope or classic MA cross signals.
Architecture differences:
Multi-length two-pole super-smoother stack with strict ordering checks.
Closed-bar Heikin-Ashi bias to start a directional state.
HMA slope as a final gate for rendering markers.
Time-based alpha fade to surface state age.
Practical effect: Entry markers appear in clusters during aligned regimes and are suppressed when conditions diverge, improving selectivity.
How it works (technical)
Measurements: Four recursive super-smoother series on price at short to medium horizons. Up regime means each shorter smoother sits below the next longer one; down regime is the inverse.
State machine: On bar close, positive Heikin-Ashi bias starts a bull state and negative bias starts a bear state. The state terminates the moment the smoother ordering breaks relative to the prior bar.
Rendering gate: A marker prints only if the active state agrees with the current HMA slope. The HMA is plotted and colored by slope for context.
Normalization and clamping: Marker transparency transitions from a starting to an ending alpha across a fixed number of bars, clamped within the allowed range.
Initialization: Persistent variables track state and bar-count since state start; Heikin-Ashi open is seeded on the first valid bar.
HTF/security: None used. State updates are closed-bar, which reduces repaint paths.
Bands: Smoothed high, low, centerline, and offset bands are computed but not rendered.
Parameter Guide
Show Markers — Toggle rendering — Default: true — Hides markers without changing logic.
Bull Color / Bear Color — Visual colors — Defaults: bright green / red — Aesthetic only.
Start Alpha / End Alpha — Transparency range — Defaults: one hundred / fifty, within zero to one hundred — Controls initial visibility and fade endpoint.
Steps — Fade length in bars — Default: eight, minimum one — Longer values extend the visual memory of a state.
Smoother Length — Internal band smoothing — Default: twenty-one, minimum two — Affects computed bands only; not drawn.
Band Multiplier — Internal band offset — Default: one point zero — No impact on markers.
Source — Input for HMA — Default: close — Align with your workflow.
Length — HMA length — Default: fifty, minimum one — Larger values reduce flips; smaller values react faster.
Reading & Interpretation
Entry markers:
Bull marker (below bar): Closed-bar Heikin-Ashi bias is positive, smoother stack remains aligned for up regime, and HMA slope is rising.
Bear marker (above bar): Closed-bar Heikin-Ashi bias is negative, smoother stack remains aligned for down regime, and HMA slope is falling.
Fade: Transparency progresses over the configured steps, indicating how long the current state has persisted.
Practical Workflows & Combinations
Trend following: Focus on marker clusters aligned with HMA color. Add structure filters such as higher highs and higher lows or lower highs and lower lows to avoid counter-trend entries.
Exits/Stops: Consider exiting or reducing risk when smoother ordering breaks, when HMA color flips, or when marker cadence thins out.
Multi-asset/Multi-TF: Suitable for liquid crypto, FX, indices, and equities. On lower timeframes, shorten HMA length and fade steps for faster response.
Behavior, Constraints & Performance
Repaint/confirmation: State transitions and marker eligibility are decided on closed bars; live bars do not commit state changes until close.
security()/HTF: Not used.
Resources: Declared max bars back of one thousand five hundred; recursive filters and persistent states; no explicit loops.
Known limits: Some delay around sharp turns; brief states may start in noisy phases but are quickly revoked when alignment fails; HMA gating can miss very early reversals.
Sensible Defaults & Quick Tuning
Start here: Keep defaults.
Too many flips: Increase HMA length and raise fade steps.
Too sluggish: Decrease HMA length and reduce fade steps.
Markers too faint/bold: Adjust start and end alpha toward lower or higher opacity.
What this indicator is—and isn’t
A selective entry-marker layer that prints only under triple confirmation with stateful guardrails. It is not a full system, not predictive, and does not handle risk. Combine with market structure, risk controls, and position management.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Best regards and happy trading
Chervolino
Price Deviation StrategyThis strategy getting in long position only after the price drop
The % of the drop is Determined by SMA for the first trade
The inputs of SMA and % of the drop can be adjust from the User
After that bot start taking safe trades if not take profit from the first trade
The safe trades are Determined by step down deviation % and by quantity
There is no Stop loss is not for one with small tolerance to getting under
Take profit is average price + take profit - note if you use % trailing profit back test is not realistic but is working on real time
Max Safe Trades = 15
Capital max = $30000
Doge-USDT is just a example What the Strategy Can do
Green line - take profit
Black line - Brake even with fee - adjust for exchange
ATR Regime Study [CHE] ATR Regime Study — ATR percentile regimes with clear bands, table and live label
Summary
This study classifies volatility into five regimes by converting ATR into a percentile rank over a rolling window, plotted on a standardized scale between zero and one hundred. Colored bands mark regime thresholds, while a compact table and an optional label report the current percentile and regime. The standardized scale makes symbols and timeframes easier to compare than raw ATR values. Implemented in Pine v6 as a separate pane (overlay set to false), it is a context tool to adapt tactics and risk handling to the prevailing volatility environment.
Motivation: Why this design?
Raw ATR varies with price scale and asset characteristics, which makes regime comparison inconsistent and leads to poor transfer of settings across symbols and timeframes. The core idea is to transform ATR into a percentile rank within a user-defined lookback, then map it into discrete regimes. This yields a stable, interpretable context signal that shifts slower than raw ATR while still responding to genuine volatility changes.
What’s different vs. standard approaches?
Reference baseline: Traditional ATR plots or ATR bands using fixed multipliers.
Architecture differences:
Percentile ranking of ATR within a rolling window.
Five discrete regimes with fixed thresholds at ninety, seventy, thirty, and ten.
Visual fills between thresholds plus a live table and a last-bar label.
Practical effect: You read a single normalized line between zero and one hundred with consistent thresholds. This improves cross-asset comparison and makes regime shifts obvious at a glance.
How it works (technical)
The script computes ATR over a configurable length, then converts that series to a percentile rank over a configurable number of bars. The percentile is naturally scaled and limited between zero and one hundred. That value is mapped to one of five regimes: above ninety (Extreme), between seventy and ninety (Elevated), between thirty and seventy (Normal), between ten and thirty (Calm), and below ten (Squeeze). Horizontal guide lines mark the thresholds, and fills shade the regions. A table is created once and updated on each bar to show regime definitions and highlight the current row. An optional label on the last bar displays the current percentile and regime. No higher-timeframe requests are used, so repaint risk is limited to normal live-bar fluctuation until the bar closes.
Parameter Guide
ATR length — Effect: Controls how fast ATR reacts to new ranges. Default: fourteen. Trade-offs/Tips: Increase to reduce noise in choppy markets; decrease to react faster during regime changes.
Percentile window (bars) — Effect: Number of bars used for the percentile ranking. Default: two hundred fifty-two. Trade-offs/Tips: Larger windows stabilize the percentile but slow adaptation after structural regime shifts; smaller windows adapt faster but may flip more often.
Table › Show — Effect: Toggles the regime overview table. Default: enabled. Trade-offs/Tips: Disable on constrained layouts to reduce visual clutter.
Table › Position — Effect: Anchors the table in a chart corner. Default: Top Right. Trade-offs/Tips: Choose a corner that avoids overlapping other panels or drawings.
Label › Show — Effect: Toggles a last-bar label with current percentile and regime. Default: enabled. Trade-offs/Tips: Useful for quick reads; disable if it obscures other annotations.
Reading & Interpretation
The white line shows ATR percentile between zero and one hundred. Crossing above seventy signals an elevated volatility environment; above ninety indicates event-driven extremes. Between thirty and seventy represents typical conditions. Between ten and thirty indicates calm conditions that often suit mean reversion. Below ten reflects compression, where breakout probability often increases. The colored bands visually reinforce these ranges. The table summarizes regime definitions and highlights the current state. The last-bar label mirrors the current percentile and regime for quick inspection.
Practical Workflows & Combinations
Trend following: Prefer continuation tactics when the percentile holds in the Normal or Elevated bands and structure confirms higher highs and higher lows. Consider wider stops and partial position sizing as percentile rises.
Mean reversion: Favor fades in Calm regimes within defined ranges; use structure filters and time-of-day constraints to avoid low-liquidity whipsaws.
Breakout preparation: Track compressions below ten; plan entries only with structure confirmation and risk caps, since compressions can persist.
Multi-asset/Multi-TF: Defaults travel well on daily charts. For intraday, reduce the percentile window to align with session dynamics. Combine with trend or market structure tools for confirmation.
Behavior, Constraints & Performance
Repaint/confirmation: The percentile updates during live bars and stabilizes on close; closed bars do not repaint.
security/HTF: Not used. If you add higher-timeframe aggregation externally, account for standard repaint caveats.
Resources: Declared maximum bars back is two thousand; limits for lines and labels are five hundred each. A short loop updates the table rows; arrays are used for table content only.
Known limits: Regime boundaries are fixed; assets with persistent volatility shifts may require window retuning. Low-liquidity periods and gaps can produce abrupt percentile changes. ATR is direction-agnostic and should be paired with trend or structure context.
Sensible Defaults & Quick Tuning
Start with ATR length fourteen and percentile window two hundred fifty-two on daily charts.
Too many flips: Increase ATR length or increase the percentile window.
Too sluggish: Decrease the percentile window or reduce ATR length.
Intraday noise: Keep ATR length moderate and reduce the window to a session-appropriate size; optionally hide the label to declutter.
Compressed markets: Maintain defaults but rely more on structure and volume filters before acting.
What this indicator is—and isn’t
This is a volatility regime context layer that standardizes ATR into interpretable regimes. It is not a complete trading system, not predictive, and not a stand-alone entry signal. Use it alongside structure analysis, confirmation tools, and disciplined risk management.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Best regards and happy trading
Chervolino
4 Stages of StockThis script uses 40Weekly MA to baseline larges trends in the stock. This is based on Puru's idea of 4 Stage of Stock.
Stage 1 (Basing)
Stage 2 (Advancing)
Stage 3 (Topping)
Stage 4 (Declining)
This is best viewed and understood on weekly charts.
M Killzones[by vetrivel]Cool free style Session indicator, Inspired by TJR trader session times and it's easily changeable. Really this session times changes everything. Basic requirement to use this Discipline and Mindset
SuperScript Filtered (Stable)🔎 What This Indicator Does
The indicator is a trend and momentum filter.
It looks at multiple well-known technical tools (T3 moving averages, RSI, TSI, and EMA trend) and assigns a score to the current market condition.
• If most tools are bullish → score goes up.
• If most tools are bearish → score goes down.
• Only when the score is very strong (above +75 or below -75), it prints a Buy or Sell signal.
This helps traders focus only on high-probability setups instead of reacting to every small wiggle in price.
________________________________________
⚙️ How It Works
1. T3 Trend Check
o Compares a fast and slow T3 moving average.
o If the fast T3 is above the slow T3 → bullish signal.
o If it’s below → bearish signal.
2. RSI Check
o Uses the Relative Strength Index.
o If RSI is above 50 → bullish momentum.
o If RSI is below 50 → bearish momentum.
3. TSI Check
o Uses the True Strength Index.
o If TSI is above its signal line → bullish momentum.
o If TSI is below → bearish momentum.
4. EMA Trend Check
o Looks at two exponential moving averages (fast and slow).
o If price is above both → bullish.
o If price is below both → bearish.
5. Score System
o Each condition contributes +25 (bullish) or -25 (bearish).
o The total score can range from -100 to +100.
o Score ≥ +75 → Strong Buy
o Score ≤ -75 → Strong Sell
6. Signal Filtering
o Only one buy is allowed until a sell appears (and vice versa).
o A minimum bar gap is enforced between signals to avoid clutter.
________________________________________
📊 How It Appears on the Chart
• Green “BUY” label below candles → when multiple signals agree and the market is strongly bullish.
• Red “SELL” label above candles → when multiple signals agree and the market is strongly bearish.
• Background softly shaded green or red → highlights bullish or bearish conditions.
No messy tables, no clutter — just clear trend-based entries.
________________________________________
🎯 How Traders Can Use It
This indicator is designed to help traders by:
1. Filtering Noise
o Instead of reacting to every small crossover or RSI blip, it waits until at least 3–4 conditions agree.
o This avoids entering weak trades.
2. Identifying Strong Trend Shifts
o When a Buy or Sell arrow appears, it usually signals a shift in momentum that can lead to a larger move.
3. Reducing Overtrading
o By limiting signals, traders won’t be tempted to jump in and out unnecessarily.
4. Trade Confirmation
o Traders can use the signals as confirmation for their own setups.
o Example: If your strategy says “go long” and the indicator also shows a strong Buy, that trade has more conviction.
5. Alert Automation
o Built-in alerts mean you don’t have to watch the chart all day.
o You’ll be notified only when a strong signal appears.
________________________________________
⚡ When It Helps the Most
• Works best in trending markets (bullish or bearish).
• Very useful on higher timeframes (1h, 4h, daily) for swing trading.
• Can also work on lower timeframes (5m, 15m) if combined with higher timeframe trend filtering.
________________________________________
👉 In short
This indicator is a signal filter + trend detector. It combines four powerful tools into one scoring system, and only tells you to act when the odds are stacked in your favor.
________________________________________
Peak Support/Resistance Lines v1//@version=6
indicator("Peak Support/Resistance Lines", shorttitle="Peak S/R", overlay=true, max_lines_count=500)
// Input parameters
lookback = input.int(5, title="Lookback Period", minval=1, maxval=50)
show_resistance = input.bool(true, title="Show Resistance Lines")
show_support = input.bool(true, title="Show Support Lines")
resistance_color = input.color(color.red, title="Resistance Color")
support_color = input.color(color.green, title="Support Color")
// Function to check if current bar is a peak
is_peak() =>
ta.pivothigh(high, lookback, lookback)
// Function to check if current bar is a valley
is_valley() =>
ta.pivotlow(low, lookback, lookback)
// Main logic
if barstate.isconfirmed
// Check for resistance peaks
if show_resistance
peak_price = is_peak()
if not na(peak_price)
line.new(x1=bar_index - lookback, y1=peak_price, x2=bar_index + 50, y2=peak_price, color=resistance_color, width=1)
// Check for support valleys
if show_support
valley_price = is_valley()
if not na(valley_price)
line.new(x1=bar_index - lookback, y1=valley_price, x2=bar_index + 50, y2=valley_price, color=support_color, width=1)
EMA Crossover Strategy (15m)50 and 200 ema crossing when leaving anchor. when 50 and 200 crosses will give you direction of where market is going. wait for a pull back and take trade. sl on highest or lowest point of apex tp open . when you see multiple equal ( low or High) get put of trade.
Debt Refinance Cycle + Liquidity vs BTC (Wk) — Overlay Part 1Debt Refi Cycle - Overlay script (BTC + Liquidity + DRCI/Z normalized to BTC range)
ARGT Possible entry and exit points:This is just an observation, and not any type of financial advice.
]To identify key entry and exit points. In addition, this is based on YTD and yearly charts. This is a work in progress.
Index Day Ranges (Selectable - Universal Live Update)it helps to show the days range so we can take decision accordingly
LDR 2025 — DayTHIS IS NOT AN INDICATOR!
It's a loving gentle reminder for traders to keep an eye if this LDR day might impact your trading.
Уровни SL/TP и значение ATR первого часаSession Range SL/TP Levels with Advanced ATR
Overview
The Session Range SL/TP Levels indicator is a comprehensive tool designed for session-based trading strategies, particularly for breakouts. It identifies the high and low of a user-defined time range (e.g., the Asian session) and uses a sophisticated, customizable Average True Range (ATR) calculation to project key Stop Loss (SL) and Take Profit (TP) levels.
This indicator helps traders visualize potential entry and exit points based on the volatility of a specific trading session, with all crucial data presented in a clean on-screen table.
Key Features
Customizable Trading Session: Define any time range to establish your core trading zone. The indicator will automatically find the high and low of this period.
Advanced ATR Calculation: The indicator uses an ATR calculated on a 5-minute timeframe for higher precision. You can customize:
The ATR length and smoothing method (RMA, SMA, EMA, WMA).
A unique percentage reduction from the ATR to create a more conservative volatility buffer.
Volatility-Based SL/TP Levels: Automatically calculates and plots multiple SL and TP levels for both long and short scenarios based on user-defined multipliers of the modified ATR.
Comprehensive On-Screen Display: A detailed on-screen table provides all critical data at a glance, including:
The original 5-min ATR value.
The modified ATR after the percentage reduction.
Three custom ATR-multiple values for quick reference.
All calculated SL and TP price levels for both Long and Short setups.
Copy-Friendly Data Logging: With a single click in the settings, you can print all calculated values into the Pine Logs panel, allowing for easy copying and pasting into other applications or trading journals.
How to Use
Define Your Session: In the settings, enter the time for the trading session you want to analyze (e.g., "0200-0300" for a part of the Asian session).
Identify the Range: The indicator will draw the high and low of this session once the time period is complete.
Plan Your Trade: The calculated levels provide potential targets for breakout trades.
For a Long Trade: If the price breaks above the session high, the green Take Profit lines (TP1, TP2, TP3) serve as potential exit points, while the Stop Loss (Long) level serves as a volatility-based stop.
For a Short Trade: If the price breaks below the session low, the red Take Profit lines serve as potential targets, with the Stop Loss (Short) level as the corresponding stop.
Reference the Table: Use the on-screen table to see the exact price levels and ATR values without needing to hover over the lines.
Breaout and followthroughThis indicator is designed to identify and highlight a single, powerful entry signal at the beginning of a new trend. It filters for high-volatility breakout bars that show strong directional conviction, helping traders catch the initial momentum of a potential move. It will only paint one bullish or bearish signal after a trend change is detected, preventing repeat signals during a sustained move.
Core Concept
The indicator combines four key concepts to generate high-probability signals:
Trend Direction: It first establishes the overall trend (bullish or bearish) using a configurable Exponential or Simple Moving Average (EMA/SMA).
Volatility Expansion: It looks for bars with a larger-than-average range by comparing the bar's size to the Average True Range (ATR). This helps identify moments of increased market interest.
Closing Strength (IBS): It uses the Internal Bar Strength (IBS) to measure directional conviction. A high IBS (closing near the top) suggests bullish strength, while a low IBS (closing near the bottom) suggests bearish pressure.
Breakout Confirmation: As an optional but powerful filter, it can confirm the signal by ensuring the bar is breaking above the high or below the low of a user-defined number of previous bars.
A signal is only generated on the first bar that meets all these criteria after the price crosses the trend-defining moving average, making it ideal for capturing the start of a new swing.
Features
Bullish Signals (Green): Highlights the first bar in an uptrend that is larger than the ATR, closes with a high IBS (>70), and optionally breaks out above the recent highs.
Bearish Signals (Red): Highlights the first bar in a downtrend that is larger than the ATR, closes with a low IBS (<30), and optionally breaks out below the recent lows.
"First Signal Only" Logic: The script is hard-coded to show only the initial signal in a new trend, filtering out noise and redundant signals.
Fully Customizable Trend Filter:
Choose between EMA or SMA for trend definition.
Set the MA length (default is a short-term 7-period MA).
Option to show or hide the moving average on the chart.
Optional Breakout Filter:
Enable or disable the requirement for the signal bar to break the high/low of previous bars.
Customize the lookback period for the breakout confirmation.
How to Use
This indicator can be used as a primary signal for a trend-following or momentum-based trading system.
Look for a Green Bar (Bullish Signal): This suggests the start of a potential uptrend. Consider it a signal for a long entry. A logical stop-loss could be placed below the low of the highlighted signal bar.
Look for a Red Bar (Bearish Signal): This suggests the start of a potential downtrend. Consider it a signal for a short entry. A logical stop-loss could be placed above the high of the highlighted signal bar.
Adjust Settings: Use the settings menu to configure the indicator to your preferred market and timeframe. A longer Trend MA Length will result in fewer, more long-term signals, while a shorter length will be more responsive.
As with any tool, this indicator is best used in conjunction with other forms of analysis, such as market structure, support/resistance levels, and proper risk management.
Jasons Bullish Reversal DetectorThis bullish reversal detector is designed to spot higher-quality turning points instead of shallow bounces. At its core, it looks for candles closing above the 20-period SMA, a MACD bullish crossover, and RSI strength above 50. On top of that, it layers in “depth” filters: price must reclaim and retest a long-term baseline (like the 200-period VWMA), momentum should confirm with RSI and +DI leading, short-term EMAs need to slope upward, and conditions like overheated ATR or strong downside ADX will block false signals. When all of these align, the script flags a depth-confirmed bullish reversal, aiming to highlight spots where structure, momentum, and volatility all support a sustainable shift upward.
Trend Speed Analyzer + alerts//@version=6
indicator('Trend Speed Analyzer + alerts', overlay = false)
//~~}
// ~~ Tooltips {
string t1 = 'Maximum Length: This parameter sets the upper limit for the number of bars considered in the dynamic moving average. A higher value smooths out the trend line, making it less reactive to minor fluctuations but slower to adapt to sudden price movements. Use higher values for long-term trend analysis and lower values for faster-moving markets.'
string t2 = 'Accelerator Multiplier: Adjusts the responsiveness of the dynamic moving average to price changes. A larger value makes the trend more reactive but can introduce noise in choppy markets. Lower values create a smoother trend but may lag behind rapid price movements. This is particularly useful in volatile markets where precise sensitivity is needed.'
string t5 = 'Enable Candles: When enabled, the candlesticks on the chart will be color-coded based on the calculated trend speed. This provides a visual representation of momentum, making it easier to spot shifts in market dynamics. Disable this if you prefer the standard candlestick colors.'
string t6 = 'Collection Period: Defines the number of bars used to normalize trend speed values. A higher value includes a broader historical range, smoothing out the speed calculation. Lower values make the speed analysis more sensitive to recent price changes, ideal for short-term trading.'
string t7 = 'Enable Table: Activates a statistical table that provides an overview of key metrics, such as average wave height, maximum wave height, dominance, and wave ratios. Useful for traders who want numerical insights to complement visual trend analysis.'
string t8 = 'Lookback Period: Determines how many historical bars are used for calculating bullish and bearish wave data. A longer lookback period provides a more comprehensive view of market trends but may dilute sensitivity to recent market conditions. Shorter periods focus on recent data.'
string t9 = 'Start Date: Sets the starting point for all calculations. This allows you to analyze data only from a specific date onward, which is useful for isolating trends within a certain period or avoiding historical noise.'
string t10 = 'Timer Option: Select between using a custom start date or starting from the first available bar on the chart. The \'Custom\' option works with the Start Date setting, while \'From start\' includes all available data.'
// Tooltips for Table Cells
string tt1 = 'Average Wave: Shows the average size of bullish or bearish waves during the lookback period. Use this to assess overall market strength. Larger values indicate stronger trends, and comparing bullish vs bearish averages can reveal market bias. For instance, a higher bullish average suggests a stronger uptrend.'
string tt2 = 'Max Wave: Displays the largest bullish or bearish wave during the lookback period. Use this to identify peak market momentum. A significantly higher bullish or bearish max wave indicates where the market may have shown extreme trend strength in that direction.'
string tt3 = 'Current Wave Ratio (Average): Compares the current wave\'s size to the average wave size for both bullish and bearish trends. A value above 1 indicates the current wave is stronger than the historical average, which may signal increased market momentum. Use this to evaluate if the current move is significant compared to past trends.'
string tt4 = 'Current Wave Ratio (Max): Compares the current wave\'s size to the maximum wave size for both bullish and bearish trends. A value above 1 suggests the current wave is setting new highs in strength, which could indicate a breakout or strong momentum in the trend direction.'
string tt5 = 'Dominance (Average): The net difference between the average bullish and bearish wave sizes. Positive values suggest bullish dominance over time, while negative values indicate bearish dominance. Use this to determine which side (bulls or bears) has had consistent control of the market over the lookback period.'
string tt6 = 'Dominance (Max): The net difference between the largest bullish and bearish wave sizes. Positive values suggest bulls have dominated with stronger individual waves, while negative values indicate bears have produced stronger waves. Use this to gauge the most significant power shifts in the market.'
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
max_length = input.int(50, minval = 1, title = 'Maximum Length', group = 'Dynamic Moving Average', tooltip = t1)
accel_multiplier = input.float(5.0, minval = 0.0, step = 1.1, title = 'Accelerator Multiplier', group = 'Dynamic Moving Average', tooltip = t2)
tbl_ = input.bool(true, title = 'Enable Table', group = 'Wave Analysis', tooltip = t7)
lookback_period = input.int(100, minval = 1, step = 1, title = 'Lookback Period', group = 'Wave Analysis', tooltip = t8)
candle = input.bool(true, title = 'Enable Candles', group = 'Trend Visualization', tooltip = t5)
collen = input.int(100, step = 10, minval = 5, title = 'Collection Period', group = 'Trend Visualization', tooltip = t6)
up_col = input.color(color.lime, title = 'Dynamic Trend', group = 'Trend Visualization', inline = 'Trend')
dn_col = input.color(color.red, title = '', group = 'Trend Visualization', inline = 'Trend')
up_hist_col = input.color(#82ffc3, title = 'Trend Speed Up', group = 'Trend Visualization', inline = 'up')
up_hist_col_ = input.color(color.lime, title = '', group = 'Trend Visualization', inline = 'up')
dn_hist_col = input.color(color.red, title = 'Trend Speed Dn', group = 'Trend Visualization', inline = 'dn')
dn_hist_col_ = input.color(#f78c8c, title = '', group = 'Trend Visualization', inline = 'dn')
start = input.time(timestamp('1 Jan 2020 00:00 +0000'), title = 'Start Date', group = 'Time Settings', tooltip = t9, inline = 'startdate')
timer = input.string('From start', title = 'Timer Option', options = , group = 'Time Settings', tooltip = t10, inline = 'startdate')
// ~~ Dynamic Average {
counts_diff = close
max_abs_counts_diff = ta.highest(math.abs(counts_diff), 200)
counts_diff_norm = (counts_diff + max_abs_counts_diff) / (2 * max_abs_counts_diff)
dyn_length = 5 + counts_diff_norm * (max_length - 5)
// ~~ Function to compute the accelerator factor with normalization of delta_counts_diff {
calc_accel_factor(float counts_diff, float prev_counts_diff) =>
delta_counts_diff = math.abs(counts_diff - prev_counts_diff)
float max_delta_counts_diff = ta.highest(delta_counts_diff, 200)
max_delta_counts_diff := max_delta_counts_diff == 0 ? 1 : max_delta_counts_diff
float accel_factor = delta_counts_diff / max_delta_counts_diff
accel_factor
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Function to adjust alpha using the accelerator factor {
adjust_alpha(float dyn_length, float accel_factor, float accel_multiplier) =>
alpha_base = 2 / (dyn_length + 1)
alpha = alpha_base * (1 + accel_factor * accel_multiplier)
alpha := math.min(1, alpha)
alpha
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Accelerator Factor
accel_factor = calc_accel_factor(counts_diff, nz(counts_diff ))
alpha = adjust_alpha(dyn_length, accel_factor, accel_multiplier)
// ~~ Compute dynamic Ema
var float dyn_ema = na
dyn_ema := na(dyn_ema ) ? close : alpha * close + (1 - alpha) * dyn_ema
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Trend Speed {
trend = dyn_ema
bullsrc = close
bearsrc = close
type TrendData
array change
array t
StartTime() =>
time > start
var bullish = TrendData.new(array.new(), array.new())
var bearish = TrendData.new(array.new(), array.new())
var x1 = int(na)
var y1 = float(na)
var pos = 0
var speed = 0.0
c = ta.rma(close, 10)
o = ta.rma(open, 10)
// ~~ First value {
if na(x1) and StartTime() or na(x1) and timer == 'From start'
x1 := bar_index
y1 := o
y1
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Trend direction {
if StartTime() or timer == 'From start'
if bullsrc > trend and bullsrc <= trend
bearish.change.unshift(ta.lowest(speed, bar_index - x1))
bearish.t.unshift(bar_index - x1)
x1 := bar_index
y1 := bullsrc
pos := 1
speed := c - o
speed
if bearsrc < trend and bearsrc >= trend
bullish.change.unshift(ta.highest(speed, bar_index - x1))
bullish.t.unshift(bar_index - x1)
x1 := bar_index
y1 := bearsrc
pos := -1
speed := c - o
speed
speed := speed + c - o
speedGradient = color.from_gradient(speed, ta.min(-speed / 3), ta.max(speed / 3), color.red, color.lime)
trendspeed = ta.hma(speed, 5)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Plots {
rma_dyn_ema(x, p) =>
average = ta.rma(dyn_ema , p)
average
colour = ta.wma(close, 2) > dyn_ema ? up_col : dn_col
fillColor = rma_dyn_ema(0, 5) > rma_dyn_ema(1, 5) ? color.new(up_col, 70) : color.new(dn_col, 70)
p1 = plot(dyn_ema, color = colour, linewidth = 2, title = 'Dynamic Trend', force_overlay = true)
p2 = plot(ta.rma(hl2, 50), display = display.none, editable = false, force_overlay = true)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
min_speed = ta.lowest(speed, collen)
max_speed = ta.highest(speed, collen)
normalized_speed = (speed - min_speed) / (max_speed - min_speed)
speedGradient1 = speed < 0 ? color.from_gradient(normalized_speed, 0.0, 0.5, dn_hist_col, dn_hist_col_) : color.from_gradient(normalized_speed, 0.5, 1.0, up_hist_col, up_hist_col_)
plot(StartTime() or timer == 'From start' ? trendspeed : na, title = 'Trend Speed', color = speedGradient1, style = plot.style_columns)
plotcandle(open, high, low, close, color = candle ? speedGradient1 : na, wickcolor = candle ? speedGradient1 : na, bordercolor = candle ? speedGradient1 : na, force_overlay = true)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Table {
if barstate.islast and tbl_
bullish_recent = bullish.change.slice(0, math.min(lookback_period, bullish.change.size()))
bearish_recent = bearish.change.slice(0, math.min(lookback_period, bearish.change.size()))
bull_max = bullish_recent.max()
bear_max = bearish_recent.min()
bull_avg = bullish_recent.avg()
bear_avg = bearish_recent.avg()
wave_size_ratio_avg = bull_avg / math.abs(bear_avg)
wave_size_text_avg = str.tostring(math.round(wave_size_ratio_avg, 2)) + 'x'
wave_size_color_avg = wave_size_ratio_avg > 0 ? color.lime : color.red
wave_size_ratio_max = bull_max / math.abs(bear_max)
wave_size_text_max = str.tostring(math.round(wave_size_ratio_max, 2)) + 'x'
wave_size_color_max = wave_size_ratio_max > 0 ? color.lime : color.red
dominance_avg_value = bull_avg - math.abs(bear_avg)
dominance_avg_text = dominance_avg_value > 0 ? 'Bullish +' + str.tostring(math.round(wave_size_ratio_avg, 2)) + 'x' : 'Bearish -' + str.tostring(math.round(1 / wave_size_ratio_avg, 2)) + 'x'
dominance_avg_color = dominance_avg_value > 0 ? color.lime : color.red
dominance_max_value = bull_max - math.abs(bear_max)
dominance_max_text = dominance_max_value > 0 ? 'Bullish +' + str.tostring(math.round(wave_size_ratio_max, 2)) + 'x' : 'Bearish -' + str.tostring(math.round(1 / wave_size_ratio_max, 2)) + 'x'
dominance_max_color = dominance_max_value > 0 ? color.lime : color.red
current_wave = speed
current_wave_color = current_wave > 0 ? color.lime : color.red
current_ratio_avg = current_wave > 0 ? current_wave / bull_avg : current_wave / math.abs(bear_avg)
current_ratio_max = current_wave > 0 ? current_wave / bull_max : current_wave / math.abs(bear_max)
current_text_avg = str.tostring(math.round(current_ratio_avg, 2)) + 'x'
current_text_max = str.tostring(math.round(current_ratio_max, 2)) + 'x'
current_color_avg = current_ratio_avg > 0 ? color.lime : color.red
current_color_max = current_ratio_max > 0 ? color.lime : color.red
var tbl = table.new(position.top_right, 3, 3, force_overlay = true)
table.cell(tbl, 0, 0, '', text_color = chart.fg_color, tooltip = '')
table.cell(tbl, 0, 1, 'Average Wave', text_color = chart.fg_color, tooltip = tt1)
table.cell(tbl, 0, 2, 'Max Wave', text_color = chart.fg_color, tooltip = tt2)
table.cell(tbl, 1, 0, 'Current Wave Ratio', text_color = chart.fg_color, tooltip = '')
table.cell(tbl, 1, 1, current_text_avg, text_color = current_color_avg, tooltip = tt3)
table.cell(tbl, 1, 2, current_text_max, text_color = current_color_max, tooltip = tt4)
table.cell(tbl, 2, 0, 'Dominance', text_color = chart.fg_color, tooltip = '')
table.cell(tbl, 2, 1, dominance_avg_text, text_color = dominance_avg_color, tooltip = tt5)
table.cell(tbl, 2, 2, dominance_max_text, text_color = dominance_max_color, tooltip = tt6)
// ─────────────────────────────────────────────────────────────
// MTF BUY/SELL alerts: 10m & 1H agreement (no logic changes)
isGreen = ta.wma(close, 2) > dyn_ema
tf_fast = input.timeframe("10", "Fast TF (Buy/Sell check)", group = "MTF Alerts")
tf_slow = input.timeframe("60", "Slow TF (Buy/Sell check)", group = "MTF Alerts")
confirm_on_close = input.bool(true, "Confirm on bar close", group = "MTF Alerts")
green_fast = request.security(syminfo.tickerid, tf_fast, isGreen, lookahead = barmerge.lookahead_off)
green_slow = request.security(syminfo.tickerid, tf_slow, isGreen, lookahead = barmerge.lookahead_off)
buyCond = green_fast and green_slow
sellCond = not green_fast and not green_slow
triggerOK = confirm_on_close ? barstate.isconfirmed : true
// Single BUY / SELL alerts (messages unchanged)
alertcondition(buyCond and triggerOK, title = "MTF BUY (10m & 1H GREEN)", message = "{{ticker}} | TF={{interval}} | Dynamic line")
alertcondition(sellCond and triggerOK, title = "MTF SELL (10m & 1H RED)", message = "{{ticker}} | TF={{interval}} | Dynamic line")
// ─────────────────────────────────────────────────────────────
// NEW: 10m status repeated EVERY MINUTE (no logic changes)
// ─────────────────────────────────────────────────────────────
// 1-minute pulse: true once per closed 1m bar
m1_pulse = request.security(syminfo.tickerid, "1", barstate.isconfirmed, lookahead = barmerge.lookahead_off)
// Repeat ONLY the 10-minute status every minute
status10_green = green_fast
status10_red = not green_fast
alertcondition(status10_green and m1_pulse, title = "10m Status GREEN — repeat each minute", message = "{{ticker}} | TF=10 | Dynamic line — GREEN")
alertcondition(status10_red and m1_pulse, title = "10m Status RED — repeat each minute", message = "{{ticker}} | TF=10 | Dynamic line — RED")
how do the trend speed anlaysis work
By Gadirov Hyper-Aggressive Multi-Timeframe Binary SignalsBy Gadirov Hyper-Aggressive Multi-Timeframe Binary Signals
Today's Unbroken Support/Resistance grok 1 //@version=6
indicator("Today's Unbroken Support/Resistance", shorttitle="Today S/R", overlay=true, max_lines_count=500)
// Input parameters
lookback = input.int(5, title="Lookback Period", minval=1, maxval=50)
show_resistance = input.bool(true, title="Show Resistance Lines")
show_support = input.bool(true, title="Show Support Lines")
resistance_color = input.color(color.red, title="Resistance Color")
support_color = input.color(color.green, title="Support Color")
line_width = input.int(2, title="Line Width", minval=1, maxval=4)
// Get current date for today's filter
current_date = dayofmonth(time)
current_month = month(time)
// Variables to track lines and their status
var line resistance_lines = array.new()
var line support_lines = array.new()
var float resistance_levels = array.new()
var float support_levels = array.new()
var int resistance_dates = array.new()
var int support_dates = array.new()
// Function to check if current bar is a peak
is_peak() =>
ta.pivothigh(high, lookback, lookback)
// Function to check if current bar is a valley
is_valley() =>
ta.pivotlow(low, lookback, lookback)
// Function to check if a resistance level is broken
is_resistance_broken(level) =>
close > level
// Function to check if a support level is broken
is_support_broken(level) =>
close < level
// Function to remove broken lines
remove_broken_levels() =>
// Check resistance levels
if array.size(resistance_levels) > 0
for i = array.size(resistance_levels) - 1 to 0
level = array.get(resistance_levels, i)
if is_resistance_broken(level)
// Remove broken resistance
line_to_delete = array.get(resistance_lines, i)
line.delete(line_to_delete)
array.remove(resistance_lines, i)
array.remove(resistance_levels, i)
array.remove(resistance_dates, i)
// Check support levels
if array.size(support_levels) > 0
for i = array.size(support_levels) - 1 to 0
level = array.get(support_levels, i)
if is_support_broken(level)
// Remove broken support
line_to_delete = array.get(support_lines, i)
line.delete(line_to_delete)
array.remove(support_lines, i)
array.remove(support_levels, i)
array.remove(support_dates, i)
// Function to remove previous days' lines
remove_old_levels() =>
// Remove old resistance levels
if array.size(resistance_levels) > 0
for i = array.size(resistance_levels) - 1 to 0
line_date = array.get(resistance_dates, i)
if line_date != current_date
// Remove old resistance
line_to_delete = array.get(resistance_lines, i)
line.delete(line_to_delete)
array.remove(resistance_lines, i)
array.remove(resistance_levels, i)
array.remove(resistance_dates, i)
// Remove old support levels
if array.size(support_levels) > 0
for i = array.size(support_levels) - 1 to 0
line_date = array.get(support_dates, i)
if line_date != current_date
// Remove old support
line_to_delete = array.get(support_lines, i)
line.delete(line_to_delete)
array.remove(support_lines, i)
array.remove(support_levels, i)
array.remove(support_dates, i)
// Main logic
remove_old_levels()
remove_broken_levels()
// Check for new resistance peaks
if show_resistance
peak_price = is_peak()
if not na(peak_price)
// Check if this level already exists (avoid duplicates)
level_exists = false
if array.size(resistance_levels) > 0
for i = 0 to array.size(resistance_levels) - 1
existing_level = array.get(resistance_levels, i)
if math.abs(peak_price - existing_level) < (peak_price * 0.001) // Within 0.1%
level_exists := true
break
if not level_exists
// Create new resistance line extending to infinity
new_line = line.new(x1=bar_index - lookback, y1=peak_price, x2=bar_index - lookback, y2=peak_price, color=resistance_color, width=line_width, extend=extend.right)
array.push(resistance_lines, new_line)
array.push(resistance_levels, peak_price)
array.push(resistance_dates, current_date)
// Check for new support valleys
if show_support
valley_price = is_valley()
if not na(valley_price)
// Check if this level already exists (avoid duplicates)
level_exists = false
if array.size(support_levels) > 0
for i = 0 to array.size(support_levels) - 1
existing_level = array.get(support_levels, i)
if math.abs(valley_price - existing_level) < (valley_price * 0.001) // Within 0.1%
level_exists := true
break
if not level_exists
// Create new support line extending to infinity
new_line = line.new(x1=bar_index - lookback, y1=valley_price, x2=bar_index - lookback, y2=valley_price, color=support_color, width=line_width, extend=extend.right)
array.push(support_lines, new_line)
array.push(support_levels, valley_price)
array.push(support_dates, current_date)
// Clean up old lines if too many (keep last 50 of each type)
if array.size(resistance_lines) > 50
old_line = array.shift(resistance_lines)
line.delete(old_line)
array.shift(resistance_levels)
array.shift(resistance_dates)
if array.size(support_lines) > 50
old_line = array.shift(support_lines)
line.delete(old_line)
array.shift(support_levels)
array.shift(support_dates)
// Optional: Plot small markers for today's new levels
today_resistance = show_resistance and not na(is_peak()) and dayofmonth(time ) == current_date
today_support = show_support and not na(is_valley()) and dayofmonth(time ) == current_date
plotshape(today_resistance, title="Today's Resistance", location=location.abovebar, color=resistance_color, style=shape.triangledown, size=size.tiny)
plotshape(today_support, title="Today's Support", location=location.belowbar, color=support_color, style=shape.triangleup, size=size.tiny)
Optimised Hybrid BO Strategy for binary 5 minuteOptimised Hybrid BO Strategy for binary 3 minute and more
By Gadirov Ultra-Aggressive MTF BO Signals for binaryBy Gadirov Ultra-Aggressive MTF BO Signals for binary
Opening Range BoxThis indicator, called the "Opening Range Box," is a visual tool that helps you track the start of key trading sessions like London and New York.
It does three main things:
Finds the Daily 'First Move': It automatically calculates the High and Low reached during the first 30 minutes (or whatever time you set) of each defined session.
Draws a Box: It immediately draws a colored, transparent box on your chart from the moment the session starts. This box acts as a clear reference for the session's initial boundaries.
Extends the Levels: After the initial 30 minutes are over, the box stops growing vertically (it locks in the OR High/Low) but continues to stretch out horizontally for the rest of the trading session. This allows you to easily see how the price reacts to the opening levels throughout the day.
In short: It visually highlights the most important price levels established at the very beginning of the major market sessions.