Breakout Range Short Strategy BacktestBreakout Range Short Strategy
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
Search in scripts for "algo"
Breakout Range Long Strategy Backtest Breakout Range Long Strategy
You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
Bill Williams. Awesome Oscillator (AC) Strategy Backtest This indicator plots the oscillator as a histogram where blue denotes
periods suited for buying and red . for selling. If the current value
of AO (Awesome Oscillator) is above previous, the period is considered
suited for buying and the period is marked blue. If the AO value is not
above previous, the period is considered suited for selling and the
indicator marks it as red.
You can make changes in the property for set calculating strategy MA, EMA, WMA
Please, use it only for learning or paper trading. Do not for real trading.
Bandpass Filter Reversed Strategy BacktestThe related article is copyrighted material from
Stocks & Commodities Mar 2010
You can use in the xPrice any series: Open, High, Low, Close, HL2, HLC3, OHLC4 and ect...
Please, use it only for learning or paper trading. Do not for real trading.
Average True Range Reversed Strategy Average True Range Trailing Stops Strategy, by Sylvain Vervoort
The related article is copyrighted material from Stocks & Commodities Jun 2009
Please, use it only for learning or paper trading. Do not for real trading.
3-Bar-Reversal-Pattern Strategy Backtest This startegy based on 3-day pattern reversal described in "Are Three-Bar
Patterns Reliable For Stocks" article by Thomas Bulkowski, presented in
January, 2000 issue of Stocks&Commodities magazine.
That pattern conforms to the following rules:
- It uses daily prices, not intraday or weekly prices;
- The middle day of the three-day pattern has the lowest low of the three days, with no ties allowed;
- The last day must have a close above the prior day's high, with no ties allowed;
- Each day must have a nonzero trading range.
Please, use it only for learning or paper trading. Do not for real trading.
2/20 Exponential Moving Average StrategyThis indicator plots 2/20 exponential moving average. For the Mov
Avg X 2/20 Indicator, the EMA bar will be painted when the Alert criteria is met.
Please, use it only for learning or paper trading. Do not for real trading.
Moving Average Crossover 0001The first strategy for my (also first) Everyday project. During the rest of 2016 I plan to create a new strategy everyday
and I give myself between 15 minutes and 2 hours to complete the idea.
The goal is to improve my knowledge of Pine Script, become a faster strategy coder, and experiment with different strategic trading ideas.
I'm new to strategies and algorithmic trading, and hoping to learn from the community, so any feedback, advice or corrections is very much welcome!
/pbergden
Strategy with VWRSI and SAVE orders Long or Short or BothVWRSI is very powerful indicator coded by Algo Alpha and I Make Strategy of it
But there is no stop loss instate the Strategy is using Save orders to minimize the market manipulation
The best to used is side way market with long and short enable
The Strategy trigger long or short market order -
long - ta.crossover(rsi, 20)
short - ta.crossunder(rsi, 80)
And if is not take profit from the first trade start with the save trades until will do
the sum of the first order - base order and the save order can be adjust from the user
as well the deviation from the first order
IF some user have questions let me know
AI ALGO [Ganesh]Core Strategy Components\
1. EMA (Exponential Moving Average) SystemThe strategy uses three EMAs to identify trend direction:
EMA 48 (longer-term trend)
EMA 2 (short-term momentum)
EMA 21 (medium-term trend)
How it works:
Bullish trend: When price is above EMA 21 (green cloud)
Bearish trend: When price is below EMA 21 (red cloud)
EMA Cloud: The area between EMA 2 and EMA 48/21 provides visual trend confirmation
Optional higher timeframe (HTF) analysis for multi-timeframe confirmation
2. DEMA ATR (Double EMA + Average True Range)
This is a dynamic support/resistance indicator that adapts to volatility:Components:
DEMA (Double Exponential Moving Average): Smooths price action with less lag
ATR Bands: Creates upper and lower bands based on volatility (ATR × 1.7 factor)
Signal Generation:
Green line: Uptrend (DEMA ATR rising)
Red line: Downtrend (DEMA ATR falling)
Acts as a trailing stop-loss level that adjusts with market volatility
3. Smart Trail System (Fibonacci-Based)
An advanced trailing stop system using modified true range calculations:Key Features:
Calculates true range using Wilder's smoothing method
Creates Fibonacci retracement levels (61.8%, 78.6%, 88.6%) from the trail line
Adaptive stop-loss: Adjusts based on ATR factor (4.2) and smoothing (4)
Trend Detection:
Bullish: Price > Trailing line (blue zones)
Bearish: Price < Trailing line (red zones)
The Fibonacci zones show potential support/resistance areas
4. ZigZag Indicator Identifies significant swing highs and lows:
Length parameter: 13 (sensitivity control)
Labels: Higher Highs (HH), Lower Lows (LL), etc.
Helps identify trend reversals and key pivot points
5. Support & Resistance Levels
Strength-based S/R: Identifies horizontal support/resistance zones
Zone width: Adjustable percentage-based zones
High/Low zones: Marks significant price levels
Trading LogicEntry Conditions (Implied)The strategy likely enters trades when:Long Entry:
Price crosses above DEMA ATR (green)
Price is above EMA 21 (bullish EMA cloud)
Smart Trail confirms uptrend
Price bounces from Fibonacci support levels
Short Entry:
Price crosses below DEMA ATR (red)
Price is below EMA 21 (bearish EMA cloud)
Smart Trail confirms downtrend
Price rejects from Fibonacci resistance levels
Exit/Stop-Loss Strategy
Trailing stops: Using Smart Trail Fibonacci levels
Dynamic stops: DEMA ATR line acts as a moving stop-loss
Risk management: Position sizing at 50% of equity per trade
Dashboard Features1. Weekly Performance Table
Tracks trades per day of the week
Shows win/loss statistics
Calculates win rate percentage
2. Monthly Performance Table
Monthly P&L breakdown
Yearly performance summary
Color-coded returns (green = profit, red = loss)
Strategy Parameters
Initial Capital: $5,000
Commission: 0.02% per trade
Position Size: 50% of equity
Pyramiding: Disabled (no adding to positions)
Calculation: On bar close (not tick-by-tick)
Visual Elements
EMA clouds: Green (bullish) / Red (bearish)
DEMA ATR line: Dynamic support/resistance
Smart Trail zones: Fibonacci-based colored bands
ZigZag lines: Swing high/low connections
S/R zones: Horizontal support/resistance areas
Strategy Philosophy
This is a trend-following strategy with dynamic risk management that:
Uses multiple timeframes for confirmation
Adapts to volatility through ATR-based indicators
Provides clear visual cues for trend direction
Includes comprehensive performance tracking
Combines momentum (EMAs) with volatility (ATR) for robust signals
The strategy works best in trending markets and uses the Fibonacci trail system to maximize profits while protecting against reversals with adaptive stop-losses.
Sniper Perfect: Institutional Flow & Adaptive Risk ProtocolOverview Sniper Perfect is an advanced trend-following system designed to filter out "fakeouts" and institutional traps using a multi-layered verification protocol. It combines Volume Flow (VFI), Volatility (CHOP), and Momentum (RSI) to ensure entry only occurs in high-probability setups.
Key Features
🛡️ The Triple Filter Protocol
Strict Choppiness Filter: Uses a strict CHOP threshold (40). If the market is moving sideways, the algorithm locks all new entries to prevent whipsaws.
RSI Extremes Protection: Prevents FOMO buying at tops (Overbought > 70) and panic selling at bottoms (Oversold < 30).
Conflict Zone Detection: Identifies divergence between Price action and Money Flow. If price rises but institutional money exits, the background turns Gray and trading is disabled.
🔒 Adaptive Risk Management
Heat-Breathing Stop Loss: The SL distance adjusts dynamically based on market Volume and Volatility ("Heat").
Ratchet Mechanism: A mechanical lock ensures the Stop Loss can ONLY move in the direction of profit. It never loosens, guaranteeing that paper profits are protected.
📊 Live Dashboard A real-time panel in the bottom-right corner displays:
VFI Flow: Positive/Negative money flow.
Market Status: Active vs. Locked (Choppy).
RSI Status: Neutral, Overbought, or Oversold.
Visual Guide
🟢 Lime Zone: Clean Bullish Trend.
🔴 Red Zone: Clean Bearish Trend.
🟠 Orange Zone: High Choppiness (Stay Out).
🟣 'X' Marker: Exact price where the Stop Loss was triggered.
Disclaimer: For educational and research purposes only. Always manage your risk.
Sniper PerfectOverview Sniper Perfect is an advanced trend-following system designed to filter out "fakeouts" and institutional traps using a multi-layered verification protocol. It combines Volume Flow (VFI), Volatility (CHOP), and Momentum (RSI) to ensure entry only occurs in high-probability setups.
Key Features
🛡️ The Triple Filter Protocol
Strict Choppiness Filter: Uses a strict CHOP threshold (40). If the market is moving sideways, the algorithm locks all new entries to prevent whipsaws.
RSI Extremes Protection: Prevents FOMO buying at tops (Overbought > 70) and panic selling at bottoms (Oversold < 30).
Conflict Zone Detection: Identifies divergence between Price action and Money Flow. If price rises but institutional money exits, the background turns Gray and trading is disabled.
🔒 Adaptive Risk Management
Heat-Breathing Stop Loss: The SL distance adjusts dynamically based on market Volume and Volatility ("Heat").
Ratchet Mechanism: A mechanical lock ensures the Stop Loss can ONLY move in the direction of profit. It never loosens, guaranteeing that paper profits are protected.
📊 Live Dashboard A real-time panel in the bottom-right corner displays:
VFI Flow: Positive/Negative money flow.
Market Status: Active vs. Locked (Choppy).
RSI Status: Neutral, Overbought, or Oversold.
Visual Guide
🟢 Lime Zone: Clean Bullish Trend.
🔴 Red Zone: Clean Bearish Trend.
🟠 Orange Zone: High Choppiness (Stay Out).
🟣 'X' Marker: Exact price where the Stop Loss was triggered.
Disclaimer: For educational and research purposes only. Always manage your risk.
The Truth Sniper: Breathing Edition**Overview**
This is a highly advanced trend-following strategy designed to filter out market noise ("Fakeouts") and manage risk using a dynamic "Breathing Ratchet" mechanism. It combines traditional trend analysis with institutional money flow logic to identify the true market direction.
**Key Features**
**1. The Conflict Zone (Gray Zone Filter)**
Most strategies fail during low-volume accumulation or distribution phases. This algorithm introduces a "Conflict Zone" logic:
* **True Rally (Green):** Price is above EMA50 AND Money Flow (VFI) is positive.
* **True Drop (Red):** Price is below EMA50 AND Money Flow (VFI) is negative.
* **Conflict (Gray Background):** When Price and Money Flow disagree (e.g., Price rising on negative volume), the background turns Gray. **Trading is disabled** in these zones to avoid bull/bear traps.
**2. Breathing Stop-Loss Mechanism (Volatility Adjusted)**
The Stop Loss isn't static. It "breathes" based on market heat (Volume/RSI):
* **High Heat (High Volatility):** The SL loosens its grip, moving towards the bottom of the Fibonacci zone to allow price fluctuation without premature exits.
* **Low Heat (Low Volatility):** The SL tightens aggressively towards the price to lock in profits during slow momentum.
**3. The Ratchet Lock (Slippage Prevention)**
To ensure maximum profit retention, the "Breathing" mechanism is governed by a **Ratchet Logic**:
* **For Longs:** The Stop Loss can ONLY move UP. If the "Breathing" calculation suggests lowering the stop (due to increased volatility), the Ratchet blocks it, keeping the SL at the highest historical level.
* **For Shorts:** The Stop Loss can ONLY move DOWN.
**4. Fibonacci Exit Zones**
Exits are calculated based on a 60-day dynamic High/Low lookback, creating "Zones" (0-23.6%, 23.6-38.2%, etc.) that the price must conquer. The SL trails these zones mechanically.
**Visual Guide**
* **Lime/Red Background:** Active Trade Zone (Confirmed Trend).
* **Gray Background:** Conflict Zone (Stay Out / Hold).
* **Purple 'X':** The exact price level where the Stop Loss was hit (Fixed marker).
* **Stepline:** The active Stop Loss level (Visible only during open trades).
**Disclaimer**
This script is for educational and research purposes only. Always manage your risk.
YCGH Ultimate Stocks Breakout Sniper📈 YCGH Ultimate Stocks Breakout Sniper
Overview
A sophisticated momentum-based breakout strategy designed to capture high-probability directional moves during volatility expansion phases. This system identifies breakout opportunities when price decisively breaks through established ranges, combining multiple technical filters to enhance signal quality and minimize false breakouts.
🎯 Strategy Features
Core Methodology:
Proprietary breakout detection algorithm
Multi-layered confirmation filters for signal validation
Adaptive trailing stops for profit protection
Systematic risk management with daily drawdown controls
Key Components:
✅ Volatility Expansion Filter - Only trades during periods of elevated market volatility to avoid choppy, range-bound conditions
✅ Optional Trend Alignment - Configurable trend filter (EMA/SMA/RMA/WMA) to align entries with broader market direction
✅ ROC Momentum Filter - Daily rate-of-change filter to capture strong momentum days (optional)
✅ Comprehensive Exit Strategy:
Fixed stop-loss (default 2%)
Take-profit targets (default 9%)
Dynamic trailing stops (2% activation, 0.5% offset)
✅ Flexible Direction Trading:
Auto-detect mode: Long+Short for perpetuals, Long-only for spot/equities
Manual override options available
Suitable for both crypto and stock markets
📊 Market Applicability
Optimized for: Cryptocurrency perpetual contracts and equity markets (1H-4H timeframes)
Also effective on: Futures and high-liquidity spot markets
The strategy adapts to different market regimes through configurable volatility and trend filters, making it versatile across various trading instruments and timeframes.
⚙️ Risk Management
Position Sizing: Percentage-based allocation with leverage support
Intraday Loss Limit: Maximum 10% drawdown protection (configurable)
Realistic Cost Modeling: 0.025% commission + 1 tick slippage
No Pyramiding: Single position management for controlled risk exposure
📈 Performance Visualization
Includes a comprehensive monthly returns table displaying:
Year-by-year performance breakdown
Monthly profit/loss percentages
Visual color-coding (green for profits, red for losses)
Clean, modern design with transparent styling
🔐 Access & Pricing
This is a PROTECTED, invite-only strategy.
The source code is not open-source and requires paid access for usage.
How to Get Access:
📧 Email: brijamohanjha@gmail.com
Include in your email:
Your TradingView username
Markets/assets you plan to trade
Preferred timeframe
What You'll Receive:
Full strategy access with invite-only permissions
Complete parameter documentation
Setup and optimization guidance
Implementation support
⚠️ Important Disclosures
Backtesting Parameters:
Commission: 0.025% per trade
Slippage: 1 tick
Results reflect realistic trading conditions
Risk Warning:
Past performance does not guarantee future results. This strategy involves substantial risk and may not be suitable for all investors. Users should thoroughly understand the risks and customize parameters based on their risk tolerance and market conditions.
📞 Contact for Access
Email: brijamohanjha@gmail.com
For questions about functionality, pricing, optimization, or market-specific settings, please reach out via email.
Note: This is a premium, paid strategy. Access is granted manually after consultation and payment confirmation.
MACD + 200 EMA + Chandelier + ML OptimizerNeural MACD Trend Strategy
This script modernizes a classic high-probability trend strategy by integrating Machine Learning and dynamic risk management. It is built on the foundation of the 9, 21, and 200 EMAs with MACD execution, designed to automate the workflow of trend traders.
Key Features:
1. Core Logic: Trades are executed on MACD crosses, but only when aligned with the long-term trend (200 EMA). An optional setting enforces a simultaneous 9/21 EMA cross for high-momentum confirmation.
2. Machine Learning Optimizer: A K-Nearest Neighbors (KNN) algorithm runs in the background, analyzing RSI, CCI, and ROC. It compares the current setup to the last 1,000 bars of history; if the historical probability is negative, the ML blocks the trade to save capital.
3. Range Filter: Uses ADX to detect choppy markets. If the market is ranging (ADX < 20), the background turns gray and trading is paused.
4. Advanced Exits: Automatically calculates Stop Losses based on recent Swing Highs/Lows. Includes a Chandelier Exit (ATR Trailing Stop) to lock in profits dynamically. You can choose between fixed Reward-to-Risk targets (e.g., 1.5x) or disable targets to ride the trend until the trailing stop is hit.
Triple Screen Scalper [Pro] + Dynamic Risk Engine + Smart DCA🚀 Strategy Concept
This algorithm utilizes a Triple Screen methodology to filter market noise and align trades with the path of least resistance. Instead of relying on a single timeframe, it analyzes market structure across three distinct "horizons" to ensure high-probability execution:
The Tide (Long-Term): Analyzes the dominant directional flow and market bias on higher timeframes.
The Wave (Medium-Term): Measures the strength of the current momentum and pauses trading during weak or "choppy" market phases.
The Ripple (Short-Term): Pinpoints precise entry zones by detecting over-extended price action and mean-reversion opportunities within the larger trend.
The system is fortified with a Smart DCA (Dollar Cost Averaging) Engine that adapts to volatility. It does not blindly add to positions; it calculates "Risk Room" and "Trend Stability" before every additional entry, ensuring capital is deployed efficiently rather than recklessly.
⚙️ Configuration Guide (Variable Explanations)
💰 Position & Leverage
Trade Direction: Choose between Long, Short, or Auto. In "Auto," the system trades both directions based on the dominant trend.
Target Entry Leverage (x): The desired leverage for your initial entry.
Base Order Size (% of Equity): How much of your account balance is allocated to the very first trade of a sequence.
DCA Size Multiplier: Controls how much larger each subsequent order is compared to the previous one. A value of 1.0 means flat sizing; values above 1.0 increase the size of recovery orders.
KILL SWITCH: Max Effective Lev: A safety ceiling. If your total position's effective leverage exceeds this value, the strategy will force-close the position to prevent liquidation.
🚀 Profit Settings (Dynamic Exits)
Use Dynamic Profit?: If enabled, the take-profit target acts like a breathing lung—expanding during high volatility (to catch bigger moves) and contracting during quiet periods.
Gain Volatility Length: The lookback period used to measure recent market volatility.
Gain Multiplier: Scales the profit target. Higher numbers require a larger price move to hit profit; lower numbers take profit sooner.
Minimum Profit Floor %: A hard limit ensuring the target never drops below this percentage, even in extremely low-volatility markets.
📉 Trend & Momentum Filters
Trend Strength Threshold: Defines the minimum "velocity" required to trade. This filters out flat, ranging markets where trends are not established.
Momentum Sensitivity (K/D/Smooth): These variables tune the sensitivity of the entry trigger.
Lower numbers = Faster entries (more trades, potentially more noise).
Higher numbers = Slower, more confirmed entries.
Overbought / Oversold Levels: The specific zones (0-100) where price is considered statistically over-extended, triggering a reversal signal.
🛡️ Risk & DCA Settings
Enable Hard Stop Loss: A traditional safety stop based on a fixed percentage.
Max DCA Orders: The maximum number of times the strategy is allowed to "average down" on a position.
Require Trend for DCA?: If TRUE, the strategy will only add to a losing position if the broader market trend is still valid. If the trend breaks, it stops buying.
DCA Volatility Length/Multiplier: Controls the spacing between buy orders.
High Multiplier = Orders are spread far apart (safer for crashes).
Low Multiplier = Orders are closer together (faster recovery in normal dips).
Risk Scaling: A unique feature that pushes DCA orders further away as your leverage increases, protecting you from adding too much risk too quickly.
Base DCA %: The minimum distance required between orders, regardless of volatility.
⏱️ Timers & Cooldowns
Fast / Slow Cooldown: The minimum time (in seconds) the strategy must wait between realizing a profit and opening a new trade. This prevents "revenge trading" or entering twice on the same candle.
Position Cooldown: A specific timer applied after a large position is closed to let the market settle.
🎯 Daily S/R Targets
Enable Daily S/R: If enabled, the strategy will attempt to "snipe" exits at calculated daily support and resistance pivots.
Proximity Threshold: How close the price must get to a daily level to trigger an early exit.
⚠️ Risk Disclaimer
This script is an automated tool for analysis and execution assistance. It employs averaging techniques (DCA) which involve calculated risk. While the "Kill Switch" and "Risk Scaling" features are designed to mitigate exposure, users should thoroughly backtest and understand the "Multiplier" settings before deploying real capital. Past market structure is not a guarantee of future performance.
ONLY FOR EUR/USD : EMA9/EMA20 + RSI + MACD + Fibonacci (v6) FOR PAIRS WHICH HAS A MOMENTUM , trade only using manually not algo , use proper RR.
good luck
XAU BUY/SELL Scalping Strategy M5 PROFX:XAUUSD
This XAU/USD Pro Scalping Strategy is tailored specifically for the M5 timeframe , designed to capture rapid Gold price movements. Instead of relying on lagging indicators, this system utilizes advanced Price Action and Market Structure analysis to identify high-probability entry zones.
The core strength of this strategy lies in its built-in Money Management engine and Multi-threaded Trailing Stop system, ensuring capital preservation and profit maximization.
🚀 Key Features:
1. Smart Price Action Recognition:
The algorithm scans for specific market scenarios to apply dynamic Risk:Reward ratios (ranging from 1:1 to 1:3).
Filters out noise and false breakouts using multi-candle analysis.
Auto Position Sizing:
Calculates trade quantity automatically based on your defined Risk % per Trade .
Ensures consistent risk management regardless of the Stop Loss distance.
Intelligent Trailing Stop:
Uses a dynamic trailing mechanism based on "R" multiples (Risk Units).
Automatically secures profits by moving SL based on the specific setup type ("Case") of each trade.
Safety Filters:
Min SL and Max SL inputs prevent trades during periods of extremely low volatility or excessive risk.
⚙️ Settings:
Risk % per Trade: The percentage of equity to risk per trade (Recommended: 1.0% - 2.0%).
Min/Max SL Points: Dynamic boundaries for Stop Loss to adapt to current market volatility.
💡 Recommendations:
Symbol: XAUUSD / Gold - FXCM.
Timeframe: M5.
Best performance during London and New York sessions.
DOGE Stochastic RSI Pro System📌 Strategy Overview
The DOGE Stochastic RSI Pro System is a high-precision algorithm designed specifically for DOGEUSDT on the 1-hour timeframe.
It combines the power of Stochastic RSI momentum, EMA trend direction, and VWAP price positioning to generate high-probability long and short entries.
This system was optimized through multi-year backtesting and short-term adaptive tuning, showing strong performance during trending and volatility-rich periods.
📌 Technical Logic
✔ 1. Stochastic RSI Core
Entry when %K crosses %D
Detects momentum reversals early
Works effectively on DOGE volatility cycles
✔ 2. EMA Trend Filter
EMA50 above EMA150 → long-bias signals allowed
EMA50 below EMA150 → short-bias signals allowed
Prevents trading against the dominant trend
Improves signal accuracy
✔ 3. VWAP Institutional Filter
Price above VWAP → only long entries
Price below VWAP → only short entries
Avoids low-quality trades in mean-reversion zones
📌 Money Management
✔ Starting Amount: 5 USDT
✔ Take Profit: 3%
✔ Stop Loss: 3%
✔ Both Long & Short
✔ No Martingale — Clean, stable system
The strategy opens one position at a time to avoid overexposure.
📌 Recommended Settings
Pair: DOGEUSDT
Timeframe: 1H
Leverage (Bybit): 5–10× (optional, system does not enforce leverage)
Broker Execution: Bybit derivatives or spot with position sizing
📌 Backtesting Results (User Verified)
1 Year Backtest: ~57–58% win rate
2 Year Backtest: ~56% win rate
Last 3 Months: ~61% win rate
Last 30 Days: ~64% win rate
Profit Factor Range: 1.32 – 1.70
This system performs best in moderate trending + volatility expansion cycles.
📌 Notes for Users
Strategy does not repaint.
Behavior may vary depending on exchange price feeds.
Use proper risk management and test before going live.
Performance may change over time as markets shift.
📌 Access
This is an Invite-Only script.
Access is granted only to approved users.
If you'd like access, send a private request.
📌 Disclaimer
This script is for educational and research purposes only.
Not financial advice. Trading involves risk.
Past performance does not guarantee future results.
Volume Momentum Strategy [MA/VWAP Cross]Deconstructing the Volume Momentum Strategy: An Analysis of MA-VWAP Cross Mechanics
Introduction
The "Volume Momentum Strategy " is a technical trading algorithm programmed in Pine Script v6 for the TradingView platform. At its core, the strategy is a trend-following system that utilizes the interaction between a specific Moving Average (MA) and the Volume Weighted Average Price (VWAP) to generate trade signals. While the primary execution logic relies on price crossovers, the strategy incorporates a sophisticated secondary layer of analysis using the Commodity Channel Index (CCI) and Stochastic Oscillator. Uniquely, these secondary indicators are applied to volume data rather than price, serving as a gauge for market participation and momentum intensity.
The Core Engine: MA and VWAP Crossover
The primary engine driving the strategy's buy and sell decisions is the crossover relationship between a user-defined Moving Average and the VWAP.
1. The Anchor (VWAP): The strategy calculates the Volume Weighted Average Price based on the HLC3 (High, Low, Close divided by 3) source. VWAP serves as the dynamic benchmark for "fair value" throughout the trading session.
2. The Trigger (Moving Average): The script allows for flexibility in defining the "fast" line, offering options such as Simple (SMA), Exponential (EMA), or Hull Moving Averages.
3. The Signal:
o A Long (Buy) signal is generated when the chosen MA crosses over the VWAP. This suggests that short-term price momentum is exceeding the average volume-weighted price of the session, indicating bullish sentiment.
o A Short (Sell) signal is generated when the MA crosses under the VWAP, indicating bearish pressure where price is being pushed below the session's volume-weighted average.
The Role of CCI and Stochastic: Analyzing Volume Momentum
The prompt specifically inquires about how the CCI and Stochastic indicators fit into this process. In standard technical analysis, these oscillators are used to identify overbought or oversold price conditions. However, this strategy repurposes them to analyze Volume Momentum.
1. The Calculation
Instead of using close prices as the input source, the script passes volume data into both indicator functions:
• Volume CCI: Calculated as ta.cci(volume, cciLength). This measures the deviation of current volume from its statistical average.
• Volume Stochastic: Calculated as ta.stoch(volume, volume, volume, stochLength). This gauges the current volume relative to its recent range.
2. The "Volume Spike" Condition
The strategy combines these two indicators to define a specific market condition labeled isVolumeSpike. A volume spike is confirmed only when both conditions are met simultaneously:
• The Volume CCI must be greater than a defined threshold (default: 100).
• The Volume Stochastic must be greater than a defined threshold (default: 80).
3. Integration into the Process
It is critical to note how this script currently applies this "Volume Spike" logic:
• Visual Confirmation: In the current version of the code, the isVolumeSpike boolean is used strictly for visual feedback. When a spike is detected, the script paints the specific price bar yellow and plots a small triangle marker below the bar.
• Strategic Implication: While the code calculates these metrics, the variables long_condition and short_condition currently rely solely on the MA/VWAP crossover. The developer has left the volume logic as a visual overlay, noting in the comments that it serves as a "visual/alert" or a potential filter.
• Potential Alpha: Conceptually, this setup implies that a trader should look for the MA/VWAP crossover to occur coincidentally with—or shortly after—a "Volume Spike" (yellow bar). This would confirm that the price move is backed by significant institutional participation (volume) rather than just retail noise.
Risk Management and Time Constraints
The strategy wraps these technical signals in a robust risk management framework. It includes hard-coded time windows (start/stop trading times) and a "Close All" function to prevent holding positions overnight. Furthermore, it employs both percentage-based and dollar-based Stop Loss and Take Profit mechanisms, ensuring that every entry—whether generated by a high-momentum crossover or a standard trend move—has a predefined exit plan.
Conclusion
The "Volume Momentum Strategy" is a hybrid system. It executes trades based on the reliable trend signal of MA crossing VWAP but informs the trader with advanced volume analytics. By processing volume through the CCI and Stochastic calculations, it provides a "heads-up" display regarding the intensity of market participation, allowing the trader to distinguish between low-volume drifts and high-volume breakout moves.
Trendshift [CHE] StrategyTrendshift Strategy — First-Shift Structural Regime Trading
Profitfactor 2,603
Summary
Trendshift Strategy implements a structural regime-shift trading model built around the earliest confirmed change in directional structure. It identifies major swing highs and lows, validates breakouts through optional ATR-based conviction, and reacts only to the first confirmed shift in each direction. After a regime reversal, the strategy constructs a premium and discount band between the breakout candle and the previous opposite swing. This band is used as contextual bias and may optionally inform stop placement and position sizing.
The strategy focuses on clear, interpretable structural events rather than continuous signal generation. By limiting entries to the first valid shift, it reduces false recycles and allows the structural state to stabilize before a new trade occurs. All signals operate on closed-bar logic, and the strategy avoids higher-timeframe calls to stabilize execution behavior.
Motivation: Why this design?
Many structure-based systems repeatedly trigger as price fluctuates around prior highs and lows. This often leads to multiple flips during volatile or choppy conditions. Trendshift Strategy addresses this problem by restricting execution to the first confirmed structural event in each direction. ATR-based filters help differentiate genuine structural breaks from noise, while the contextual band ensures that the breakout is meaningful in relation to recent volatility.
The design aims to represent a minimalistic structural trading framework focused on regime turns rather than continuous trend signaling. This reduces chart noise and clarifies where the market transitions from one regime to another.
What’s different vs. standard approaches?
Baseline reference
Typical swing-based structure indicators report every break above or below recent swing points.
Architecture differences
First-shift-only regime logic that blocks repeated signals until direction reverses
ATR-filtered validation to avoid weak or momentum-less breaks
Premium and discount bands derived from breakout structure
Optional band-driven stop placement
Optional band-dependent position-sizing factor
Regime timeout system to neutralize structure after extended inactivity
Persistent-state architecture to prevent re-triggering
Practical effect
Only the earliest actionable structure change is traded
Fewer but higher-quality signals
Premium/discount tint assists contextual evaluation
Stops and sizing can be aligned with structural context rather than arbitrary volatility measures
Improved chart interpretability due to reduced marker frequency
How it works (technical)
The algorithm evaluates symmetric swing points using a fixed bar window. When a swing forms, its value and bar index are stored as persistent state. A structural shift occurs when price closes beyond the most recent major swing on the opposite side. If ATR filtering is enabled, the breakout must exceed a volatility-scaled distance to prevent micro-breaks from firing.
Once a valid shift is confirmed, the regime is updated to bullish or bearish. The script records the breakout level, the opposite swing, and derives a band between them. This band is checked for minimum size relative to ATR to avoid unrealistic contexts.
The first shift in a new direction generates both the strategy entry and a visual marker. Additional shifts in the same direction are suppressed until a reversal occurs. If a timeout is enabled, the regime resets after a specified number of bars without structural change, optionally clearing the band.
Stop placement, if enabled, uses either the opposite or same band edge depending on configuration. Position size is computed from account percentage and may optionally scale with the price-span-to-ATR relationship.
Parameter Guide
Market Structure
Swing length (default 5): Controls swing sensitivity. Lower values increase responsiveness.
Use ATR filter (default true): Requires breakouts to show momentum relative to ATR. Reduces false shifts.
ATR length (default 14): Volatility estimation for breakout and band validation.
Break ATR multiplier (default 1.0): Required breakout strength relative to ATR.
Premium/Discount Framework
Enable framework (default true): Activates premium/discount evaluation.
Persist band on timeout (default true): Keeps structural band after timeout.
Min band ATR mult (default 0.5): Rejects narrow bands.
Regime timeout bars (default 500): Neutralizes regime after inactivity.
Invert colors (default false): Color scheme toggle.
Visuals
Show zone tint (default true): Background shade in premium or discount region.
Show shift markers (default true): Display first-shift markers.
Execution and Risk
Risk per trade percent (default 1.0): Determines position size as account percentage.
Use band for size (default false): Scales size relative to band width behavior.
Flat on opposite shift (default true): Forces reversal behavior.
Use stop at band (default false): Stop anchored to band edges.
Stop band side: Chooses which band edge is used for stop generation.
Reading & Interpretation
A green background indicates discount conditions within the structural band; red indicates premium conditions. A green triangle below price marks the first bullish structural shift after a bearish regime. A red triangle above price marks the first bearish structural shift after a bullish regime.
When stops are active, the opposite band edge typically defines the protective level. Band width relative to ATR indicates how significant a structural change is: wider bands imply stronger volatility structure, while narrow bands may be suppressed by the minimum-size filter.
Practical Workflows & Combinations
Trend following: Use first-shift entries as initial regime confirmation. Add higher-timeframe trend filters for additional context.
Swing trading: Combine with simple liquidity or fair-value-gap concepts to refine entries.
Bias mapping: Use higher timeframes for structural regime and lower timeframes for execution within the premium/discount context.
Exit management: When using stops, consider ATR-scaling or multi-stage profit targets. When not using stops, reversals become the primary exit.
Behavior, Constraints & Performance
The strategy uses only confirmed swings and closed-bar logic, avoiding intrabar repaint. Pivot-based swings inherently appear after the pivot window completes, which is standard behavior. No higher-timeframe calls are used, preventing HTF-related repaint issues.
Persistent variables track regime and structural levels, minimizing recomputation. The maximum bars back setting is five-thousand. The design avoids loops and arrays, keeping performance stable.
Known limitations include limited signal density during consolidations, delayed swing confirmation, and sensitivity to extreme gaps that stretch band logic. ATR filtering mitigates some of these effects but does not eliminate them entirely.
Sensible Defaults & Quick Tuning
Fewer but stronger entries: Increase swing length or ATR breakout multiplier.
More responsive entries: Reduce swing length to capture earlier shifts.
More active band behavior: Lower the minimum band ATR threshold.
Stricter stop logic: Use the opposite band edge for stop placement.
Volatile markets: Increase ATR length slightly to stabilize behavior.
What this indicator is—and isn’t
Trendshift Strategy is a structural-regime trading engine that evaluates major directional shifts. It is not a complete trading system and does not include take-profit logic or prediction features. It does not attempt to forecast future price movement and should be used alongside broader market structure, volatility context, and disciplined risk management.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino
SmartMoneyConcept ProFlow StrategySmartMoneyConcept ProFlow is a complete SMC-based algo built for trending markets and clean volatility phases – especially on crypto pairs like BTC, ETH and perpetual futures.
It combines:
• Smart Money swing structure (BOS / CHoCH)
• Dynamic Support & Resistance levels
• Order Block–style gap detection
• Volatility normalization (ATR / Range / BBWidth)
• SuperTrend trend filter
• ATR & Volume-based exits, TP lock and session control
The goal: fewer random trades, more focused entries when structure + volatility + trend are in sync.
1. Core Idea
Smart Structure Levels (S/R)
– The strategy builds dynamic support/resistance using swing highs/lows.
– Breakouts above resistance or below support, with enough volatility (filter), become primary trade signals.
BOS / CHoCH Engine
– Tracks Break of Structure (BOS) and Change of Character (CHoCH).
– BOS up/down help define the current trend bias.
– CHoCH highlights potential reversals after a confirmed BOS in the opposite direction.
Order Block Gap Logic
– Detects displacement candles with gaps (based on ATR) to approximate OB-style “impulsive moves”.
– Bullish gaps can add confluence for long entries, bearish gaps for shorts.
Volatility-Aware Entries
– Uses normalized volatility (via ATR, Range or BBWidth).
– Filters out breakouts in dead, low-vol environments and focuses on moves with real expansion.
2. Trend & Risk Management Stack
SuperTrend Filter
– Optional “Only With SuperTrend Direction” to restrict entries to the current ST trend.
– ST flips can also force exits if you want to exit as soon as the main trend changes.
ATR-Based Stops & Trails
– ATR distance check to avoid ultra-tight stops that get chopped instantly.
– Three modes:
• StopOnly – classic fixed ATR stop.
• TrailOnly – trailing ATR-style stop.
• StopAndTrail – initial fixed stop that later trails with price.
Volume-Based Exits (Optional)
– Exit on extremely low volume (move losing participation).
– Or on opposite volume spikes (strong counter-pressure against your position).
– Or use Both for a more active volume management.
TP Lock Logic
– When unrealized profit reaches a chosen value, the position is closed and a “lock” can be applied.
– Use this lock to:
• block same-direction re-entries for that side, or
• allow them again depending on your preference.
3. Anti-Churn & Session Control
Anti-Churn Controls
– Minimum bars between entries.
– Cooldown after an ATR exit.
– Limit of max entries per bar.
Session Filter
– Restrict trading to a specific hourly window (e.g. main market session).
– Option to force close positions outside your active session.
– Handy for intraday traders who don’t want overnight or low-liquidity exposure.
4. SmartMoney Preset Modes
Preset Mode:
• EtherFlux – more flexible, for general breakout & volatility trading.
• SmartMoney – SMC-focused preset:
– Adjusted length, volatility filter and ATR settings.
– Option to disable exits from the strategy side (for manual risk control).
Switching presets automatically tunes multiple internal parameters so you don’t have to micromanage every input each time.
5. Visual Layer
This script has a complete visual suite to help you “read the tape”:
– Bar Colors by position and SuperTrend bias.
– Support / Resistance dots and lines (stepline style).
– Order Block markers (bullish / bearish gap labels).
– BOS / CHoCH labels to track structure shifts in real-time.
– Liquidation Zones (visual only)
• Approximate long and short liquidation areas based on assumed leverage.
• Shaded zones on the chart for quick liquidity map.
– Status Labels
• Session status (ACTIVE / OFF / DISABLED).
• Current position (LONG / SHORT / FLAT).
• TP Lock status (longs locked / shorts locked / no lock).
All visuals are designed for dark charts but also work on light themes with minor tweaks.
6. Quick Input Guide
• Levels Period & Volatility Filter – main structure sensitivity and breakout quality.
• Volatility Method – ATR / Range / BBWidth normalization for the vol filter.
• ATR Stop & Management – core risk rules: ATR multiplier, stop/trail mode, min ATR distance.
• SuperTrend Settings – trend bias and ST-flip exits.
• SmartMoney Preset – quick switch between EtherFlux and SmartMoney tuning.
• Volume Exits – low volume / opposite spike / both.
• Session Filter – hour-based trading window + optional forced flat outside session.
• Follow-Signal Mode – flip from long→short or short→long when signal reverses (signal-based rotation).
• TP Lock – secure profits at a fixed amount and optionally block same-direction re-entries.
• Liq Zones – visual only, for liquidity map (no direct trade logic).
How to Use (My Suggestion)
Start on 15m–4H charts for liquid pairs (BTC, ETH, majors).
Choose your preset:
– EtherFlux for more general breakout + vol trading.
– SmartMoney if you want stricter SMC behaviour.
Turn on SuperTrend + ATR stops for cleaner risk management.
Forward-test in replay / paper trading before using real capital.
Use the visual BOS/CHoCH + Liq Zones as context , not as blind signals.
Important
This is a backtest & research tool . It is not financial advice and does not guarantee profits. Always combine it with your own risk management, position sizing, and forward-testing before going live. Trading leveraged products and crypto can result in partial or full loss of capital.
Oracle Protocol — Arch Public (Testing Clone) Oracle Protocol — Arch Public Series (testing clone)
This model implements the Arch Public Oracle structure: a systematic accumulation-and-distribution engine built around a dynamic Accumulation Cost Base (ACB), strict profit-gate exit logic, and a capital-bounded flywheel reinvestment system.
It is designed for transparent execution, deterministic behaviour, and rule-based position management.
Core Function Set
1. Accumulation Framework (ACB-Driven)
The accumulation engine evaluates market movement against defined entry conditions, including:
Percentage-based entry-drop triggers
Optional buy-below-ACB mode
Capital-gated entries tied to available ledger balance
Fixed-dollar and min-dollar entry rules (as seen in Arch public materials)
Automated sizing through flywheel capital
Range-bounded ledger for controlled backtesting input
Each qualifying buy updates the live ACB, maintains the internal ledger, and forms the next reference point for exit evaluation.
No forecasting mechanisms are included.
2. Profit-Gate Exit System
Exits are governed by the standard Arch public approach:
A sealed ACB reference for threshold evaluation
Optional live-ACB visibility
Profit-gate triggers defined per asset class
Candle-confirmation integration (“ProfitGate + Candle” mode)
Distribution only when the smallest active threshold is met
This provides a consistent cadence with published Arch diagrams and PDFs.
3. Once-Per-Rally Governance
After a distribution, the algorithm locks until price retraces below the most recent accumulation base.
Only after re-arming can the next profit gate activate.
This prevents over-frequency selling and aligns with the public-domain Oracle behaviour.
4. Quiet-Bars & Threshold Cluster Control
A volatility-stabilisation layer prevents multiple exits from micro-fluctuations or transient spikes.
This ensures clean execution during fast markets and high volatility.
5. Flywheel Reinvestment
Distribution proceeds automatically return to the capital pool where permitted, creating a closed system of:
Entry sizing
Exit proceeds
Ledger-managed capital state
All sizing respects capital boundaries and does not breach dollar floors or overrides.
6. Automation Hooks and Integration
The script exposes:
3Commas-compatible JSON sizing
Entry/exit signalling via alertcondition()
Deterministic event reporting suitable for external automation
This allows consistent deployment across automated execution environments.
7. Visual Tooling
Optional displays include:
Live ACB line
Exit-guide markers
Capital, state, and ledger panels
Realized/unrealized outcome tracking based on internal logic only
Visual components do not influence execution rules.
Operating Notes
This model is rule-based, deterministic, and non-predictive.
It executes only according to the explicit thresholds, capital limits, and state transitions defined within the script.
No discretionary or forward-looking logic is included.






















