BOCS AdaptiveBOCS Adaptive Strategy - Automated Volatility Breakout System
WHAT THIS STRATEGY DOES:
This is an automated trading strategy that detects consolidation patterns through volatility analysis and executes trades when price breaks out of these channels. Take-profit and stop-loss levels are calculated dynamically using Average True Range (ATR) to adapt to current market volatility. The strategy closes positions partially at the first profit target and exits the remainder at the second target or stop loss.
TECHNICAL METHODOLOGY:
Price Normalization Process:
The strategy begins by normalizing price to create a consistent measurement scale. It calculates the highest high and lowest low over a user-defined lookback period (default 100 bars). The current close price is then normalized using the formula: (close - lowest_low) / (highest_high - lowest_low). This produces values between 0 and 1, allowing volatility analysis to work consistently across different instruments and price levels.
Volatility Detection:
A 14-period standard deviation is applied to the normalized price series. Standard deviation measures how much prices deviate from their average - higher values indicate volatility expansion, lower values indicate consolidation. The strategy uses ta.highestbars() and ta.lowestbars() functions to track when volatility reaches peaks and troughs over the detection length period (default 14 bars).
Channel Formation Logic:
When volatility crosses from a high level to a low level, this signals the beginning of a consolidation phase. The strategy records this moment using ta.crossover(upper, lower) and begins tracking the highest and lowest prices during the consolidation. These become the channel boundaries. The duration between the crossover and current bar must exceed 10 bars minimum to avoid false channels from brief volatility spikes. Channels are drawn using box objects with the recorded high/low boundaries.
Breakout Signal Generation:
Two detection modes are available:
Strong Closes Mode (default): Breakout occurs when the candle body midpoint math.avg(close, open) exceeds the channel boundary. This filters out wick-only breaks.
Any Touch Mode: Breakout occurs when the close price exceeds the boundary.
When price closes above the upper channel boundary, a bullish breakout signal generates. When price closes below the lower boundary, a bearish breakout signal generates. The channel is then removed from the chart.
ATR-Based Risk Management:
The strategy uses request.security() to fetch ATR values from a specified timeframe, which can differ from the chart timeframe. For example, on a 5-minute chart, you can use 1-minute ATR for more responsive calculations. The ATR is calculated using ta.atr(length) with a user-defined period (default 14).
Exit levels are calculated at the moment of breakout:
Long Entry Price = Upper channel boundary
Long TP1 = Entry + (ATR × TP1 Multiplier)
Long TP2 = Entry + (ATR × TP2 Multiplier)
Long SL = Entry - (ATR × SL Multiplier)
For short trades, the calculation inverts:
Short Entry Price = Lower channel boundary
Short TP1 = Entry - (ATR × TP1 Multiplier)
Short TP2 = Entry - (ATR × TP2 Multiplier)
Short SL = Entry + (ATR × SL Multiplier)
Trade Execution Logic:
When a breakout occurs, the strategy checks if trading hours filter is satisfied (if enabled) and if position size equals zero (no existing position). If volume confirmation is enabled, it also verifies that current volume exceeds 1.2 times the 20-period simple moving average.
If all conditions are met:
strategy.entry() opens a position using the user-defined number of contracts
strategy.exit() immediately places a stop loss order
The code monitors price against TP1 and TP2 levels on each bar
When price reaches TP1, strategy.close() closes the specified number of contracts (e.g., if you enter with 3 contracts and set TP1 close to 1, it closes 1 contract). When price reaches TP2, it closes all remaining contracts. If stop loss is hit first, the entire position exits via the strategy.exit() order.
Volume Analysis System:
The strategy uses ta.requestUpAndDownVolume(timeframe) to fetch up volume, down volume, and volume delta from a specified timeframe. Three display modes are available:
Volume Mode: Shows total volume as bars scaled relative to the 20-period average
Comparison Mode: Shows up volume and down volume as separate bars above/below the channel midline
Delta Mode: Shows net volume delta (up volume - down volume) as bars, positive values above midline, negative below
The volume confirmation logic compares breakout bar volume to the 20-period SMA. If volume ÷ average > 1.2, the breakout is classified as "confirmed." When volume confirmation is enabled in settings, only confirmed breakouts generate trades.
INPUT PARAMETERS:
Strategy Settings:
Number of Contracts: Fixed quantity to trade per signal (1-1000)
Require Volume Confirmation: Toggle to only trade signals with volume >120% of average
TP1 Close Contracts: Exact number of contracts to close at first target (1-1000)
Use Trading Hours Filter: Toggle to restrict trading to specified session
Trading Hours: Session input in HHMM-HHMM format (e.g., "0930-1600")
Main Settings:
Normalization Length: Lookback bars for high/low calculation (1-500, default 100)
Box Detection Length: Period for volatility peak/trough detection (1-100, default 14)
Strong Closes Only: Toggle between body midpoint vs close price for breakout detection
Nested Channels: Allow multiple overlapping channels vs single channel at a time
ATR TP/SL Settings:
ATR Timeframe: Source timeframe for ATR calculation (1, 5, 15, 60, etc.)
ATR Length: Smoothing period for ATR (1-100, default 14)
Take Profit 1 Multiplier: Distance from entry as multiple of ATR (0.1-10.0, default 2.0)
Take Profit 2 Multiplier: Distance from entry as multiple of ATR (0.1-10.0, default 3.0)
Stop Loss Multiplier: Distance from entry as multiple of ATR (0.1-10.0, default 1.0)
Enable Take Profit 2: Toggle second profit target on/off
VISUAL INDICATORS:
Channel boxes with semi-transparent fill showing consolidation zones
Green/red colored zones at channel boundaries indicating breakout areas
Volume bars displayed within channels using selected mode
TP/SL lines with labels showing both price level and distance in points
Entry signals marked with up/down triangles at breakout price
Strategy status table showing position, contracts, P&L, ATR values, and volume confirmation status
HOW TO USE:
For 2-Minute Scalping:
Set ATR Timeframe to "1" (1-minute), ATR Length to 12, TP1 Multiplier to 2.0, TP2 Multiplier to 3.0, SL Multiplier to 1.5. Enable volume confirmation and strong closes only. Use trading hours filter to avoid low-volume periods.
For 5-15 Minute Day Trading:
Set ATR Timeframe to match chart or use 5-minute, ATR Length to 14, TP1 Multiplier to 2.0, TP2 Multiplier to 3.5, SL Multiplier to 1.2. Volume confirmation recommended but optional.
For Hourly+ Swing Trading:
Set ATR Timeframe to 15-30 minute, ATR Length to 14-21, TP1 Multiplier to 2.5, TP2 Multiplier to 4.0, SL Multiplier to 1.5. Volume confirmation optional, nested channels can be enabled for multiple setups.
BACKTEST CONSIDERATIONS:
Strategy performs best during trending or volatility expansion phases
Consolidation-heavy or choppy markets produce more false signals
Shorter timeframes require wider stop loss multipliers due to noise
Commission and slippage significantly impact performance on sub-5-minute charts
Volume confirmation generally improves win rate but reduces trade frequency
ATR multipliers should be optimized for specific instrument characteristics
COMPATIBLE MARKETS:
Works on any instrument with price and volume data including forex pairs, stock indices, individual stocks, cryptocurrency, commodities, and futures contracts. Requires TradingView data feed that includes volume for volume confirmation features to function.
KNOWN LIMITATIONS:
Stop losses execute via strategy.exit() and may not fill at exact levels during gaps or extreme volatility
request.security() on lower timeframes requires higher-tier TradingView subscription
False breakouts inherent to breakout strategies cannot be completely eliminated
Performance varies significantly based on market regime (trending vs ranging)
Partial closing logic requires sufficient position size relative to TP1 close contracts setting
RISK DISCLOSURE:
Trading involves substantial risk of loss. Past performance of this or any strategy does not guarantee future results. This strategy is provided for educational purposes and automated backtesting. Thoroughly test on historical data and paper trade before risking real capital. Market conditions change and strategies that worked historically may fail in the future. Use appropriate position sizing and never risk more than you can afford to lose. Consider consulting a licensed financial advisor before making trading decisions.
ACKNOWLEDGMENT & CREDITS:
This strategy is built upon the channel detection methodology created by AlgoAlpha in the "Smart Money Breakout Channels" indicator. Full credit and appreciation to AlgoAlpha for pioneering the normalized volatility approach to identifying consolidation patterns and sharing this innovative technique with the TradingView community. The enhancements added to the original concept include automated trade execution, multi-timeframe ATR-based risk management, partial position closing by contract count, volume confirmation filtering, and real-time position monitoring.
バンドとチャネル
VWAP Exhaustion Bars - HyruVWAP Exhaustion Bars
Quick visual spotting of market exhaustion levels with color-coded RSI bars and VWAP bands.
What it does:
Colors candles based on RSI exhaustion levels (5 red shades for overbought, 4 green for oversold)
Shows rolling VWAP with standard deviation bands
Drops triangle alerts when price hits the bands - red for resistance, green for support
Built-in alerts for extreme levels and band touches
Perfect for:
Scalping reversals at exhaustion points
Identifying potential bounce zones
Quick visual confirmation of overbought/oversold conditions
Clean, fast, and gets straight to the point. No clutter, just actionable signals when you need them most.
Default settings work great, but tweak the RSI length and thresholds to match your trading style.
Stop ATR [TheAlphaGroup]The Stop ATR is a volatility-based trailing stop that adapts dynamically to market conditions.
It uses the Average True Range (ATR) to plot a continuous “stair-step” line:
• In uptrend, the stop appears below price as a green line, rising with volatility.
• In downtrend, the stop appears above price as a red line, falling with volatility.
Unlike fixed stops, the Stop ATR never moves backward. It only trails in the direction of the trend, locking in profits while leaving room for price to move.
Key features:
• ATR-based trailing stop that adapts to volatility.
• Clean “one line only” design — no overlap of signals.
• Adjustable ATR period and multiplier for flexibility.
• Color-coded visualization for quick trend recognition.
How traders use it:
• Manage trades with volatility-adjusted stop placement (trailing stop).
• Identify trend reversals when price closes across the stop.
• Combine with other entry signals for a complete strategy.
TF-Gated CCI x MA + ConsCount + Vol S/R — Signal (v2.6)This is a strategy based on 3 indicators with a view of predicting price of the market in the next 1.5-7.5 minutes depending on the chart you are using. it is best suitable to use with brokers like Tickz.
By Gadirov BEST Reversal Strategy By Gadirov Reversal Strategy - RSI + Stoch + Bollinger (3m expiry)
TW All in OneIts a overlap strategy, giving signals for buy and sell.
Mostly suitable for Bank Nifty. Nifty and crude oil
By Gadirov Reversal Strategy 15 expiryBy Gadirov Reversal Strategy - RSI + Stoch + Bollinger (15m expiry)
TF-Gated CCI+ConsCount+Vol S/R —Signal (v2.6-cci-ascdesc)This scrip take trade on turning of cci after considering valet of CM_Total consec and volume based S/R
Enhanced Chande Momentum OscillatorEnhanced Chande Momentum Oscillator (Enh CMO)
📊 Description
The Enhanced Chande Momentum Oscillator is an advanced version of the classic Chande Momentum Oscillator with dynamic envelope boundaries that automatically adapt to market volatility. This indicator provides clear visual signals for potential price reversals and momentum shifts.
Key Features:
Original Chande Momentum Oscillator calculation
Dynamic upper and lower boundaries based on statistical analysis
Adaptive envelope that adjusts to market volatility
Visual fill area between boundaries for easy interpretation
Real-time values table with current readings
Built-in alert conditions for boundary touches
Customizable moving average types (SMA, EMA, WMA)
⚙️ Settings
CMO Settings:
CMO Length (9): Period for calculating the base Chande Momentum Oscillator
Source (close): Price source for calculations
Envelope Settings:
Envelope Length (20): Lookback period for calculating the moving average and standard deviation
Envelope Multiplier (1.5): Multiplier for standard deviation to create upper/lower bounds
Moving Average Type (EMA): Type of moving average for envelope calculation
📈 How to Use
Visual Elements
Lines:
White Line: Main Chande Momentum Oscillator
Red Line: Upper boundary (resistance level)
Green Line: Lower boundary (support level)
Yellow Line: Moving average of CMO (trend direction)
Purple Fill: Visual envelope between boundaries
Reference Lines:
Zero Line: Neutral momentum level
+50/-50 Lines: Traditional overbought/oversold levels
Trading Signals
🔴 Sell/Short Signals
CMO touches or crosses above upper boundary → Potential bearish reversal
CMO is above +50 and declining → Weakening bullish momentum
CMO crosses below yellow MA line while above zero → Momentum shift
🟢 Buy/Long Signals
CMO touches or crosses below lower boundary → Potential bullish reversal
CMO is below -50 and rising → Weakening bearish momentum
CMO crosses above yellow MA line while below zero → Momentum shift
⚡ Advanced Signals
Boundary contraction → Decreasing volatility, potential breakout coming
Boundary expansion → High volatility period, use wider stops
CMO hugging upper boundary → Strong uptrend continuation
CMO hugging lower boundary → Strong downtrend continuation
🎯 Trading Strategies
Strategy 1: Reversal Trading
Wait for CMO to touch extreme boundaries (red or green lines)
Look for divergence with price action
Enter counter-trend position when CMO starts moving back toward center
Set stop beyond the boundary breach point
Take profit near zero line or opposite boundary
Strategy 2: Momentum Confirmation
Use CMO direction to confirm trend
Enter positions when CMO crosses above/below yellow MA line
Hold positions while CMO remains on the correct side of MA
Exit when CMO crosses back through MA line
Strategy 3: Volatility Breakout
Monitor boundary width (envelope expansion/contraction)
When boundaries contract significantly, prepare for breakout
Enter in direction of CMO breakout from narrow range
Use boundary expansion as confirmation signal
⚠️ Important Notes
Best Timeframes
Scalping: 1m, 5m charts
Day Trading: 15m, 30m, 1H charts
Swing Trading: 4H, Daily charts
Market Conditions
Trending Markets: Focus on momentum confirmation signals
Ranging Markets: Focus on boundary reversal signals
High Volatility: Increase envelope multiplier (1.8-2.5)
Low Volatility: Decrease envelope multiplier (1.0-1.3)
Risk Management
Always use stop losses beyond boundary levels
Reduce position size during boundary expansion periods
Combine with price action and support/resistance levels
Monitor the real-time table for precise entry/exit levels
🔔 Alerts
The indicator includes built-in alert conditions:
"CMO Above Upper Bound": Potential reversal down signal
"CMO Below Lower Bound": Potential reversal up signal
Set these alerts to catch opportunities without constantly monitoring charts.
💡 Tips for Success
Combine with other indicators: Use with RSI, MACD, or volume indicators for confirmation
Watch for divergences: CMO making new highs/lows while price doesn't follow
Use multiple timeframes: Check higher timeframe CMO for overall trend context
Adjust settings for different assets: Crypto may need different settings than forex
Paper trade first: Test the indicator with your trading style before using real money
🎨 Customization Tips
Change colors in the Pine Script to match your chart theme
Adjust envelope length for faster (shorter) or slower (longer) signals
Modify envelope multiplier based on asset volatility
Hide the table if it obstructs your view by commenting out the table section
Complete trading solution: Pair with the Optimus Indicator (paid indicator) for multi-timeframe trend analysis and trend signals.
Together they create a powerful confluence system for professional trading setups.
MACD COM PONTOS//@version=5
indicator(title="MACD COM PONTOS", shorttitle="MACD COM PONTOS")
//Plot Inputs
res = input.timeframe("", "Indicator TimeFrame")
fast_length = input.int(title="Fast Length", defval=12)
slow_length = input.int(title="Slow Length", defval=26)
src = input.source(title="Source", defval=close)
signal_length = input.int(title="Signal Smoothing", minval = 1, maxval = 999, defval = 9)
sma_source = input.string(title="Oscillator MA Type", defval="EMA", options= )
sma_signal = input.string(title="Signal Line MA Type", defval="EMA", options= )
// Show Plots T/F
show_macd = input.bool(true, title="Show MACD Lines", group="Show Plots?", inline="SP10")
show_macd_LW = input.int(3, minval=0, maxval=5, title = "MACD Width", group="Show Plots?", inline="SP11")
show_signal_LW= input.int(2, minval=0, maxval=5, title = "Signal Width", group="Show Plots?", inline="SP11")
show_Hist = input.bool(true, title="Show Histogram", group="Show Plots?", inline="SP20")
show_hist_LW = input.int(5, minval=0, maxval=5, title = "-- Width", group="Show Plots?", inline="SP20")
show_trend = input.bool(true, title = "Show MACD Lines w/ Trend Color", group="Show Plots?", inline="SP30")
show_HB = input.bool(false, title="Show Highlight Price Bars", group="Show Plots?", inline="SP40")
show_cross = input.bool(false, title = "Show BackGround on Cross", group="Show Plots?", inline="SP50")
show_dots = input.bool(true, title = "Show Circle on Cross", group="Show Plots?", inline="SP60")
show_dots_LW = input.int(5, minval=0, maxval=5, title = "-- Width", group="Show Plots?", inline="SP60")
//show_trend = input(true, title = "Colors MACD Lines w/ Trend Color", group="Show Plots?", inline="SP5")
// MACD Lines colors
col_macd = input.color(#FF6D00, "MACD Line ", group="Color Settings", inline="CS1")
col_signal = input.color(#2962FF, "Signal Line ", group="Color Settings", inline="CS1")
col_trnd_Up = input.color(#4BAF4F, "Trend Up ", group="Color Settings", inline="CS2")
col_trnd_Dn = input.color(#B71D1C, "Trend Down ", group="Color Settings", inline="CS2")
// Histogram Colors
col_grow_above = input.color(#26A69A, "Above Grow", group="Histogram Colors", inline="Hist10")
col_fall_above = input.color(#B2DFDB, "Fall", group="Histogram Colors", inline="Hist10")
col_grow_below = input.color(#FF5252, "Below Grow", group="Histogram Colors",inline="Hist20")
col_fall_below = input.color(#FFCDD2, "Fall", group="Histogram Colors", inline="Hist20")
// Alerts T/F Inputs
alert_Long = input.bool(true, title = "MACD Cross Up", group = "Alerts", inline="Alert10")
alert_Short = input.bool(true, title = "MACD Cross Dn", group = "Alerts", inline="Alert10")
alert_Long_A = input.bool(false, title = "MACD Cross Up & > 0", group = "Alerts", inline="Alert20")
alert_Short_B = input.bool(false, title = "MACD Cross Dn & < 0", group = "Alerts", inline="Alert20")
// Calculating
fast_ma = request.security(syminfo.tickerid, res, sma_source == "SMA" ? ta.sma(src, fast_length) : ta.ema(src, fast_length))
slow_ma = request.security(syminfo.tickerid, res, sma_source == "SMA" ? ta.sma(src, slow_length) : ta.ema(src, slow_length))
macd = fast_ma - slow_ma
signal = request.security(syminfo.tickerid, res, sma_signal == "SMA" ? ta.sma(macd, signal_length) : ta.ema(macd, signal_length))
hist = macd - signal
// MACD Trend and Cross Up/Down conditions
trend_up = macd > signal
trend_dn = macd < signal
cross_UP = signal >= macd and signal < macd
cross_DN = signal <= macd and signal > macd
cross_UP_A = (signal >= macd and signal < macd) and macd > 0
cross_DN_B = (signal <= macd and signal > macd) and macd < 0
// Condition that changes Color of MACD Line if Show Trend is turned on..
trend_col = show_trend and trend_up ? col_trnd_Up : trend_up ? col_macd : show_trend and trend_dn ? col_trnd_Dn: trend_dn ? col_macd : na
//Var Statements for Histogram Color Change
var bool histA_IsUp = false
var bool histA_IsDown = false
var bool histB_IsDown = false
var bool histB_IsUp = false
histA_IsUp := hist == hist ? histA_IsUp : hist > hist and hist > 0
histA_IsDown := hist == hist ? histA_IsDown : hist < hist and hist > 0
histB_IsDown := hist == hist ? histB_IsDown : hist < hist and hist <= 0
histB_IsUp := hist == hist ? histB_IsUp : hist > hist and hist <= 0
hist_col = histA_IsUp ? col_grow_above : histA_IsDown ? col_fall_above : histB_IsDown ? col_grow_below : histB_IsUp ? col_fall_below :color.silver
// Plot Statements
//Background Color
bgcolor(show_cross and cross_UP ? col_trnd_Up : na, editable=false)
bgcolor(show_cross and cross_DN ? col_trnd_Dn : na, editable=false)
//Highlight Price Bars
barcolor(show_HB and trend_up ? col_trnd_Up : na, title="Trend Up", offset = 0, editable=false)
barcolor(show_HB and trend_dn ? col_trnd_Dn : na, title="Trend Dn", offset = 0, editable=false)
//Regular Plots
plot(show_Hist and hist ? hist : na, title="Histogram", style=plot.style_columns, color=color.new(hist_col ,0),linewidth=show_hist_LW)
plot(show_macd and signal ? signal : na, title="Signal", color=color.new(col_signal, 0), style=plot.style_line ,linewidth=show_signal_LW)
plot(show_macd and macd ? macd : na, title="MACD", color=color.new(trend_col, 0), style=plot.style_line ,linewidth=show_macd_LW)
hline(0, title="0 Line", color=color.new(color.gray, 0), linestyle=hline.style_dashed, linewidth=1, editable=false)
plot(show_dots and cross_UP ? macd : na, title="Dots", color=color.new(trend_col ,0), style=plot.style_circles, linewidth=show_dots_LW, editable=false)
plot(show_dots and cross_DN ? macd : na, title="Dots", color=color.new(trend_col ,0), style=plot.style_circles, linewidth=show_dots_LW, editable=false)
//Alerts
if alert_Long and cross_UP
alert("Symbol = (" + syminfo.tickerid + ") TimeFrame = (" + timeframe.period + ") Current Price (" + str.tostring(close) + ") MACD Crosses Up.", alert.freq_once_per_bar_close)
if alert_Short and cross_DN
alert("Symbol = (" + syminfo.tickerid + ") TimeFrame = (" + timeframe.period + ") Current Price (" + str.tostring(close) + ") MACD Crosses Down.", alert.freq_once_per_bar_close)
//Alerts - Stricter Condition - Only Alerts When MACD Crosses UP & MACD > 0 -- Crosses Down & MACD < 0
if alert_Long_A and cross_UP_A
alert("Symbol = (" + syminfo.tickerid + ") TimeFrame = (" + timeframe.period + ") Current Price (" + str.tostring(close) + ") MACD > 0 And Crosses Up.", alert.freq_once_per_bar_close)
if alert_Short_B and cross_DN_B
alert("Symbol = (" + syminfo.tickerid + ") TimeFrame = (" + timeframe.period + ") Current Price (" + str.tostring(close) + ") MACD < 0 And Crosses Down.", alert.freq_once_per_bar_close)
//End Code
Bollinger Bands (Log Scale)📈 Bollinger Bands on log scale are broken.
Many traders use log charts for better price symmetry—but still apply Bollinger Bands calculated on linear price. That mismatch creates distorted signals.
Here’s what I found:
- Standard deviation becomes misleading on log scale
- Band width no longer reflects true volatility
- Breakout signals lose behavioral clarity
🛠 So I rewrote the logic.
My version calculates Bollinger Bands using log(price) for both mean and deviation, then maps the result back to price. It behaves correctly on log charts and aligns better with behavioral scoring.
MACD Josh MACD Study — Visual Crossover Tags
Overview:
This script displays MACD signals in a clear, visual way by showing:
Histogram = EMA(Fast) − EMA(Slow)
Signal = EMA(Histogram, Signal Length)
It adds labels and arrows to help you see crossover events between the Histogram and the Signal line more easily.
⚠️ Disclaimer: This tool is for educational and research purposes only. It is not financial advice or an investment recommendation. Past performance does not guarantee future results. Users should make their own decisions and manage risk responsibly.
Features
Central Zero Line with Signal and Histogram plots
Optional labels/arrows to highlight Histogram–Signal crossovers
Alerts for crossover and crossunder events, integrated with TradingView’s alert system
Standard adjustable inputs: Fast EMA, Slow EMA, Signal EMA
How to Interpret (for study only)
When the Histogram crosses above the Signal, a visual label/arrow marks a positive MACD event
When the Histogram crosses below the Signal, a visual label/arrow marks a negative MACD event
The “BUY/SELL” labels are visual study tags only — they do not represent trade instructions or recommendations
Responsible Usage Tips
Test across multiple timeframes and different assets
Combine with higher-timeframe trend, support/resistance, or volume for confirmation
Use alerts with caution, and always test in a demo environment first
Technical Notes
The script does not use future data and does not repaint signals once bars are closed
Results depend on market conditions and may vary across assets and timeframes
License & Credits
Written in Pine Script® v5 for TradingView
The indicator name shown on chart is for labeling purposes only and carries no implication of advice or solicitation
Trader Marks Trailing SL + TP (BE @ 60%)This script provides a unique stop-loss and take-profit management tool designed for swing traders.
It introduces a two-stage stop-loss logic that is not available in standard TradingView tools:
Break-Even Protection: Once a defined profit threshold (e.g. 66%) is reached, the stop-loss automatically moves to break-even.
ATR-Based Trailing Stop: After a chosen delay (e.g. 12 hours), the script activates a dynamic trailing stop that follows market volatility using the ATR.
Flexible Ratchet Mechanism: The stop-loss can be locked at new profit levels and will never move backwards.
This combination allows traders to secure profits while still giving the trade room to develop. The indicator is especially useful for swing trading on 4H and daily timeframes but can be applied to other styles as well.
How to use:
Enter your entry price, stop-loss, and take-profit levels.
Choose your trailing mode: Exact S/L+ (simple) or Advanced (Delay + BE + Ratchet).
Adjust parameters such as ATR length or activation delay to match your strategy.
The script helps you balance risk and reward by ensuring that once the trade moves in your favor, you cannot lose the initial risk, while still benefiting from extended market moves.
JDB MA Breakout IndicatorAll credit goes to JDB_Trading . Follow on X.
This indicator visualises one of his strategies.
1. Detecting the dominant moving average.
2. Price is supposed to be at least 70 candles below it for buy signals/40 above for sells.
3. detects break on dominant MA + BB 20,2.
4. Used on W & M timeframes.
5. alerts possible.
EMA & HMA with ShadingA simple indicator you can use to shade the area between an EMA and HMA for easier visualization. Hope you find it useful in your trading.
Advanced MA Slope Tool(by ExpertCBCD)New version of MA Slope, originally made by ExpertCBCD.Now you can choose many indicators then compare and confirm their slope. Thanks for ExpertCBCD, hope you can use it like the bow of Robinhood to defeat big banks and take money in the market.
WaveMacBollI wanted to see the two indicators in the candle chart, not in a separate window. And within the Bollinger band, it seemed to put it fine.
Important Note on Line Styles
Due to TradingView's multi-timeframe environment restrictions (timeframe = '', timeframe_gaps = true), I couldn't implement dotted or dashed line styles programmatically. The indicator uses solid lines by default.
If you prefer dotted/dashed lines for better visual distinction:
Add the indicator to your chart
Click on the indicator settings (gear icon)
Go to "Style" tab
Manually change line styles for each plot
Unfortunately, PineScript doesn't support line.new() or similar drawing functions in multi-timeframe mode, limiting our styling options to basic plot styles.
If you know a good solution for implementing dotted/dashed lines in multi-timeframe indicators without using drawing objects, please share it in the comments! I'd love to improve this aspect of the indicator
EMA 89 và EMA 34 - MTF AlertEMA34/89 in MTF and alert. If you want to find indicator for alert, I thing it for you
RSI ROC Signals with Price Action# RSI ROC Signals with Price Action
## Overview
The RSI ROC (Rate of Change) Signals indicator is an advanced momentum-based trading system that combines RSI velocity analysis with price action confirmation to generate high-probability buy and sell signals. This indicator goes beyond traditional RSI analysis by measuring the speed of RSI changes and requiring price confirmation before triggering signals.
## Core Concept: RSI Rate of Change (ROC)
### What is RSI ROC?
RSI ROC measures the **velocity** or **acceleration** of the RSI indicator, providing insights into momentum shifts before they become apparent in traditional RSI readings.
**Formula**: `RSI ROC = ((Current RSI - Previous RSI) / Previous RSI) × 100`
### Why RSI ROC is Superior to Standard RSI:
1. **Early Momentum Detection**: Identifies momentum shifts before RSI reaches traditional overbought/oversold levels
2. **Velocity Analysis**: Measures the speed of momentum changes, not just absolute levels
3. **Reduced False Signals**: Filters out weak momentum moves that don't sustain
4. **Dynamic Thresholds**: Adapts to market volatility rather than using fixed RSI levels
5. **Leading Indicator**: Provides earlier signals compared to traditional RSI crossovers
## Signal Generation Logic
### 🟢 Buy Signal Process (3-Stage System):
#### Stage 1: Trigger Activation
- **RSI ROC** > threshold (default 7%) - RSI accelerating upward
- **Price ROC** > 0 - Price moving higher
- Records the **trigger high** (highest point during trigger)
#### Stage 2: Invalidation Check
- Signal invalidated if **RSI ROC** drops below negative threshold
- Prevents false signals during momentum reversals
#### Stage 3: Confirmation
- **Price breaks above trigger high** - Price action confirmation
- **Current candle is green** (close > open) - Bullish price action
- **State alternation** - Ensures no consecutive duplicate signals
### 🔴 Sell Signal Process (3-Stage System):
#### Stage 1: Trigger Activation
- **RSI ROC** < negative threshold (default -7%) - RSI accelerating downward
- **Price ROC** < 0 - Price moving lower
- Records the **trigger low** (lowest point during trigger)
#### Stage 2: Invalidation Check
- Signal invalidated if **RSI ROC** rises above positive threshold
- Prevents false signals during momentum reversals
#### Stage 3: Confirmation
- **Price breaks below trigger low** - Price action confirmation
- **Current candle is red** (close < open) - Bearish price action
- **State alternation** - Ensures no consecutive duplicate signals
## Key Features
### 🎯 **Smart Signal Management**
- **State Alternation**: Prevents signal clustering by alternating between buy/sell states
- **Trigger Invalidation**: Automatically cancels weak signals that lose momentum
- **Price Confirmation**: Requires actual price breakouts, not just momentum shifts
- **No Repainting**: Signals are confirmed and won't disappear or change
### ⚙️ **Customizable Parameters**
#### **RSI Length (Default: 14)**
- Standard RSI calculation period
- Shorter periods = more sensitive to price changes
- Longer periods = smoother, less noisy signals
#### **Lookback Period (Default: 1)**
- Period for ROC calculations
- 1 = compares to previous bar (most responsive)
- Higher values = smoother momentum detection
#### **RSI ROC Threshold (Default: 7%)**
- Minimum RSI velocity required for signal trigger
- Lower values = more signals, potentially more noise
- Higher values = fewer but higher-quality signals
### 📊 **Visual Signals**
- **Green Arrow Up**: Buy signal below price bar
- **Red Arrow Down**: Sell signal above price bar
- **Clean Chart**: No additional lines or oscillators cluttering the view
- **Size Options**: Customizable arrow sizes for visibility preferences
## Advantages Over Traditional Indicators
### vs. Standard RSI:
✅ **Earlier Signals**: Detects momentum changes before RSI reaches extremes
✅ **Dynamic Thresholds**: Adapts to market conditions vs. fixed 30/70 levels
✅ **Velocity Focus**: Measures momentum speed, not just position
✅ **Better Timing**: Combines momentum with price action confirmation
### vs. Moving Average Crossovers:
✅ **Leading vs. Lagging**: RSI ROC is forward-looking vs. backward-looking MAs
✅ **Volatility Adaptive**: Automatically adjusts to market volatility
✅ **Fewer Whipsaws**: Built-in invalidation logic reduces false signals
✅ **Momentum Focus**: Captures acceleration, not just direction changes
### vs. MACD:
✅ **Price-Normalized**: RSI ROC works consistently across different price ranges
✅ **Simpler Logic**: Clear trigger/confirmation process vs. complex crossovers
✅ **Built-in Filters**: Automatic signal quality control
✅ **State Management**: Prevents over-trading through alternation logic
## Trading Applications
### 📈 **Trend Following**
- Use in trending markets to catch momentum continuations
- Combine with trend filters for directional bias
- Excellent for breakout strategies
### 🔄 **Swing Trading**
- Ideal timeframes: 4H, Daily, Weekly
- Captures major momentum shifts
- Perfect for position entries/exits
### ⚡ **Scalping (Advanced Users)**
- Lower timeframes: 1m, 5m, 15m
- Reduce threshold for more frequent signals
- Combine with volume confirmation
### 🎯 **Momentum Strategies**
- Perfect for momentum-based trading systems
- Identifies acceleration phases in trends
- Complements breakout and continuation patterns
## Optimization Guidelines
### **Conservative Settings (Lower Risk)**
- RSI Length: 21
- ROC Threshold: 10%
- Lookback: 2
### **Standard Settings (Balanced)**
- RSI Length: 14 (default)
- ROC Threshold: 7% (default)
- Lookback: 1 (default)
### **Aggressive Settings (Higher Frequency)**
- RSI Length: 7
- ROC Threshold: 5%
- Lookback: 1
## Best Practices
### 🎯 **Entry Strategy**
1. Wait for signal arrow confirmation
2. Consider market context (trend, support/resistance)
3. Use proper position sizing based on volatility
4. Set stop-loss below/above trigger levels
### 🛡️ **Risk Management**
1. **Stop Loss**: Place beyond trigger high/low levels
2. **Position Sizing**: Use 1-2% risk per trade
3. **Market Context**: Avoid counter-trend signals in strong trends
4. **Time Filters**: Consider avoiding signals near major news events
### 📊 **Backtesting Recommendations**
1. Test on multiple timeframes and instruments
2. Analyze win rate vs. average win/loss ratio
3. Consider transaction costs in backtesting
4. Optimize threshold values for different market conditions
## Technical Specifications
- **Pine Script Version**: v6
- **Signal Type**: Non-repainting, confirmed signals
- **Calculation Basis**: RSI velocity with price action confirmation
- **Update Frequency**: Real-time on bar close
- **Memory Management**: Efficient state tracking with minimal resource usage
## Ideal For:
- **Momentum Traders**: Captures acceleration phases
- **Swing Traders**: Medium-term position entries/exits
- **Breakout Traders**: Confirms momentum behind breakouts
- **System Traders**: Mechanical signal generation with clear rules
This indicator represents a significant evolution in momentum analysis, combining the reliability of RSI with the precision of rate-of-change analysis and the confirmation of price action. It's designed for traders who want sophisticated momentum detection with built-in quality controls.
TRP Stop-Loss_Trailing SL# TRP Stop-Loss Indicator
## Overview
The TRP (True Range Percentage) Stop-Loss indicator is an advanced volatility-based stop-loss tool that provides dynamic position protection based on market volatility. Unlike traditional ATR-based indicators, TRP calculates volatility as a percentage of price, offering superior adaptability across different price ranges and market conditions.
## What is TRP and Why It's Superior to ATR
### TRP (True Range Percentage)
TRP calculates the true range as a percentage of the closing price, providing a **normalized volatility measure**. The formula is:
```
TRP = (True Range / Close) × 100
```
### Key Advantages of TRP over ATR:
1. **Price-Normalized Volatility**: TRP automatically adjusts for different price levels, making it equally effective whether you're trading a $10 stock or a $1000 stock.
2. **Percentage-Based Risk**: TRP gives you direct percentage risk values, making position sizing and risk management more intuitive.
3. **Better Cross-Market Comparison**: Unlike ATR, TRP allows you to compare volatility across different instruments on an equal basis.
4. **Adaptive to Market Conditions**: TRP naturally scales with price movements, providing more relevant stop-loss levels during trending markets.
5. **Consistent Risk Exposure**: Maintains consistent percentage risk regardless of the underlying asset's price level.
## Indicator Features
### 🎯 **Dual Stop-Loss System**
- **Long SL**: Red line below price for long positions
- **Short SL**: Blue line above price for short positions
- Independent control for each direction
### ⚙️ **Advanced Calculation Options**
#### **Multiple TRP Calculation Sources:**
- **Current Candle**: Uses real-time running candle data
- **Previous Close**: Uses completed candle data (default)
- **Last Green Candle**: For longs - uses TRP from the most recent bullish candle
- **Last Red Candle**: For shorts - uses TRP from the most recent bearish candle
#### **Independent Multipliers:**
- Separate multiplier controls for long and short stop-losses
- Adjust risk levels independently (0.1x to 10x+ range)
- Fine-tune stop-loss distance based on your risk tolerance
### 📊 **Visual Customization**
- **Line Styles**: Solid, dashed, or dotted lines
- **Custom Colors**: Separate color controls for long/short SL
- **Line Width**: Adjustable thickness (1-10)
- **Extension**: Customizable projection bars to the right
### 🏷️ **Smart Labeling System**
- **Value Display**: Shows exact SL price on the right side of lines
- **Toggle Control**: Enable/disable labels as needed
- **Size Options**: 5 different label sizes (tiny to huge)
- **Color Coordination**: Labels match their respective line colors
### ⏰ **Multi-Timeframe Support**
- Calculate TRP on any timeframe while viewing on another
- Default: Daily TRP calculation for intraday charts
- Maintains calculation integrity across timeframe switches
## How to Use
### Basic Setup:
1. Add the indicator to your chart
2. Select your preferred timeframe for TRP calculation
3. Choose calculation source for long and short positions
4. Adjust multipliers based on your risk tolerance
### Risk Management Applications:
- **Conservative**: Use 0.5-0.8 multipliers for tighter stops
- **Standard**: Use 1.0 multiplier for normal volatility-based stops
- **Aggressive**: Use 1.2-2.0 multipliers for wider stops in volatile markets
### Advanced Strategies:
- **Trend Following**: Use "Last Green/Red Candle" sources to adapt to momentum changes
- **Breakout Trading**: Use "Current Candle" for real-time stop adjustments
- **Swing Trading**: Use "Previous Close" for stable, confirmed levels
## Key Benefits
✅ **Dynamic Adaptation**: Automatically adjusts to changing market volatility
✅ **Percentage Risk Control**: Direct percentage-based risk management
✅ **Multi-Strategy Compatible**: Works with scalping, day trading, and swing trading
✅ **Visual Clarity**: Clean, professional chart display with customizable appearance
✅ **Real-Time Updates**: Instant recalculation when settings change
✅ **No Overlapping Lines**: Smart line management prevents chart clutter
## Best Practices
1. **Backtest First**: Test different multiplier settings on historical data
2. **Market Adaptation**: Adjust multipliers based on current market volatility regime
3. **Combine with Other Signals**: Use TRP stops with your existing entry signals
4. **Position Sizing**: Use TRP percentage values for consistent position sizing
5. **Regular Review**: Periodically review and adjust settings based on performance
## Technical Specifications
- **Pine Script Version**: v6
- **Overlay**: Yes (draws directly on price chart)
- **Calculations**: Based on 50-period EMA of TRP values
- **Updates**: Real-time with automatic line management
- **Performance**: Optimized for fast execution and minimal lag
This indicator is ideal for traders who want professional-grade, volatility-adaptive stop-loss management with the flexibility to fine-tune risk parameters across different market conditions and trading styles.
Ultra Simple ReversalThis is a simple script that combines Key Features:
✅ No plotting - Only text labels and candle color changes
✅ Reversal candle detection - Changes candle color on high-probability signals
✅ BUY/SELL text labels - Clear directional signals
✅ Four-module confluence - SSL + Squeeze + MTF Pivots + ORB Breakout
✅ Non-repainting - Reliable signals using proper security calls
✅ Pine Script v6 compatible - All syntax errors fixed
RCT FUSION PRO – Convergent Squeeze, Momentum & Trend SystemDescripción del script :
This indicator integrates three core technical concepts into a single decision-support framework: Bollinger-Keltner squeeze compression, directional trend strength (ADX/DMI), and multi-timeframe market wave momentum. The goal is not merely to overlay indicators, but to create a convergent signal system where confirmation across components increases the reliability of potential trade setups.
1. Squeeze Momentum (LazyBear’s method):
Detects periods of low volatility (squeeze) using Bollinger Bands inside Keltner Channels. When the squeeze “fires,” the linear regression-based oscillator (val) reveals the direction and acceleration of the breakout. Green/lime = bullish momentum; red/maroon = bearish.
2. Adaptive ADX & DMI Scaling:
The standard ADX (14-period) and +/-DI lines are dynamically scaled to match the amplitude of the squeeze oscillator. This allows traders to visually assess whether a breakout occurs alongside strong trend confirmation (ADX > 23) and directional bias (+DI > -DI or vice versa). The key level is offset by -7 units for better alignment.
3. Fibonacci Wave Momentum (A/B/C):
Three MACD-style histograms (Wave A: 55, Wave B: 144, Wave C: 233) use EMA crossovers with Fibonacci lengths to identify short-, medium-, and long-term momentum shifts. These appear as semi-transparent areas and help contextualize the squeeze signal within broader market cycles.
4. Divergence Detection (Non-repainting):
Automatically identifies regular and hidden bullish/bearish divergences between price and the squeeze oscillator. All divergence lines and labels are drawn only after the candle closes, preventing repainting. Alerts are included for all four divergence types.
How to use:
A squeeze release (black → gray background) combined with rising green histogram and +DI > -DI suggests a high-probability long setup.
Confirm with Wave A/B/C alignment (all turning positive) and/or a bullish divergence below zero.
Use the Key Level line (white) as a dynamic reference for ADX strength relative to momentum.
This system is designed for swing and intraday traders seeking confluence between volatility compression, trend strength, and cyclical momentum. No single component is traded in isolation—convergence is the core principle.
Versión en español :
Este indicador combina tres conceptos técnicos clave en un solo marco de apoyo a la decisión: compresión de squeeze (Bollinger-Keltner), fuerza direccional de tendencia (ADX/DMI) y momento de ondas de mercado en múltiples plazos. No se trata de una simple superposición, sino de un sistema donde la convergencia de señales aumenta la confiabilidad de las entradas.
El Squeeze Momentum detecta baja volatilidad y muestra la dirección del impulso tras la liberación.
El ADX y los DM+/- se escalan dinámicamente para alinearse visualmente con el oscilador, permitiendo evaluar si el impulso coincide con una tendencia fuerte.
Las Ondas A/B/C (55, 144, 233) muestran el momento en distintos horizontes temporales mediante áreas coloreadas.
Las divergencias (regulares y ocultas) se detectan sin repintado y generan alertas.
Se recomienda operar solo cuando múltiples componentes coinciden, no de forma aislada. Ideal para traders de swing e intradía que buscan confluencia.