SigmaRevert: Z-Score Adaptive Mean Reversion [KedArc Quant]🔍 Overview
SigmaRevert is a clean, research-driven mean-reversion framework built on Z-Score deviation — a statistical measure of how far the current price diverges from its dynamic mean.
When price stretches too far from equilibrium (the mean), SigmaRevert identifies the statistical “sigma distance” and seeks reversion trades back toward it. Designed primarily for 5-minute intraday use, SigmaRevert automatically adapts to volatility via ATR-based scaling, optional higher-timeframe trend filters, and cooldown logic for controlled frequency
🧠 What “Sigma” Means Here
In statistics, σ (sigma) represents standard deviation, the measure of dispersion or variability.
SigmaRevert uses this concept directly:
Each bar’s price deviation from the mean is expressed as a Z-Score — the number of sigmas away from the mean.
When Z > 1.5, the price is statistically “over-extended”; when it returns toward 0, it reverts to the mean.
In short:
Sigma = Standard deviation distance
SigmaRevert = Trading the reversion of extreme sigma deviations
💡 Why Traders Use SigmaRevert
Quant-based clarity: removes emotion by relying on statistical extremes.
Volatility-adaptive: automatically adjusts to changing market noise.
Low drawdown: filters avoid over-exposure during strong trends.
Multi-market ready: works across stocks, indices, and crypto with parameter tuning.
Modular design: every component can be toggled without breaking the core logic.
🧩 Why This Is NOT a Mash-Up
Unlike “mash-up” scripts that randomly combine indicators, this strategy is built around one cohesive hypothesis:
“Price deviations from a statistically stable mean (Z-Score) tend to revert.”
Every module — ATR scaling, cooldown, HTF trend gating, exits — reinforces that single hypothesis rather than mixing unrelated systems (like RSI + MACD + EMA).
The structure is minimal yet expandable, maintaining research integrity and transparency.
⚙️ Input Configuration (Simplified Table)
 
 Core
   `maLen`         120            Lookback for mean (SMA)                              
    `zLen`          60             Window for Z-score deviation                         
    `zEntry`        1.5            Entry when Z  exceeds threshold 
    `zExit`         0.3            Exit when Z normalizes                               
 Filters (optional) 	  
    `useReCross`    false          Requires re-entry confirmation                       
    `useTrend`      false / true   Enables HTF SMA bias                                 
    `htfTF`         “60”           HTF timeframe (e.g. 60-min)                          
    `useATRDist`    false          Demands min distance from mean                       
    `atrK`          1.0            ATR distance multiplier                              
    `useCooldown`   false / true   Forces rest after exit                               
 Risk
    `useATRSL`      false / true   Adaptive stop-loss via ATR                           
    `atrLen`        14             ATR lookback                                         
    `atrX`          1.4            ATR multiplier for stop                              
 Session
    `useSession`    false          Restrict to market hours                             
    `sess`          “0915-1530”    NSE timing                                           
    `skipOpenBars`  0–3            Avoid early volatility                               
 UI 
    `showBands`     true           Displays ±1σ & ±2σ                                   
    `showMarks`     true           Shows triggers and exits                             
🎯 Entry & Exit Logic
Long Entry
 Trigger: `Z < -zEntry`
 Optional re-cross: prior Z < −zEntry, current Z −zEntry
 Optional trend bias: current close above HTF SMA
 Optional ATR filter: distance from mean ATR × K
Short Entry
 Trigger: `Z +zEntry`
 Optional re-cross: prior Z +zEntry, current Z < +zEntry
 Optional trend bias: current close below HTF SMA
 Optional ATR filter: distance from mean ATR × K
Exit Conditions
 Primary exit: `Z < zExit` (price normalized)
 Time stop: `bars since entry timeStop`
 Optional ATR stop-loss: ±ATR × multiplier
 Optional cooldown: no new trade for X bars after exit
🕒 When to Use
 Intraday (5m)       
	`maLen=120`, `zEntry=1.5`, `zExit=0.3`, `useTrend=false`, `cooldownBars=6`  Capture intraday oscillations        Minutes → hours 
 Swing (30m–1H)      
	`maLen=200`, `zEntry=1.8`, `zExit=0.4`, `useTrend=true`, `htfTF="D"`        Mean-reversion between daily pivots  1–2 days        
 Positional (4H–1D) 
	`maLen=300`, `zEntry=2.0`, `zExit=0.5`, `useTrend=true`                     Capture multi-day mean reversions    Days → weeks    
📘 Glossary
 Z-Score         
	Statistical measure of how far current price deviates from its mean, normalized by standard deviation. 
 Mean Reversion  
	The tendency of price to return to its average after temporary divergence.         
                    
 ATR             
	Average True Range — measures volatility and defines adaptive stop distances.         
                 
 Re-Cross        
	Secondary signal confirming reversal after an extreme.                           
                      
 HTF             
	Higher Timeframe — provides macro trend bias (e.g. 1-hour or daily).         
                          
 Cooldown        
	Minimum bars to wait before re-entering after a trade closes.                                          
❓ FAQ
Q1: Why are there no trades sometimes?
➡ Check that all filters are off. If still no trades, Z-scores might not breach the thresholds. Lower `zEntry` (1.2–1.4) to increase frequency.
Q2: Why does it sometimes fade breakouts?
➡ Mean reversion assumes overextension — disable it during strong trending days or use the HTF filter.
Q3: Can I use this for Forex or Crypto?
➡ Yes — but adjust session filters (`useSession=false`) and increase `maLen` for smoother means.
Q4: Why is profit factor so high but small overall gain?
➡ Because this script focuses on capital efficiency — low drawdown and steady scaling. Increase position size once stable.
Q5: Can I automate this on broker integration?
➡ Yes — the strategy uses standard `strategy.entry` and `strategy.exit` calls, compatible with TradingView webhooks.
🧭 How It Helps Traders
This strategy gives:
 Discipline: no impulsive trades — strict statistical rules.
 Consistency: removes emotional bias; same logic applies every bar.
 Scalability: works across instruments and timeframes.
 Transparency: all signals are derived from visible Z-Score math.
It’s ideal for quant-inclined discretionary traders who want rule-based entries but maintain human judgment for context (earnings days, macro news, etc.).
🧱 Final Notes
 Best used on liquid stocks with continuous price movement.
 Avoid illiquid or gap-heavy tickers.
 Validate parameters per instrument — Z behavior differs between equities and indices.
 Remember: Mean reversion works best in range-bound volatility, not during explosive breakouts.
⚠️ Disclaimer
This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.
波動率
AMF PG Strategy v2.3AMF PG Strategy v2.3
1. Core Philosophy: Filtered and Volatility-Aware Trend Following
"AMF PG Strategy" is an advanced trend-following system designed to adapt to the dynamic nature of modern markets. The strategy's core philosophy is not just to follow the trend but also to wait for the right conditions to enter the market.
This is not a "black box." It is a rules-based framework that gives the user full control over various market filters. By requiring multiple conditions to be met simultaneously, the strategy aims to filter out low-quality signals and focus only on high-probability trend opportunities.
2. Core Engine: AMF PG Trend Following
At the heart of the strategy is a proprietary, volatility-aware trend-following mechanism called AMF PG (Praetorian Guard). This engine operates as follows:
Dynamic Bands: Creates a dynamic upper and lower band around the price that is constantly recalculated. The width of these bands is not fixed; It dynamically adjusts based on recent market volatility, volume flow, and price expansion. This adaptive structure allows the strategy to adapt to both calm and high-volatility markets.
Entry Signals: A buy signal is triggered when the price rises above the upper band. A sell signal is triggered when the price falls below the lower band. However, these signals are executed only when all the active filters described below give the green light.
Trailing Stop-Loss: When a position is entered, the opposite band automatically acts as a trailing stop-loss level. For example, when a buy position is opened, the lower band follows the price as a stop-loss. This allows for profit retention and trend continuation.
3. Multi-Layered Filter System: Understanding the Market
The power of this strategy comes from its modular filter system, which allows the user to filter market conditions based on their own analysis. Each filter can be enabled or disabled individually in the settings:
Filter 1: Trend Strength (ADX Filter): This filter confirms whether there is a strong trend in the market. It uses the ADX (Average Directional Index) indicator and only allows trades if the ADX value is above a certain threshold. This helps avoid trading in weak or directionless markets. It also confirms the direction of the trend by checking the position of the DMI (+DI and -DI) lines.
Filter 2: Sideways Market (Chop Index Filter): This filter determines whether the market is excessively choppy or directionless. Using the Chop Index, this filter aims to protect against fakeouts by blocking trades when the market is highly indecisive.
Filter 3: Market Structure (Hurst Exponent Filter): This is one of the strategy's most advanced filters. It analyzes the current market behavior using the Hurst Exponent. This mathematical tool attempts to determine whether a market tends to trend (permanent), tends to revert to the mean (anti-permanent), or moves randomly. This filter ensures that signals are generated only when market structure supports trending trades.
4. Risk Management: Maximum Drawdown Protection
This strategy includes a built-in capital protection mechanism. Users can specify the percentage of their capital they will tolerate to decline from its peak. If the strategy's capital reaches this set drawdown limit, the protection feature is activated, closing all open positions and preventing new trades from being opened. This acts as an emergency brake to protect capital against unexpected market conditions.
5. Automation Ready: Customizable Webhook Alerts
The strategy is designed for traders who want to automate their signals. From the Settings menu, you can configure custom alert messages in JSON format, compatible with third-party automation services (via Webhooks).
6. Strategy Backtest Information
Please note that past performance is not indicative of future results. The published chart and performance report were generated on the 4-hour timeframe of the BTCUSD pair with the following settings:
Test Period: January 1, 2016 - October 31, 2025
Default Position Size: 15% of Capital
Pyramiding: Closed
Commission: 0.0008
Slippage: 2 ticks (Please enter the slippage you used in your own tests)
Testing Approach: The published test includes 423 trades and is statistically significant. It is strongly recommended that you test on different assets and timeframes for your own analysis. The default settings are a template and should be adjusted by the user for their own analysis.
Vandan V2Vandan V2 is an automated trend-following strategy for NASDAQ E-mini Futures (NQ1!).  
It uses multi-timeframe momentum and volatility filters to identify high-probability entries.  
Includes dynamic risk management and trailing logic optimized for intraday trading.
Mean Reversion Trading V1Overview
This is a simple mean reversion strategy that combines RSI, Keltner Channels, and MACD Histograms to predict reversals. Current parameters were optimized for NASDAQ 15M and performance varies depending on asset. The strategy can be optimized for specific asset and timeframe. 
 How it works 
Long Entry (All must be true): 
 1. RSI < Lower Threshold
 2. Close < Lower KC Band 
 3. MACD Histogram > 0 and rising 
 4. No open trades
Short Entry (All must be true): 
 1. RSI > Upper Threshold
 2. Close > Upper KC Band
 3. MACD Histogram < 0 and falling
 4. No open trades
Long Exit: 
 1. Stop Loss: Average position size x ( 1 - SL percent) 
 2. Take Profit: Average position size x ( 1 + TP percent) 
 3. MACD Histogram crosses below zero
Short Exit: 
 1. Stop Loss: Average position size x ( 1 + SL percent) 
 2. Take Profit: Average position size x ( 1 - TP percent) 
 3. MACD Histogram crosses above zero
Settings and parameters are explained in the tooltips. 
 Important 
Initial capital is set as 100,000 by default and 100 percent equity is used for trades 
FluxVector Liquidity Universal Trendline FluxVector Liquidity Trendline FFTL
 Summary in one paragraph 
FFTL is a single adaptive trendline for stocks ETFs FX crypto and indices on one minute to daily. It fires only when price action pressure and volatility curvature align. It is original because it fuses a directional liquidity pulse from candle geometry and normalized volume with realized volatility curvature and an impact efficiency term to modulate a Kalman like state without ATR VWAP or moving averages. Add it to a clean chart and use the colored line plus alerts. Shapes can move while a bar is open and settle on close. For conservative alerts select on bar close.
 Scope and intent 
• Markets. Major FX pairs index futures large cap equities liquid crypto top ETFs
• Timeframes. One minute to daily
• Default demo used in the publication. SPY on 30min
• Purpose. Reduce false flips and chop by gating the line reaction to noise and by using a one bar projection
• Limits. This is a strategy. Orders are simulated on standard candles only
 Originality and usefulness 
• Unique fusion. Directional Liquidity Pulse plus Volatility Curvature plus Impact Efficiency drives an adaptive gain for a one dimensional state
• Failure mode addressed. One or two shock candles that break ordinary trendlines and saw chop in flat regimes
• Testability. All windows and gains are inputs
• Portable yardstick. Returns use natural log units and range is bar high minus low
• Protected scripts. Not used. Method disclosed plainly here
 Method overview in plain language 
Base measures
• Return basis. Natural log of close over prior close. Average absolute return over a window is a unit of motion
 Components 
• Directional Liquidity Pulse DLP. Measures signed participation from body and wick imbalance scaled by normalized volume and variance stabilized
• Volatility Curvature. Second difference of realized volatility from returns highlights expansion or compression
• Impact Efficiency. Price change per unit range and volume boosts gain during efficient moves
• Energy score. Z scores of the above form a single energy that controls the state gain
• One bar projection. Current slope extended by one bar for anticipatory checks
 Fusion rule 
Weighted sum inside the energy score then logistic mapping to a gain between k min and k max. The state updates toward price plus a small flow push.
 Signal rule 
• Long suggestion and order when close is below trend and the one bar projection is above the trend
• Short suggestion and flip when close is above trend and the one bar projection is below the trend
• WAIT is implicit when neither condition holds
• In position states end on the opposite condition
 What you will see on the chart 
• Colored trendline teal for rising red for falling gray for flat
• Optional projection line one bar ahead
• Optional background can be enabled in code
• Alerts on price cross and on slope flips
 
Inputs with guidance 
Setup
• Price source. Close by default
Logic
• Flow window. Typical range 20 to 80. Higher smooths the pulse and reduces flips
• Vol window. Typical range 30 to 120. Higher calms curvature
• Energy window. Typical range 20 to 80. Higher slows regime changes
• Min gain and Max gain. Raise max to react faster. Raise min to keep momentum in chop
UI
• Show 1 bar projection. Colors for up down flat
 Properties visible in this publication 
• Initial capital 25000
• Base currency USD
• Commission percent 0.03
• Slippage 5
• Default order size method percent of equity value 3%
• Pyramiding 0
• Process orders on close off
• Calc on every tick off
• Recalculate after order is filled off
 Realism and responsible publication 
• No performance claims
• Intrabar reminder. Shapes can move while a bar forms and settle on close
• Strategy uses standard candles only
 Honest limitations and failure modes 
• Sudden gaps and thin liquidity can still produce fast flips
• Very quiet regimes reduce contrast. Use larger windows and lower max gain
• Session time uses the exchange time of the chart if you enable any windows later
• Past results never guarantee future outcomes
 Open source reuse and credits
 • None
HV Spike Strategy (HVP + OR Breakout + Reversal + TP/SL Modes)Here is a script that I tried to make it simple, although it has several parameters, I will try to explain, here we go:
Logic: Open Range Breakout: otherwise knows as First Candle Rule, usually used for the first candle in the opening of a market session, in my strategy there is an option to use it even for Crypto that operate 24/7, how to do that? Simply by detecting Volatility from the HVP (Historical Volatility Percentile). Then the ORB logic kicks in and the first candle with high volatility gives the ranges for the trades. The proper HVP Activation Threshold has to be selected for each currency pair/index/crypto in order to have maximum profit.
Enter a trade: when the price goes 100% above/below the First Candle Rule Range. That way it is filtering fake breakouts. Also if the price reverses back into the range the strategy takes the opposite trade.
Exit a trade: SL/TP By percentage or ATR, selection in the input menu.
My intention is to avoid using lagging indicators or guessing of Price Action, purely Bull/Bear indication by the first candle.
I hope you find this helpful! Wishing all successful Trades!
Bollinger Bands Breakout StrategyHey guys check out this strategy script.
Chart plotting:
I use a classic plot of Bollinger Bands to define a consolidation zone, I also use a separate Trend Filter (SMA).
Logic:
When the price is above the SMA and above the Bollinger Upper Band the strategy goes Long. When the price is below the SMA and below the Bollinger Lower Band the strategy goes Short. Simple.
Exits:
TP and SL are a percentage of the price.
Notes: This simple strategy can be used at any timeframe (I prefer the 15min for day trading). It avoids consolidation, when the price is inside the Bollinger Bands, and has a good success rate. Adjust the Length of the BB to suit your style of trading (Lower numbers=more volatile, Higher numbers=more restrictive). Also you can adjust the Trend Filter SMA, I presonally chose the 50 SMA. Finally the SL/TP can be also adjusted from the input menu.
Test it for yourself! 
Have great trades!
Squeeze Breakout Strategy [KedArc Quant]Description:
Squeeze Breakout strategy looks for volatility compression (Bollinger Bands inside Keltner Channels = a “squeeze”), then trades the volatility expansion in the direction of a momentum filter. 
🧠 How the “Squeeze → Expansion” works 
- Markets alternate between quiet (compressed) and active (expanded) phases.
- We call it a squeeze when Bollinger Bands (BB)—which reflect standard deviation around price—shrink inside the Keltner Channels (KC)—which reflect ATR/range.
- This means dispersion (stdev) is small relative to typical range (ATR). Price is coiling; participants are agreeing on value.
- When BB pops back outside KC, the squeeze releases. That’s the first sign that volatility is expanding again.
- A release alone doesn’t tell you direction. That’s why this strategy pairs the release with a momentum filter:
- We estimate momentum using a smoothed linear-regression slope of price (a clean proxy for acceleration).
- If the slope is positive at release, we favor longs; if negative, we favor shorts.
- Optionally, you can require Band Break + Momentum (price closes beyond the BB) for a stricter entry.
- This combination aims to capture the first leg of the range-to-trend transition while avoiding random pokes that often occur during tight consolidations.
💡 Why this is unique
 Two entry modes (toggle):
  1. Release + Momentum (enter when the squeeze turns off)
  2. Band Break + Momentum (enter on a close beyond BB with momentum)
 - Momentum = smoothed linear-regression slope, a clean thrust detector that’s less laggy than many oscillators.
 - Risk module included: ATR stop, optional 1R partial take-profit, and a Chandelier trailing stop for the runner.
 - Practical filters: higher-timeframe EMA trend alignment, volume surge, minimum BB width, and session window—so it adapts across markets/timeframes.
 - Backtest-ready: uses TradingView’s `strategy.` framework with commission/slippage controls.
📈 How it helps traders
✅Regime clarity: distinguishes compression vs. expansion so you’re not forcing trades during dead zones.
✅Objective entries: momentum + band logic reduces discretionary “feel” and late chases.
✅Built-in risk plan: stop/targets/trailing defined in inputs—consistent execution across tickers.
✅Adaptable: works across instruments/timeframes; filters let you tailor noise tolerance per market session.
✅Alerts: real-time signals for entry and squeeze release.
✅Not a Mash-Up / Original Work
✅Fully authored in Pine Script v6; no external libraries or copied logic blocks.
✅Uses well-known, documented formulas (BB, KC, ATR, LinReg slope) combined into a new rule set (two entry modes + momentum + structured exits).
✅Code and parameters are transparent and adjustable; the script stands alone.
🧩 Formulas (core)
Bollinger Bands
 # Basis = `SMA(close, bbLen)`
 # Upper/Lower = `Basis ± bbMult × stdev(close, bbLen)`
 # Width% = `(Upper − Lower) / Basis × 100`
Keltner Channels
 # Basis = `EMA(close, kcLen)`
 # Upper/Lower = `Basis ± kcMult × ATR(kcATR)`
Squeeze state
 # ON: `BB_Upper < KC_Upper` and `BB_Lower > KC_Lower`
 # Release: `squeeze_on ` and `not squeeze_on`
Momentum (this script)
 # `lin = linreg(close, momLen, 0)`
 # `mom = SMA( lin − lin , momSmoothing )`
 # Long bias when `mom > 0`; short bias when `mom < 0`.
⚙️ Inputs 
Compression
 `bbLen`, `bbMult` — BB length & std-dev multiplier
 `kcLen`, `kcATR`, `kcMult` — KC lengths & ATR multiplier
 `Entry Mode` — Release + Momentum, Band Break + Momentum, or Either
Momentum
 `momLen`, `momSmoothing`
Filters (optional)
 `Use HTF Trend Filter` + `HTF Timeframe` + `HTF EMA Length`
 `Require Volume Surge` (`volLen`, `volMult`)
 `Avoid Ultra-Low Vol` (`Min BB Width %`)
 `Session` window
Risk / Exits
 `ATR Length`, `ATR Stop Multiplier`
 `Take Profit at 1R` (with Partial 50%)
 `Chandelier` (`chLen`, `chMult`)
 Optional `Time Stop (bars)`
 🎯 Entry & Exit Rules
Entry (choose one mode):
1. Release + Momentum (default)
    Long: on the bar the squeeze releases and `mom > 0`, passing all enabled filters.
    Short: on the bar the squeeze releases and `mom < 0`, passing filters.
2. Band Break + Momentum
    Long: `close > BB_Upper` and `mom > 0`, with filters.
    Short: `close < BB_Lower` and `mom < 0`, with filters.
Initial Stop
 ATR-based: `Stop Distance = atrMult × ATR(atrLen)` from entry.
Targets & Runner
TP1 at 1R (optional): take 50% at `entry + 1R` (long) / `entry − 1R` (short).
Runner: remaining position trails a Chandelier stop:
Long trail = `highest(high, chLen) − chMult × ATR`
Short trail = `lowest(low, chLen) + chMult × ATR`
Optional Time Stop: close the trade after N bars in position.
Labels on chart
 “Long” / “Short” = entry signals.
 “L-TP1 / S-TP1” = partial exits at 1R.
 “L-Runner / S-Runner” = trailing-stop exits of the runner.
Alerts
 Provided for Long Entry, Short Entry, and Squeeze Release.
💬 How to use
1. Choose your market/timeframe (e.g., NSE 5–15m intraday, 60m–Daily for swing).
2. If you prefer cleaner trends, enable the HTF EMA filter (e.g., 240m/1D).
3. For intraday, consider Band Break + Momentum with Volume Surge and a small Min BB Width.
4. Adjust ATR/Chandelier multipliers to fit your risk tolerance and instrument.
Abbreviations
 BB – Bollinger Bands
 KC – Keltner Channels
 ATR – Average True Range
 SMA / EMA – Simple/Exponential Moving Average
 HTF – Higher Timeframe
 R – Risk unit (equal to the initial stop distance)
⚠️ Disclaimer
This script is for educational purposes only. Past performance ≠ future returns. Always paper trade first. Options trading carries high risk — manage exposure responsibly.
Adaptive Trend  1m ### Overview
The "Adaptive Trend Impulse Parallel SL/TP 1m Realistic" strategy is a sophisticated trading system designed specifically for high-volatility markets like cryptocurrencies on 1-minute timeframes. It combines trend-following with momentum filters and adaptive parameters to dynamically adjust to market conditions, ensuring more reliable entries and risk management. This strategy uses SuperTrend for primary trend detection, enhanced by MACD, RSI, Bollinger Bands, and optional volume spikes. It incorporates parallel stop-loss (SL) and multiple take-profit (TP) levels based on ATR, with options for breakeven and trailing stops after the first TP. Optimized for realistic backtesting on short timeframes, it avoids over-optimization by adapting indicators to market speed and efficiency.
### Principles of Operation
The strategy operates on the principle of adaptive impulse trading, where entry signals are generated only when multiple conditions align to confirm a strong trend reversal or continuation:
1. **Trend Detection (SuperTrend)**: The core signal comes from an adaptive SuperTrend indicator. It calculates upper and lower bands using ATR (Average True Range) with dynamic periods and multipliers. A buy signal occurs when the price crosses above the lower band (from a downtrend), and a sell signal when it crosses below the upper band (from an uptrend). Adaptation is based on Rate of Change (ROC) to measure market speed, shortening periods in fast markets for quicker responses.
2. **Momentum and Trend Filters**:
   - **MACD**: Uses adaptive fast and slow lengths. In "Trend Filter" mode (default when "Use MACD Cross" is false), it checks if the MACD line is above/below the signal for long/short. In cross mode, it requires a crossover/crossunder.
   - **RSI**: Adaptive period RSI must be above 50 for longs and below 50 for shorts, confirming overbought/oversold conditions dynamically.
   - **Bollinger Bands (BB)**: Depending on the mode ("Midline" by default), it requires the price to be above/below the BB midline for longs/shorts, or a breakout in "Breakout" mode. Deviation adapts to market efficiency.
   - **Volume Spike Filter** (optional): Entries require volume to exceed an adaptive multiple of its SMA, signaling strong impulse.
3. **Volatility Filter**: Entries are only allowed if current ATR percentage exceeds a historical minimum (adaptive), preventing trades in low-volatility ranges.
4. **Risk Management (Parallel SL/TP)**:
   - **Stop-Loss**: Set at an adaptive ATR multiple below/above entry for long/short.
   - **Take-Profits**: Three levels at adaptive ATR multiples, with partial position closures (e.g., 51% at TP1, 25% at TP2, remainder at TP3).
   - **Post-TP1 Features**: Optional breakeven moves SL to entry after TP1. Trailing SL uses BB midline as a dynamic trail.
   - All levels are calculated per trade using the ATR at entry, making them "realistic" for 1m charts by widening SL and tightening initial TPs.
The strategy enters long on buy signals with all filters met, and short on sell signals. It uses pyramid margin (100% long/short) for full position sizing.
Adaptation is driven by:
- **Market Speed (normSpeed)**: Based on ROC, tightens multipliers in volatile periods.
- **Efficiency Ratio (ER)**: Measures trend strength, adjusting periods for trending vs. ranging markets.
This ensures the strategy "adapts" without manual tweaks, reducing false signals in varying conditions.
### Main Advantages
- **Adaptability**: Unlike static strategies, parameters dynamically adjust to market volatility and trend strength, improving performance across ranging and trending phases without over-optimization.
- **Realistic Risk Management for 1m**: Wider SL and tiered TPs prevent premature stops in noisy short-term charts, while partial profits lock in gains early. Breakeven/trailing options protect profits in extended moves.
- **Multi-Filter Confirmation**: Combines trend, momentum, and volume for high-probability entries, reducing whipsaws. The volatility filter avoids flat markets.
- **Debug Visualization**: Built-in plots for signals, levels, and component checks (when "Show Debug" is enabled) help users verify logic on charts.
- **Efficiency**: Low computational load, suitable for real-time trading on TradingView with alerts.
Backtesting shows robust results on volatile assets, with a focus on sustainable risk (e.g., SL at 3x ATR avoids excessive drawdowns).
### Uniqueness
What sets this strategy apart is its **fully adaptive framework** integrating multiple indicators with real-time market metrics (ROC for speed, ER for efficiency). Most trend strategies use fixed parameters, leading to poor adaptation; here, every key input (periods, multipliers, deviations) scales dynamically within bounds, creating a "self-tuning" system. The "parallel SL/TP with 1m realism" adds custom handling for micro-timeframes: tightened initial TPs for quick wins and adaptive min-ATR filter to skip low-vol bars. Unlike generic mashups, it justifies the combination—SuperTrend for trend, MACD/RSI/BB for impulse confirmation, volume for conviction—working synergistically to capture "trend impulses" while filtering noise. The post-TP1 breakeven/trailing tied to BB adds a unique profit-locking mechanism not common in open-source scripts.
### Recommended Settings
These settings are optimized and recommended for trading ASTER/USDT on Bybit, with 1-minute chart, x10 leverage, and cross margin mode. They provide a balanced risk-reward for this volatile pair:
- **Base Inputs**:
  - Base ATR Period: 10
  - Base SuperTrend ATR Multiplier: 2.5
  - Base MACD Fast: 8
  - Base MACD Slow: 17
  - Base MACD Signal: 6
  - Base RSI Period: 9
  - Base Bollinger Period: 12
  - Bollinger Deviation: 1.8
  - Base Volume SMA Period: 19
  - Base Volume Spike Multiplier: 1.8
  - Adaptation Window: 54
  - ROC Length: 10
- **TP/SL Settings**:
  - Use Stop Loss: True
  - Base SL Multiplier (ATR): 3
  - Use Take Profits: True
  - Base TP1 Multiplier (ATR): 5.5
  - Base TP2 Multiplier (ATR): 10.5
  - Base TP3 Multiplier (ATR): 19
  - TP1 % Position: 51
  - TP2 % Position: 25
  - Breakeven after TP1: False
  - Trailing SL after TP1: False
  - Base Min ATR Filter: 0.001
  - Use Volume Spike Filter: True
  - BB Condition: Midline
  - Use MACD Cross (false=Trend Filter): True
  - Show Debug: True
For backtesting, use initial capital of 30 USD, base currency USDT, order size 100 USDT, pyramiding 1, commission 0.1%, slippage 0 ticks, long/short margin 0%.
Always backtest on your platform and use risk management—risk no more than 1-2% per trade. This is not financial advice; trade at your own risk.
Hyper SAR Reactor Trend StrategyHyperSAR Reactor Adaptive PSAR Strategy
 Summary 
Adaptive Parabolic SAR strategy for liquid stocks, ETFs, futures, and crypto across intraday to daily timeframes. It acts only when an adaptive trail flips and confirmation gates agree. Originality comes from a logistic boost of the SAR acceleration using drift versus ATR, plus ATR hysteresis, inertia on the trail, and a bear-only gate for shorts. Add to a clean chart and run on bar close for conservative alerts.
 Scope and intent 
• Markets: large cap equities and ETFs, index futures, major FX, liquid crypto
• Timeframes: one minute to daily
• Default demo: BTC on 60 minute
• Purpose: faster yet calmer PSAR that resists chop and improves short discipline
• Limits: this is a strategy that places simulated orders on standard candles
 Originality and usefulness 
• Novel fusion: PSAR AF is boosted by a logistic function of normalized drift, trail is monotone with inertia, entries use ATR buffers and optional cooldown, shorts are allowed only in a bear bias
• Addresses false flips in low volatility and weak downtrends
• All controls are exposed in Inputs for testability
• Yardstick: ATR normalizes drift so settings port across symbols
• Open source. No links. No solicitation
 Method overview 
Components
• Adaptive AF: base step plus boost factor times logistic strength
• Trail inertia: one sided blend that keeps the SAR monotone
• Flip hysteresis: price must clear SAR by a buffer times ATR
• Volatility gate: ATR over its mean must exceed a ratio
• Bear bias for shorts: price below EMA of length 91 with negative slope window 54
• Cooldown bars optional after any entry
• Visual SAR smoothing is cosmetic and does not drive orders
 Fusion rule 
Entry requires the internal flip plus all enabled gates. No weighted scores.
 Signal rule 
• Long when trend flips up and close is above SAR plus buffer times ATR and gates pass
• Short when trend flips down and close is below SAR minus buffer times ATR and gates pass
• Exit uses SAR as stop and optional ATR take profit per side
 Inputs with guidance 
Reactor Engine
• Start AF 0.02. Lower slows new trends. Higher reacts quicker
• Max AF 1. Typical 0.2 to 1. Caps acceleration
• Base step 0.04. Typical 0.01 to 0.08. Raises speed in trends
• Strength window 18. Typical 10 to 40. Drift estimation window
• ATR length 16. Typical 10 to 30. Volatility unit
• Strength gain 4.5. Typical 2 to 6. Steepness of logistic
• Strength center 0.45. Typical 0.3 to 0.8. Midpoint of logistic
• Boost factor 0.03. Typical 0.01 to 0.08. Adds to step when strength rises
• AF smoothing 0.50. Typical 0.2 to 0.7. Adds inertia to AF growth
• Trail smoothing 0.35. Typical 0.15 to 0.45. Adds inertia to the trail
• Allow Long, Allow Short toggles
 Trade Filters 
• Flip confirm buffer ATR 0.50. Typical 0.2 to 0.8. Raise to cut flips
• Cooldown bars after entry 0. Typical 0 to 8. Blocks re entry for N bars
• Vol gate length 30 and Vol gate ratio 1. Raise ratio to trade only in active regimes
• Gate shorts by bear regime ON. Bear bias window 54 and Bias MA length 91 tune strictness
 Risk 
• TP long ATR 1.0. Set to zero to disable
• TP short ATR 0.0. Set to 0.8 to 1.2 for quicker shorts
 Usage recipes 
Intraday trend focus
Confirm buffer 0.35 to 0.5. Cooldown 2 to 4. Vol gate ratio 1.1. Shorts gated by bear regime.
Intraday mean reversion focus
Confirm buffer 0.6 to 0.8. Cooldown 4 to 6. Lower boost factor. Leave shorts gated.
Swing continuation
Strength window 24 to 34. ATR length 20 to 30. Confirm buffer 0.4 to 0.6. Use daily or four hour charts.
 
Properties visible in this publication 
Initial capital 10000. Base currency USD. Order size Percent of equity 3. Pyramiding 0. Commission 0.05 percent. Slippage 5 ticks. Process orders on close OFF. Bar magnifier OFF. Recalculate after order filled OFF. Calc on every tick OFF. No security calls.
 
Realism and responsible publication 
No performance claims. Past results never guarantee future outcomes. Shapes can move while a bar forms and settle on close. Strategies execute only on standard candles.
 Honest limitations and failure modes 
High impact events and thin books can void assumptions. Gap heavy symbols may prefer longer ATR. Very quiet regimes can reduce contrast and invite false flips.
 Open source reuse and credits
 
Public domain building blocks used: PSAR concept and ATR. Implementation and fusion are original. No borrowed code from other authors.
 Strategy notice 
Orders are simulated on standard candles. No lookahead.
 Entries and exits 
Long: flip up plus ATR buffer and all gates true
Short: flip down plus ATR buffer and gates true with bear bias when enabled
Exit: SAR stop per side, optional ATR take profit, optional cooldown after entry
Tie handling: stop first if both stop and target could fill in one bar
Turtle Strategy - Triple EMA Trend with ADX and ATRDescription 
The Triple EMA Trend strategy is a directional momentum system built on the alignment of three exponential moving averages and a strong ADX confirmation filter. It is designed to capture established trends while maintaining disciplined risk management through ATR-based stops and targets.
 Core Logic 
The system activates only under high-trend conditions, defined by the Average Directional Index (ADX) exceeding a configurable threshold (default: 43).
A bullish setup occurs when the short-term EMA is above the mid-term EMA, which in turn is above the long-term EMA, and price trades above the fastest EMA.
A bearish setup is the mirror condition.
 Execution Rules 
Entry:
 • Long when ADX confirms trend strength and EMA alignment is bullish.
 • Short when ADX confirms trend strength and EMA alignment is bearish.
Exit:
 • Stop Loss: 1.8 × ATR below (for longs) or above (for shorts) the entry price.
 • Take Profit: 3.3 × ATR in the direction of the trade.
Both parameters are configurable.
 Additional Features 
 • Start/end date inputs for controlled backtesting.
 • Selective activation of long or short trades.
 • Built-in commission and position sizing (percent of equity).
 • Full visual representation of EMAs, ADX, stop-loss, and target levels.
This strategy emphasizes clean trend participation, strict entry qualification, and consistent reward-to-risk structure. Ideal for swing or medium-term testing across trending assets.
Fury by Tetrad  Fury by Tetrad 
What it is:
A rules-based Bollinger+RSI strategy that fades extremes: it looks for price stretching beyond Bollinger Bands while RSI confirms exhaustion, enters countertrend, then exits at predefined profit multipliers or optional stoploss. “Ultra Glow” visuals are purely cosmetic.
 How it works — logic at a glance
 Framework: Classic Bollinger Bands (SMA basis; configurable length & multiplier) + RSI (configurable length).
 Long entries:
  Price closes below the lower band and RSI < Long RSI threshold (default 28.3) → open LONG (subject to your “Market Direction” setting).
 Short entries:
  Price closes above the upper band and RSI > Short RSI threshold (default 88.4) → open SHORT.
 Profit exits (price targets):
  Uses simple multipliers of the strategy’s average entry price:
   Long exit = `entry × Long Exit Multiplier` (default 1.14).
   Short exit = `entry × Short Exit Multiplier` (default 0.915).
 Risk controls:
  Optional pricebased stoploss (disabled by default) via:
   Long stop = `entry × Long Stop Factor` (default 0.73).
   Short stop = `entry × Short Stop Factor` (default 1.05).
 Directional filter:
  “Market Direction” input lets you constrain entries to Market Neutral, Long Only, or Short Only.
 Visuals:
  “Ultra Glow” draws thin layered bands around upper/basis/lower; these do not affect signals.
> Note: Inputs exist for a timebased stop tracker in code, but this version exits via targets and (optional) price stop only.
 Why it’s different / original
 Explicit extreme + momentum pairing: Entries require simultaneous band breach and RSI exhaustion, aiming to avoid entries on gardenvariety volatility pokes.
 Deterministic exits: Multiplier-based targets keep results auditable and reproducible across datasets and assets.
 Minimal, unobtrusive visuals: Thin, layered glow preserves chart readability while communicating regime around the Bollinger structure.
 Inputs you can tune
 Bollinger: Length (default 205), Multiplier (default 2.2).
 RSI: Length (default 23), Long/Short thresholds (28.3 / 88.4).
 Targets: Long Exit Mult (1.14), Short Exit Mult (0.915).
 Stops (optional): Enable/disable; Long/Short Stop Factors (0.73 / 1.05).
 Market Direction: Market Neutral / Long Only / Short Only.
 Visuals: Ultra Glow on/off, light bar tint, trade labels on/off.
 How to use it
1. Timeframe & assets: Works on any symbol/timeframe; start with liquid majors and 60m–1D to establish baseline behavior, then adapt.
2. Calibrate thresholds:
    Narrow/meanreverting markets often tolerate tighter RSI thresholds.
    Fast/volatile markets may need wider RSI thresholds and stronger stop factors.
3. Pick realistic targets: The default multipliers are illustrative; tune them to reflect typical mean reversion distance for your instrument/timeframe (e.g., ATRinformed profiling).
4. Risk: If enabling stops, size positions so risk per trade ≤ 1–2% of equity (max 5–10% is a commonly cited upper bound).
5. Mode: Use Long Only or Short Only when your discretionary bias or higher timeframe model favors one side; otherwise Market Neutral.
 Recommended publication properties (for backtests that don’t mislead)
When you publish, set your strategy’s Properties to realistic values and keep them consistent with this description:
 Initial capital: 10,000 (typical retail baseline).
 Commission: ≥ 0.05% (adjust for your venue).
 Slippage: ≥ 2–3 ticks (or a conservative pertrade value).
 Position sizing: Avoid risking > 5–10% equity per trade; fixedfractional sizing ≤ 10% or fixedcash sizing is recommended.
 Dataset / sample size: Prefer symbols/timeframes yielding 100+ trades over the tested period for statistical relevance. If you deviate, say why.
> If you choose different defaults (e.g., capital, commission, slippage, sizing), explain and justify them here, and use the same settings in your publication.
 Interpreting results & limitations
 This is a countertrend approach; it can struggle in strong trends where band breaches compound.
 Parameter sensitivity is real: thresholds and multipliers materially change trade frequency and expectancy.
 No predictive claims: Past performance is not indicative of future results. The future is unknowable; treat outputs as decision support, not guarantees.
 Suggested validation workflow
Try different assets. (TSLA, AAPL, BTC, SOL, XRP)
 Run a walkforward across multiple years and market regimes.
 Test several timeframes and multiple instruments. (30m Suggested)
 Compare different commission/slippage assumptions.
 Inspect distribution of returns, max drawdown, win/loss expectancy, and exposure.
 Confirm behavior during trend vs. range segments.
 Alerts & automation
This release focuses on chart execution and visualization. If you plan to automate, create alerts at your entry/exit conditions and ensure your broker/venue fills reflect your slippage/fees assumptions.
 Disclaimer
This script is provided for educational and research purposes. It is not investment advice. Trading involves risk, including the possible loss of principal. © Tetrad Protocol.
Squeeze Backtest by Shaqi v2.0Script to backtest price squeeze's. Works on long and short directions
FirstStrike Long 200 - Daily Trend Rider [KedArc Quant]Strategy Description
FirstStrike Long 200 is a disciplined, long-only momentum strategy designed for daily "strike-first" entries in trending markets. It scans for RSI momentum above a customizable trigger (default 50), confirmed by EMA trend filters, and limits you to *exactly one trade per day* to avoid overtrading. It uses ATR for dynamic risk management (1.5x stop, 2:1 RR target) and optional trailing stops to ride winners. Backtested with realistic commissions and sizing, it prioritizes low drawdowns (<1% max in tests) over aggressive gains—ideal for swing traders seeking quality setups in bull runs.
Why It's Different from Other Strategies
Unlike generic RSI crossover bots or EMA ribbon mashups that spam signals and bleed in chop, FirstStrike enforces a "one-and-done" daily gate, blending precision momentum (RSI modes with grace/sustain) with robust filters (volume, sessions, rearm dips). 
How It Helps Traders
- Reduces Emotional Trading: One entry/day forces discipline—miss a setup? Wait for tomorrow. Perfect for busy pros avoiding screen fatigue.
- Adapts to Regimes: Switch modes for trends ("Cross+Grace") vs. ranges ("Any bar")—boosts win rates 5-10% in backtests on high-beta names like .
- Risk-First Design: ATR scales stops to vol  capping DD at 0.2% while targeting 2R winners. Trailing option locks +3-5% runs without early exits.
- Quick Insights: Labels/alerts flag entries with RSI values; bgcolor highlights signals for visual scanning. Helps spot "first-strike" edges in uptrends, filtering ~60% noise.
Why This Is Not a Mashup
This isn't a Frankenstein of off-the-shelf indicators—while it uses standard RSI/EMA/ATR (core Pine primitives), the innovation lies in:
- Custom Trigger Engine: Switchable modes (e.g., "Cross+Grace+Sustain" requires post-cross hold) prevent perpetual signals, unlike basic `ta.crossover()`.
- Daily Rearm Gate: Resets eligibility only after a dip (if enabled), tying momentum to mean-reversion—original logic not found in common scripts.
- Per-Day Isolation: `var` vars + `ta.change(time("D"))` ensure zero pyramiding/overlaps, beyond simple session filters.
All formulae are derived in-house for "first-strike" (early RSI pops in trends), not copied from public repos.
Input Configurations
Let's break down every input in the FirstStrike Long 200 strategy. These settings let you tweak the strategy like a dashboard—start with defaults for quick testing, 
then adjust based on your asset  or timeframe (5m for intraday).  They're grouped logically to keep things organized, and most have tooltips in the script for quick reminders.
RSI / Trigger Group: The Heart of Momentum Detection
This is where the magic starts—the strategy hunts for "upward energy" using RSI (Relative Strength Index), a tool that measures if a stock is overbought (too hot) or oversold (too cold) on a 0-100 scale. 
- RSI Length: How many bars (candles) back to calculate RSI. Default is 14, like a 14-day window for daily charts. Shorter (e.g., 9) makes it snappier for fast markets; longer (21) smooths out noise but misses quick turns.
- Trigger Level (RSI >= this): The key RSI value where the strategy says, "Go time!" Default 50 means enter when RSI crosses or holds above the neutral midline. Why is this trigger required? It acts as your "green light" filter—without it, you'd enter on every tiny price wiggle, leading to endless losers. RSI above this shows building buyer power, avoiding weak or sideways moves. It's essential for quality over quantity, especially in one-trade-per-day setups.
- Trigger Mode: Picks how strict the RSI signal must be. Options: "Cross only" (exact RSI crossover above trigger—super precise, fewer trades); "Cross+Grace" (crossover or within a grace window after—gives a second chance); "Cross+Grace+Sustain" (crossover/grace plus RSI holding steady for bars—best for steady climbs); "Any bar >= trigger" (looser, any bar above—more opportunities but riskier in chop). Start with "Any bar" for trends, switch to "Cross only" for caution.
- Grace Window (bars after cross): If mode allows, how many bars post-RSI-cross you can still enter if RSI dips but recovers. Default 30 (about 2.5 hours on 5m). Zero means no wiggle room—pure precision.
- Sustain Bars (RSI >= trigger): In sustain mode, how many straight bars RSI must stay above trigger. Default 3 ensures it's not a fluke spike.
- Require RSI Dip Below Rearm Before Any Entry?: A yes/no toggle. If on, the strategy "rearms" only after RSI dips below a low level (like a breather), preventing back-to-back signals in overextended rallies.
- Rearm Level (if requireDip=true): The dip threshold for rearming. Default 45—RSI must go below this to reset eligibility. Lower (30) for deeper pullbacks in volatile stocks.
For the trigger level itself, presets matter a lot—default 50 is neutral and versatile for broad trends. Bump to 55-60 for "strong momentum only" (fewer but higher-win trades, great in bull runs like tech surges); drop to 40-45 for "early bird" catches in recoveries (more signals but watch for fakes in ranges). The optimize hint (40-60) lets you test these in TradingView to match your risk—higher presets cut noise by 20-30% in backtests.
 Trend / Filters Group: Keeping You on the Right Side of the Market
These EMAs (Exponential Moving Averages) act like guardrails, ensuring you only long in uptrends.
- EMA (Fast) Confirmation: Short-term EMA for price action. Default 20 periods—price must be above this for "recent strength." Shorter (10) reacts faster to intraday pops.
- EMA (Trend Filter): Long-term EMA for big-picture trend. Default 200 (classic "above the 200-day" rule)—price above it confirms bull market. Minimum 50 to avoid over-smoothing.
 Optional Hour Window Group: Timing Your Strikes
Avoid bad hours like lunch lulls or after-hours tricks.
- Restrict by Session?: Yes/no for using exact market hours. Default off.
- Session (e.g., 0930-1600 for NYSE): Time string like "0930-1600" for open to close. Auto-skips pre/post-market noise.
- Restrict by Hour Range?: Fallback yes/no for simple hours. Default off.
- Start Hour / End Hour: Clock times (0-23). Defaults 9-15 ET—focus on peak volume.
 Volume Filter Group: No Volume, No Party
Confirms conviction—big moves need big participation.
- Require Volume > SMA?: Yes/no toggle. Default off—only fires on above-average volume.
- Volume SMA Length: Periods for the average. Default 20—compares current bar to recent norm.
 Risk / Exits Group: Protecting and Profiting Smartly
Dynamic stops based on volatility (ATR = Average True Range) keep things realistic.
- ATR Length: Bars for ATR calc. Default 14—measures recent "wiggle room" in price.
- ATR Stop Multiplier: How far below entry for stop-loss. Default 1.5x ATR—gives breathing space without huge risk
- Take-Profit R Multiple: Reward target as multiple of risk. Default 2.0 (2:1 ratio)—aims for twice your stop distance.
- Use Trailing Stop?: Yes/no for profit-locking trail. Default off—activates after entry.
- Trailing ATR Multiplier: Trail distance. Default 2.0x ATR—looser than initial stop to let winners run.
These inputs make the strategy plug-and-play: Defaults work out-of-box for trending stocks, but tweak RSI trigger/modes first for your style. 
Always backtest changes—small shifts can flip a 40% win rate to 50%+!
Outputs (Visuals & Alerts):
- Plots: Blue EMA200 (trend line), Orange EMA20 (price filter), Green dashed entry price.
- Labels: Green "LONG" arrow with RSI value on entries.
- Background: Light green highlight on signal bars.
- Alerts: "FirstStrike Long Entry" fires on conditions (integrates with TradingView notifications).
 Entry-Exit Logic
Entry (Long Only, One Per Day):
1. Daily Reset: New day clears trade gate and (if required) rearm status.
2. Filters Pass: Time/session OK + Close > EMA200 (trend) + Close > EMA20 (price) + Volume > SMA (if enabled) + Rearmed (dip below rearm if toggled).
3. Trigger Fires: RSI >= trigger via selected mode (e.g., crossover + grace window).
4. Execute: Enter long at close; set daily flag to block repeats.
Exit:
- Stop-Loss: Entry - (ATR * 1.5) – dynamic, vol-scaled.
- Take-Profit: Entry + (Risk * 2.0) – fixed RR.
- Trailing (Optional): Activates post-entry; trails at Close - (ATR * 2.0), updating on each bar for trend extension.
No shorts or hedging—pure long bias.
 Formulae Used
- RSI: `ta.rsi(close, rsiLen)` – Standard 14-period momentum oscillator (0-100).
- EMAs: `ta.ema(close, len)` – Exponential moving averages for trend/price filters.
- ATR: `ta.atr(atrLen)` – True range average for stop sizing: Stop = Entry - (ATR * mult).
- Volume SMA: `ta.sma(volume, volLen)` – Simple average for relative strength filter.
- Grace Window: `bar_index - lastCrossBarIndex <= graceBars` – Counts bars since RSI crossover.
- Sustain: `ta.barssince(rsi < trigger) >= sustainBars` – Consecutive bars above threshold.
- Session Check: `time(timeframe.period, sessionStr) != 0` – TradingView's built-in session validator.
- Risk Distance: `riskPS = entry - stop; TP = entry + (riskPS * RR)` – Asymmetric reward calc.
 FAQ
Q: Why only one trade/day?  
A: Prevents revenge trading in volatile sessions . Backtests show it cuts losers by 20-30% vs. multi-entry bots.
Q: Does it work on all assets/timeframes?  
A: Best for trending stocks/indices  on 5m-1H. Test on crypto/forex with wider ATR mult (2.0+).
Q: How to optimize?  
A: Use TradingView's optimizer on RSI trigger (40-60) and EMA fast (10-30). Aim for PF >1.0 over 1Y data.
Q: Alerts don't fire—why?  
A: Ensure `alertcondition` is enabled in script settings. Test with "Any alert() function calls only."
Q: Trailing stop too loose?  
A: Tune `trailMult` to 1.5 for tighter; it activates alongside fixed TP/SL for hybrid protection.
 Glossary
- Grace Window: Post-RSI-cross period (bars) where entry still allowed if RSI holds trigger.
- Rearm Dip: Optional pullback below a low RSI level (e.g., 45) to "reset" eligibility after signals.
- Profit Factor (PF): Gross profit / gross loss—>1.0 means winners outweigh losers.
- R Multiple: Risk units (e.g., 2R = 2x stop distance as target).
- Sustain Bars: Consecutive bars RSI stays >= trigger for mode confirmation.
 Recommendations
- Backtest First: Run on your symbols (/) over 6-12M; tweak RSI to 55 for +5% win rate.
- Live Use: Start paper trading with `useSession=true` and `useVol=true` to filter noise.
- Pairs Well With: Higher TF (daily) for bias; add ADX (>25) filter for strong trends (code snippet in prior chats).
- Risk Note: 10% sizing suits $100k+ accounts; scale down for smaller. Not financial advice—past performance ≠ future.
- Publish Tip: Add tags like "momentum," "RSI," "long-only" on TradingView for visibility.
Strategy Properties & Backtesting Setup
FirstStrike Long 200 is configured with conservative, realistic backtesting parameters to ensure reliable performance simulations. These settings prioritize capital preservation and transparency, making it suitable for both novice and experienced traders testing on stocks.
 Initial Capital      
	$100,000       Standard starting equity for portfolio-level testing; scales well for retail accounts. Adjust lower (e.g., $10k) for smaller simulations. 
 Base Currency         
	Default (USD)  Aligns with most US equities (e.g., NASDAQ symbols); auto-converts for other assets. 
 Order Size            
	1 (Quantity)   Fixed share contracts for simplicity—e.g., buys 1 share per trade. For % of equity, switch to "Percent of Equity" in strategy code. 
 Pyramiding            
	0 Orders       No additional entries on open positions; enforces strict one-trade-per-day discipline to avoid overexposure. 
 Commission            
	0.1%           Realistic broker fee (e.g., Interactive Brokers tier); factors in round-trip costs without over-penalizing winners. 
 Verify Price for Limit Orders  
	0 Ticks  No slippage delay on TPs—assumes ideal fills for historical accuracy. 
 Slippage              
	0 Ticks        Zero assumed slippage for clean backtests; real-world trading may add 1-2 ticks on volatile opens. 
These defaults yield low drawdowns (<0.3% max in tests) while capturing trend edges. For live trading, enable slippage (1-3 ticks) to mimic execution gaps. Always forward-test before deploying!
⚠️ Disclaimer 
This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.
Universal Breakout Strategy [KedArc Quant]Description:
A flexible breakout framework where you can test different logics (Prev Day, Bollinger, Volume, ATR, EMA Trend, RSI Confirm, Candle Confirm, Time Filter) under one system.
Choose your breakout mode, and the strategy will handle entries, exits, and optional risk management (ATR stops, take-profits, daily loss guard, cooldowns). 
An on-chart info table shows live mode values (like Prev High/Low, Bollinger levels, RSI, etc.) plus P&L stats for quick analysis.
Use it to compare which breakout style works best on your instrument and timeframe, whether intraday, swing, or positional trading
 🔑 Why it’s useful
* Flexibility: Switch between breakout strategies without loading different indicators.
* Clarity: On-chart info table displays current mode, relevant indicator levels, and live strategy P&L stats.
* Testing efficiency: Quickly A/B test different breakout styles under the same backtest environment.
* Transparency: Every trade is rule-based and displayed with entry/exit markers.
 🚀 How it helps traders
* Lets you experiment with breakout strategies quickly without loading multiple scripts.
* Helps identify which breakout method fits your instrument & timeframe.
* Gives clear on-chart visual + statistical feedback for confident decision-making.
 ⚙️ Input Configuration
* Breakout Mode → choose which strategy to test:
  * *Prev Day* → breakouts of yesterday’s High/Low.
  * *Bollinger* → Upper/Lower BB pierce.
  * *Volume* → Breakout confirmed with volume above average.
  * *ATR Stop* → Wide range breakout using ATR filter.
  * *Time Filter* → Breakouts inside defined session hours.
  * *EMA Trend* → Breakouts only in EMA fast > slow alignment.
  * *RSI Confirm* → Breakouts with RSI confirmation (e.g. >55 for longs).
  * *Candle Confirm* → Breakouts validated by bullish/bearish candle.
* Lookback / ATR / Bollinger inputs → adjust sensitivity.
* Intrabar mode → option to evaluate breakouts using bar highs/lows instead of closes.
* Table options → show/hide info table, show/hide P&L stats, choose corner placement.
 📈 Entry & Exit Logic
* Entry → occurs when breakout condition of chosen mode is met.
* Exit → default exits via opposite signals or optional stop/target if enabled.
* Session filter → optional auto-flat at session end.
* P&L management → optional daily loss guard, cooldown between trades, and ATR-based stop/take profit.
 ❓ FAQ — Choosing the best setup
Q: Which strategy should I use for which chart?
* *Prev Day Breakouts*: Best on indices, FX, and liquid futures with strong daily levels.
* *Bollinger*: Works well in range-bound environments, or crypto pairs with volatility compression.
* *Volume*: Good on equities where breakout strength is tied to volume spikes.
* *ATR Stop*: Suits volatile instruments (commodities, crypto).
* *EMA Trend*: Useful in trending markets (stocks, indices).
* *RSI Confirm*: Adds momentum filter, better for swing trades.
* *Candle Confirm*: Ideal for scalpers needing visual confirmation.
* *Time Filter*: For intraday traders who want signals only in high-liquidity sessions.
Q: What timeframe should I use?
* Intraday traders → 5m to 15m (Time Filter, Candle Confirm).
* Swing traders → 1H to 4H (EMA Trend, RSI Confirm, ATR Stop).
* Position traders → Daily (Prev Day, Bollinger).
* Breakout
	A trade entry condition triggered when price crosses above a resistance level (for longs) or below a support level (for shorts).
* Prev Day High/Low
	Formula:
	Prev High = High of (Day )
	Prev Low = Low of (Day )
* Bollinger Bands
	Formula:
	Basis = SMA(Close, Length)
	Upper Band = Basis + (Multiplier × StdDev(Close, Length))
	Lower Band = Basis – (Multiplier × StdDev(Close, Length))
* Volume Confirmation
	A breakout is only valid if:
	Volume > SMA(Volume, Length)
* ATR (Average True Range)
	Measures volatility.
	
	Formula:
	ATR = SMA(True Range, Length)
	where True Range = max(High–Low, |High–Close |, |Low–Close |)
* EMA (Exponential Moving Average)
	Weighted moving average giving more weight to recent prices.
	Formula:
	EMA = (Price × α) + (EMA  × (1–α))
	with α = 2 / (Length + 1)
* RSI (Relative Strength Index)
	
	Momentum oscillator scaled 0–100.
	
	Formula:
	RSI = 100 – (100 / (1 + RS))
	where RS = Avg(Gain, Length) ÷ Avg(Loss, Length)
* Candle Confirmation
	
	Bullish candle: Close > Open AND Close > Close 
	Bearish candle: Close < Open AND Close < Close 
	Win Rate (%)
	Formula:
	Win Rate = (Winning Trades ÷ Total Trades) × 100
* Average Trade P&L
	Formula:
	Avg Trade = Net Profit ÷ Total Trades
📊 Performance Notes
	The Universal Breakout Strategy is designed as a framework rather than a single-asset optimized system. Results will vary depending on the chart, timeframe, and asset chosen.
	On the current defaults (15-minute, INR-denominated example), the backtest produced 132 trades over the selected period. This provides a statistically sufficient sample size.
	Win rate (~35%) is relatively low, but this is balanced by a positive reward-to-risk ratio (~1.8). In practice, a lower win rate with larger wins versus smaller losses is sustainable.
	The average P&L per trade is close to breakeven under default settings. This is expected, as the strategy is not tuned for a single symbol but offered as a universal breakout framework.
	Commissions (0.1%) and slippage (1 tick) are included in the simulation, ensuring realistic conditions.
	Risk management is conservative, with order sizing set at 1 unit per trade. This avoids over-leveraging and keeps exposure well under the 5-10% equity risk guideline.
👉 Traders are encouraged to:
	Experiment with inputs such as ATR period, breakout length, or Bollinger parameters.
	Test across different timeframes and instruments (equities, futures, forex, crypto) to find optimal setups.
	Combine with filters (trend direction, volatility regimes, or volume conditions) for further refinement.
⚠️ Disclaimer This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.
Intraday Momentum for Volatile Stocks 29.09The strategy targets intraday momentum breakouts in volatile stocks when the broader market (Nifty) is in an uptrend. It enters long positions when stocks move significantly above their daily opening price with sufficient volume confirmation, then manages the trade using dynamic ATR-based stops and profit targets.
Entry Conditions
Price Momentum Filter: The stock must move at least 2.5% above its daily opening price, indicating strong bullish momentum. This percentage threshold is customizable and targets gap-up scenarios or strong intraday breakouts.
Volume Confirmation: Daily cumulative volume must exceed the 20-day average volume, ensuring institutional participation and genuine momentum. This prevents false breakouts on low volume.
Market Regime Filter: The Nifty index must be trading above its 50-day SMA, indicating a favorable market environment for momentum trades. This macro filter helps avoid trades during bearish market conditions.
Money Flow Index: MFI must be above 50, confirming buying pressure and positive money flow into the stock. This adds another layer of momentum confirmation.
Time Restriction: Trades are only initiated before 3:00 PM to ensure sufficient time for position management and avoid end-of-day volatility.
Exit Management
ATR Trailing Stop Loss: Uses a 3x ATR multiplier for dynamic stop-loss placement that trails higher highs, protecting profits while giving trades room to breathe. The trailing mechanism locks in gains as the stock moves favorably.
Profit Target: Set at 4x ATR above the entry price, providing a favorable risk-reward ratio based on the stock's volatility characteristics. This adaptive approach adjusts targets based on individual stock behavior.
Position Reset: Both stops and targets reset when not in a position, ensuring fresh calculations for each new trade.
Key Strengths
Volatility Adaptation: The ATR-based approach automatically adjusts risk parameters to match current market volatility levels. Higher volatility stocks get wider stops, while calmer stocks get tighter management.
Multi-Timeframe Filtering: Combines intraday price action with daily volume patterns and market regime analysis for robust signal generation.
Risk Management Focus: The strategy prioritizes capital preservation through systematic stop-loss placement and position sizing considerations.
Considerations for NSE Trading
This strategy appears well-suited for NSE intraday momentum trading, particularly for mid-cap and small-cap stocks that exhibit high volatility. The Nifty filter helps align trades with broader market sentiment, which is crucial in the Indian market context where sectoral and index movements strongly influence individual stocks.
The 2.5% threshold above open price is appropriate for volatile NSE stocks, though traders might consider adjusting this parameter based on the specific stocks being traded. The strategy's emphasis on volume confirmation is particularly valuable in the NSE environment where retail participation can create misleading price movements without institutional backin
简单KDJ80策略 - testIt's only a test of sth big.
Next step will be adding complex strategy with bollinger band and keltner channel.
RSI Momentum ScalperOverview
The "RSI Momentum Scalper" is a Pine Script v5 strategy crafted for trading highly volatile markets, with a special focus on newly listed cryptocurrencies. This strategy harnesses the Relative Strength Index (RSI) alongside volume analysis and momentum thresholds to pinpoint short-term trading opportunities. It supports both long and short trades, managed with customizable take profit, stop loss, and trailing stop levels, which are visually plotted on the chart for easy tracking.
Why I Created This Strategy
I developed the "RSI Momentum Scalper" because I was seeking a reliable trading strategy tailored to newly listed, highly volatile cryptocurrencies. These assets often experience rapid price fluctuations, rendering traditional strategies less effective. I aimed to create a tool that could exploit momentum and volume spikes while managing risk through adaptable exit parameters. This strategy is designed to address that need, offering a flexible approach for traders in dynamic crypto markets.
How It Works
The strategy utilizes RSI to identify momentum shifts, combined with volume confirmation, to trigger long or short entries. Trades are controlled with take profit, stop loss, and trailing stop levels, which adjust dynamically as the price moves in your favor. The trailing stop helps lock in profits, while the plotted exit levels provide clear visual cues for trade management.
Customizable Settings
The script is highly customizable, allowing you to adjust it to various market conditions and trading styles. Here’s a brief overview of the key settings:
Trade Mode: Select "Both," "Long Only," or "Short Only" to determine the trade direction.
(Default: Both)
RSI Length: Sets the lookback period for the RSI calculation (2 to 30).
(Default: 8)
A shorter length increases RSI sensitivity, suitable for volatile assets.
RSI Overbought: Defines the upper RSI threshold (60 to 99) for short entries.
(Default: 90)
Higher values signal stronger overbought conditions.
RSI Oversold: Defines the lower RSI threshold (1 to 40) for long entries.
(Default: 10)
Lower values indicate stronger oversold conditions.
RSI Momentum Threshold: Sets the minimum RSI momentum change (1 to 15) to trigger entries.
(Default: 14)
Adjusts the sensitivity to price momentum.
Volume Multiplier: Multiplies the volume moving average to filter high-volume bars (1.0 to 3.0).
(Default: 1)
Higher values require stronger volume confirmation.
Volume MA Length: Sets the lookback period for the volume moving average (5 to 50).
(Default: 13)
Influences the volume trend sensitivity.
Take Profit %: Sets the profit target as a percentage of the entry price (0.1 to 10.0).
(Default: 4.15)
Determines when to close a winning trade.
Stop Loss %: Sets the loss limit as a percentage of the entry price (0.1 to 6.0).
(Default: 1.85)
Protects against significant losses.
Trailing Stop %: Sets the trailing stop distance as a percentage (0.1 to 4.0).
(Default: 2.55)
Locks in profits as the price moves favorably.
Visual Features
Exit Levels: Take profit (green), fixed stop loss (red), and trailing stop (orange) levels are plotted when in a position.
Performance Table: Displays win rate, total trades, and net profit in the top-right corner.
How to Use
Add the strategy to your chart in TradingView.
Adjust the input settings based on the cryptocurrency and timeframe you’re trading.
Monitor the plotted exit levels for trade management.
Use the performance table to assess the strategy’s performance over time.
Notes
Test the strategy on a demo account or with historical data before live trading.
The strategy is optimized for short-term scalping; adjust settings for longer timeframes if needed.
BOCS Channel Scalper Strategy - Automated Mean Reversion System# BOCS Channel Scalper Strategy - Automated Mean Reversion System 
 ## WHAT THIS STRATEGY DOES: 
This is an automated mean reversion trading strategy that identifies consolidation channels through volatility analysis and executes scalp trades when price enters entry zones near channel boundaries. Unlike breakout strategies, this system assumes price will revert to the channel mean, taking profits as price bounces back from extremes. Position sizing is fully customizable with three methods: fixed contracts, percentage of equity, or fixed dollar amount. Stop losses are placed just outside channel boundaries with take profits calculated either as fixed points or as a percentage of channel range.
 ## KEY DIFFERENCE FROM ORIGINAL BOCS: 
**This strategy is designed for traders seeking higher trade frequency.** The original BOCS indicator trades breakouts OUTSIDE channels, waiting for price to escape consolidation before entering. This scalper version trades mean reversion INSIDE channels, entering when price reaches channel extremes and betting on a bounce back to center. The result is significantly more trading opportunities:
- **Original BOCS**: 1-3 signals per channel (only on breakout)
- **Scalper Version**: 5-15+ signals per channel (every touch of entry zones)
- **Trade Style**: Mean reversion vs trend following
- **Hold Time**: Seconds to minutes vs minutes to hours
- **Best Markets**: Ranging/choppy conditions vs trending breakouts
This makes the scalper ideal for active day traders who want continuous opportunities within consolidation zones rather than waiting for breakout confirmation. However, increased trade frequency also means higher commission costs and requires tighter risk management.
 ## TECHNICAL METHODOLOGY: 
 ### Price Normalization Process: 
The strategy normalizes price data to create consistent volatility measurements across different instruments and price levels. It calculates the highest high and lowest low over a user-defined lookback period (default 100 bars). Current close price is normalized using: (close - lowest_low) / (highest_high - lowest_low), producing values between 0 and 1 for standardized volatility analysis.
 ### Volatility Detection: 
A 14-period standard deviation is applied to the normalized price series to measure price deviation from the mean. Higher standard deviation values indicate volatility expansion; lower values indicate consolidation. The strategy uses ta.highestbars() and ta.lowestbars() to identify when volatility peaks and troughs occur over the detection period (default 14 bars).
 ### Channel Formation Logic: 
When volatility crosses from a high level to a low level (ta.crossover(upper, lower)), a consolidation phase begins. The strategy tracks the highest and lowest prices during this period, which become the channel boundaries. Minimum duration of 10+ bars is required to filter out brief volatility spikes. Channels are rendered as box objects with defined upper and lower boundaries, with colored zones indicating entry areas.
 ### Entry Signal Generation: 
The strategy uses immediate touch-based entry logic. Entry zones are defined as a percentage from channel edges (default 20%):
- **Long Entry Zone**: Bottom 20% of channel (bottomBound + channelRange × 0.2)
- **Short Entry Zone**: Top 20% of channel (topBound - channelRange × 0.2)
Long signals trigger when candle low touches or enters the long entry zone. Short signals trigger when candle high touches or enters the short entry zone. This captures mean reversion opportunities as price reaches channel extremes.
 ### Cooldown Filter: 
An optional cooldown period (measured in bars) prevents signal spam by enforcing minimum spacing between consecutive signals. If cooldown is set to 3 bars, no new long signal will fire until 3 bars after the previous long signal. Long and short cooldowns are tracked independently, allowing both directions to signal within the same period.
 ### ATR Volatility Filter: 
The strategy includes a multi-timeframe ATR filter to avoid trading during low-volatility conditions. Using request.security(), it fetches ATR values from a specified timeframe (e.g., 1-minute ATR while trading on 5-minute charts). The filter compares current ATR to a user-defined minimum threshold:
- If ATR ≥ threshold: Trading enabled
- If ATR < threshold: No signals fire
This prevents entries during dead zones where mean reversion is unreliable due to insufficient price movement.
 ### Take Profit Calculation: 
Two TP methods are available:
 **Fixed Points Mode**:  
- Long TP = Entry + (TP_Ticks × syminfo.mintick)
- Short TP = Entry - (TP_Ticks × syminfo.mintick)
 **Channel Percentage Mode**: 
- Long TP = Entry + (ChannelRange × TP_Percent)
- Short TP = Entry - (ChannelRange × TP_Percent)
Default 50% targets the channel midline, a natural mean reversion target. Larger percentages aim for opposite channel edge.
 ### Stop Loss Placement:
 Stop losses are placed just outside the channel boundary by a user-defined tick offset:
- Long SL = ChannelBottom - (SL_Offset_Ticks × syminfo.mintick)
- Short SL = ChannelTop + (SL_Offset_Ticks × syminfo.mintick)
This logic assumes channel breaks invalidate the mean reversion thesis. If price breaks through, the range is no longer valid and position exits.
 ### Trade Execution Logic: 
When entry conditions are met (price in zone, cooldown satisfied, ATR filter passed, no existing position):
1. Calculate entry price at zone boundary
2. Calculate TP and SL based on selected method
3. Execute strategy.entry() with calculated position size
4. Place strategy.exit() with TP limit and SL stop orders
5. Update info table with active trade details
The strategy enforces one position at a time by checking strategy.position_size == 0 before entry.
 ### Channel Breakout Management: 
Channels are removed when price closes more than 10 ticks outside boundaries. This tolerance prevents premature channel deletion from minor breaks or wicks, allowing the mean reversion setup to persist through small boundary violations.
 ### Position Sizing System: 
Three methods calculate position size:
 **Fixed Contracts**:  
- Uses exact contract quantity specified in settings
- Best for futures traders (e.g., "trade 2 NQ contracts")
 **Percentage of Equity**: 
- position_size = (strategy.equity × equity_pct / 100) / close
- Dynamically scales with account growth
 **Cash Amount**: 
- position_size = cash_amount / close  
- Maintains consistent dollar exposure regardless of price
 ## INPUT PARAMETERS: 
 ### Position Sizing: 
- **Position Size Type**: Choose Fixed Contracts, % of Equity, or Cash Amount
- **Number of Contracts**: Fixed quantity per trade (1-1000)
- **% of Equity**: Percentage of account to allocate (1-100%)
- **Cash Amount**: Dollar value per position ($100+)
 ### Channel Settings: 
- **Nested Channels**: Allow multiple overlapping channels vs single channel
- **Normalization Length**: Lookback for high/low calculation (1-500, default 100)
- **Box Detection Length**: Period for volatility detection (1-100, default 14)
 ### Scalping Settings: 
- **Enable Long Scalps**: Toggle long entries on/off
- **Enable Short Scalps**: Toggle short entries on/off
- **Entry Zone % from Edge**: Size of entry zone (5-50%, default 20%)
- **SL Offset (Ticks)**: Distance beyond channel for stop (1+, default 5)
- **Cooldown Period (Bars)**: Minimum spacing between signals (0 = no cooldown)
 ### ATR Filter: 
- **Enable ATR Filter**: Toggle volatility filter on/off
- **ATR Timeframe**: Source timeframe for ATR (1, 5, 15, 60 min, etc.)
- **ATR Length**: Smoothing period (1-100, default 14)
- **Min ATR Value**: Threshold for trade enablement (0.1+, default 10.0)
 ### Take Profit Settings: 
- **TP Method**: Choose Fixed Points or % of Channel
- **TP Fixed (Ticks)**: Static distance in ticks (1+, default 30)
- **TP % of Channel**: Dynamic target as channel percentage (10-100%, default 50%)
 ### Appearance: 
- **Show Entry Zones**: Toggle zone labels on channels
- **Show Info Table**: Display real-time strategy status
- **Table Position**: Corner placement (Top Left/Right, Bottom Left/Right)
- **Color Settings**: Customize long/short/TP/SL colors
 ## VISUAL INDICATORS: 
- **Channel boxes** with semi-transparent fill showing consolidation zones
- **Colored entry zones** labeled "LONG ZONE ▲" and "SHORT ZONE ▼"
- **Entry signal arrows** below/above bars marking long/short entries
- **Active TP/SL lines** with emoji labels (⊕ Entry, 🎯 TP, 🛑 SL)
- **Info table** showing position status, channel state, last signal, entry/TP/SL prices, and ATR status
 ## HOW TO USE: 
### For 1-3 Minute Scalping (NQ/ES):
- ATR Timeframe: "1" (1-minute)
- ATR Min Value: 10.0 (for NQ), adjust per instrument
- Entry Zone %: 20-25%
- TP Method: Fixed Points, 20-40 ticks
- SL Offset: 5-10 ticks
- Cooldown: 2-3 bars
- Position Size: 1-2 contracts
 ### For 5-15 Minute Day Trading: 
- ATR Timeframe: "5" or match chart
- ATR Min Value: Adjust to instrument (test 8-15 for NQ)
- Entry Zone %: 20-30%
- TP Method: % of Channel, 40-60%
- SL Offset: 5-10 ticks
- Cooldown: 3-5 bars
- Position Size: Fixed contracts or 5-10% equity
 ### For 30-60 Minute Swing Scalping: 
- ATR Timeframe: "15" or "30"
- ATR Min Value: Lower threshold for broader market
- Entry Zone %: 25-35%
- TP Method: % of Channel, 50-70%
- SL Offset: 10-15 ticks
- Cooldown: 5+ bars or disable
- Position Size: % of equity recommended
 ## BACKTEST CONSIDERATIONS: 
- Strategy performs best in ranging, mean-reverting markets
- Strong trending markets produce more stop losses as price breaks channels
- ATR filter significantly reduces trade count but improves quality during low volatility
- Cooldown period trades signal quantity for signal quality
- Commission and slippage materially impact sub-5-minute timeframe performance
- Shorter timeframes require tighter entry zones (15-20%) to catch quick reversions
- % of Channel TP adapts better to varying channel sizes than fixed points
- Fixed contract sizing recommended for consistent risk per trade in futures
 **Backtesting Parameters Used**:  This strategy was developed and tested using realistic commission and slippage values to provide accurate performance expectations. Recommended settings: Commission of $1.40 per side (typical for NQ futures through discount brokers), slippage of 2 ticks to account for execution delays on fast-moving scalp entries. These values reflect real-world trading costs that active scalpers will encounter. Backtest results without proper cost simulation will significantly overstate profitability.
 ## COMPATIBLE MARKETS: 
Works on any instrument with price data including stock indices (NQ, ES, YM, RTY), individual stocks, forex pairs (EUR/USD, GBP/USD), cryptocurrency (BTC, ETH), and commodities. Volume-based features require data feed with volume information but are optional for core functionality.
 ## KNOWN LIMITATIONS: 
- Immediate touch entry can fire multiple times in choppy zones without adequate cooldown
- Channel deletion at 10-tick breaks may be too aggressive or lenient depending on instrument tick size
- ATR filter from lower timeframes requires higher-tier TradingView subscription (request.security limitation)
- Mean reversion logic fails in strong breakout scenarios leading to stop loss hits
- Position sizing via % of equity or cash amount calculates based on close price, may differ from actual fill price
- No partial closing capability - full position exits at TP or SL only
- Strategy does not account for gap openings or overnight holds
 ## RISK DISCLOSURE: 
Trading involves substantial risk of loss. Past performance does not guarantee future results. This strategy is for educational purposes and backtesting only. Mean reversion strategies can experience extended drawdowns during trending markets. Stop losses may not fill at intended levels during extreme volatility or gaps. Thoroughly test on historical data and paper trade before risking real capital. Use appropriate position sizing and never risk more than you can afford to lose. Consider consulting a licensed financial advisor before making trading decisions. Automated trading systems can malfunction - monitor all live positions actively.
 ## 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. The core channel formation logic using normalized price standard deviation is AlgoAlpha's original contribution to the TradingView community.
Enhancements to the original concept include: mean reversion entry logic (vs breakout), immediate touch-based signals, multi-timeframe ATR volatility filtering, flexible position sizing (fixed/percentage/cash), cooldown period filtering, dual TP methods (fixed points vs channel percentage), automated strategy execution with exit management, and real-time position monitoring table.
AVGO Advanced Day Trading Strategy📈 Overview
The AVGO Advanced Day Trading Strategy is a comprehensive, multi-timeframe trading system designed for active day traders seeking consistent performance with robust risk management. Originally optimized for AVGO (Broadcom), this strategy adapts well to other liquid stocks and can be customized for various trading styles.
🎯 Key Features
Multiple Entry Methods
 
 EMA Crossover: Classic trend-following signals using fast (9) and medium (16) EMAs
 MACD + RSI Confluence: Momentum-based entries combining MACD crossovers with RSI positioning
 Price Momentum: Consecutive price action patterns with EMA and RSI confirmation
 Hybrid System: Advanced multi-trigger approach combining all methodologies
 
Advanced Technical Arsenal
When enabled, the strategy analyzes 8+ additional indicators for confluence:
 
 Volume Price Trend (VPT): Measures volume-weighted price momentum
 On-Balance Volume (OBV): Tracks cumulative volume flow
 Accumulation/Distribution Line: Identifies institutional money flow
 Williams %R: Momentum oscillator for entry timing
 Rate of Change Suite: Multi-timeframe momentum analysis (5, 14, 18 periods)
 Commodity Channel Index (CCI): Cyclical turning points
 Average Directional Index (ADX): Trend strength measurement
 Parabolic SAR: Dynamic support/resistance levels
 
🛡️ Risk Management System
Position Sizing
 
 Risk-based position sizing (default 1% per trade)
 Maximum position limits (default 25% of equity)
 Daily loss limits with automatic position closure
 
Multiple Profit Targets
 
 Target 1: 1.5% gain (50% position exit)
 Target 2: 2.5% gain (30% position exit)
 Target 3: 3.6% gain (20% position exit)
 Configurable exit percentages and target levels
 
 
Stop Loss Protection
 
 ATR-based or percentage-based stop losses
 Optional trailing stops
 Dynamic stop adjustment based on market volatility
 
📊 Technical Specifications
Primary Indicators
 
 EMAs: 9 (Fast), 16 (Medium), 50 (Long)
 VWAP: Volume-weighted average price filter
 RSI: 6-period momentum oscillator
 MACD: 8/13/5 configuration for faster signals
 
Volume Confirmation
 
 Volume filter requiring 1.6x average volume
 19-period volume moving average baseline
 Optional volume confirmation bypass
 
Market Structure Analysis
 
 Bollinger Bands (20-period, 2.0 multiplier)
 Squeeze detection for breakout opportunities
 Fractal and pivot point analysis
 
⏰ Trading Hours & Filters
Time Management
 
 Configurable trading hours (default: 9:30 AM - 3:30 PM EST)
 Weekend and holiday filtering
 Session-based trade management
 
Market Condition Filters
 
 Trend alignment requirements
 VWAP positioning filters
 Volatility-based entry conditions
 
📱 Visual Features
Information Dashboard
Real-time display of:
 
 Current entry method and signals
 Bullish/bearish signal counts
 RSI and MACD status
 Trend direction and strength
 Position status and P&L
 Volume and time filter status
 
Chart Visualization
 
 EMA plots with customizable colors
 Entry signal markers
 Target and stop level lines
 Background color coding for trends
 Optional Bollinger Bands and SAR display
 
 
🔔 Alert System
Entry Alerts
 
 Customizable alerts for long and short entries
 Method-specific alert messages
 Signal confluence notifications
 
 
Advanced Alerts
 
 Strong confluence threshold alerts
 Custom alert messages with signal counts
 Risk management alerts
 
⚙️ Customization Options
Strategy Parameters
 
 Enable/disable long or short trades
 Adjustable risk parameters
 Multiple entry method selection
 Advanced indicator on/off toggle
 
Visual Customization
 
 
 Color schemes for all indicators
 Dashboard position and size options
 Show/hide various chart elements
 Background color preferences
 
📋 Default Settings
 
 Initial Capital: $100,000
 Commission: 0.1%
 Default Position Size: 10% of equity
 Risk Per Trade: 1.0%
 RSI Length: 6 periods
 MACD: 8/13/5 configuration
 Stop Loss: 1.1% or ATR-based
 
🎯 Best Use Cases
 
 Day Trading: Designed for intraday opportunities
 Swing Trading: Adaptable for longer-term positions
 Momentum Trading: Excellent for trending markets
 Risk-Conscious Trading: Built-in risk management protocols
 
⚠️ Important Notes
 
 Paper Trading Recommended: Test thoroughly before live trading
 Market Conditions: Performance varies with market volatility
 Customization: Adjust parameters based on your risk tolerance
 Educational Purpose: Use as a learning tool and customize for your needs
 
🏆 Performance Features
 
 Detailed performance metrics
 Trade-by-trade analysis capability
 Customizable risk/reward ratios
 Comprehensive backtesting support
 
This strategy is for educational purposes. Past performance does not guarantee future results. Always practice proper risk management and consider your financial situation before trading.
Nirvana True Duel전략 이름
열반의 진검승부 (영문: Nirvana True Duel)
컨셉과 철학
“열반의 진검승부”는 시장 소음은 무시하고, 확실할 때만 진입하는 전략입니다.
EMA 리본으로 추세 방향을 확인하고, 볼린저 밴드 수축/확장으로 변동성 돌파를 포착하며, OBV로 거래량 확인을 통해 가짜 돌파를 필터링합니다.
전략 로직
매수 조건 (롱)
20EMA > 50EMA (상승 추세)
밴드폭 수축 후 확장 시작
종가가 상단 밴드 돌파
OBV 상승 흐름 유지
매도 조건 (숏)
20EMA < 50EMA (하락 추세)
밴드폭 수축 후 확장 시작
종가가 하단 밴드 이탈
OBV 하락 흐름 유지
진입·청산
손절: ATR × 1.5 배수
익절: 손절폭의 1.5~2배에서 부분 청산
시간 청산: 설정한 최대 보유 봉수 초과 시 강제 청산
장점
✅ 추세·변동성·거래량 3중 필터 → 노이즈 최소화
✅ 백테스트·알람 지원 → 기계적 매매 가능
✅ 5분/15분 차트에 적합 → 단타/스윙 트레이딩 활용 가능
주의점
⚠ 횡보장에서는 신호가 적거나 실패 가능
⚠ 수수료·슬리피지 고려 필요
📜 Nirvana True Duel — Strategy Description (English)
Name:
Nirvana True Duel (a.k.a. Nirvana Cross)
Concept & Philosophy
The “Nirvana True Duel” strategy focuses on trading only meaningful breakouts and avoiding unnecessary noise.
Nirvana: A calm, patient state — waiting for the right opportunity without emotional trading.
True Duel: When the signal appears, enter decisively and let the market reveal the outcome.
In short: “Ignore market noise, trade only high-probability breakouts.”
🧩 Strategy Components
Trend Filter (EMA Ribbon): Stay aligned with the main market trend.
Volatility Squeeze (Bollinger Band): Detect volatility contraction & expansion to catch explosive moves early.
Volume Confirmation (OBV): Filter out false breakouts by confirming with volume flow.
⚔️ Entry & Exit Conditions
Long Setup:
20 EMA > 50 EMA (uptrend)
BB width breaks out from recent squeeze
Close > Upper Bollinger Band
OBV shows positive flow
Short Setup:
20 EMA < 50 EMA (downtrend)
BB width breaks out from recent squeeze
Close < Lower Bollinger Band
OBV shows negative flow
Risk Management:
Stop Loss: ATR × 1.5 below/above entry
Take Profit: 1.5–2× stop distance, partial take-profit allowed
Time Stop: Automatically closes after max bars held (e.g. 8h on 5m chart)
✅ Strengths
Triple Filtering: Trend + Volatility + Volume → fewer false signals
Mechanical & Backtestable: Ideal for objective trading & performance validation
Adaptable: Works well on Bitcoin, Nasdaq futures, and other high-volatility markets (5m/15m)
⚠️ Things to Note
Low signal frequency or higher failure rate in sideways/range markets
Commission & slippage should be factored in, especially on lower timeframes
ATR multiplier and R:R ratio should be optimized per asset






















