Quant Trading Zero Lag Trend Signals (MTF) Strategy🧠 Strategy Overview
The Quant Trading Zero Lag Trend Signals (MTF) Strategy is a high-precision, multi-timeframe trend-following system designed for traders seeking early trend entries and intelligent exits. Built around ZLEMA-based signal detection, it includes dynamic risk management features and is optimized for automation via the Quant Trading Strategy Optimizer Chrome extension. Based on the original Zero Lag Trend Signals (MTF) from AlgoAlpha.
Based on popular request, I am including more documentation related to the strategy.
🔍 Key Components
1️⃣ ZLEMA Trend Engine
ZLEMA (Zero-Lag EMA) forms the foundation of the trend signal system.
Detects bullish and bearish momentum by analyzing price action crossing custom ZLEMA bands.
Optional confirmation using 5-bar ZLEMA slope filters (up/down trends) ensures high-conviction entries.
2️⃣ Volatility-Based Signal Bands
Dynamic bands are calculated using ATR (volatility) stretched over 3× period length.
These bands define entry zones (outside the bands) and trend strength.
Price crossing above/below the bands triggers trend change detection.
3️⃣ Entry Logic
Primary long entries occur when price crosses above the upper ZLEMA band.
Short entries (optional) trigger on downside cross under the lower band.
Re-entry logic allows continuation trades during strong trends.
Filters include date range, ZLEMA confirmation, and previous position state.
4️⃣ Exit Logic & Risk Management
Supports multiple customizable exit mechanisms:
🔺 Stop-Loss & Take-Profit
ATR-Based SL/TP: Uses ATR multipliers to dynamically set levels based on volatility.
Fixed Risk-Reward TP: Targets profit based on predefined RR ratios.
Break-Even Logic: Automatically moves SL to entry once a threshold RR is hit.
EMA Exit: Optional trailing exit based on price vs. short EMA.
🔀 Trailing Stop
Follows price action using a trailing ATR-based buffer that tightens with trend movement.
🔁 Trend-Based Exit
Automatically closes positions when the detected trend reverses.
5️⃣ Multi-Option Trade Filtering
Enable/disable short trades, ZLEMA confirmations, re-entries, etc.
Time-based backtesting filters for isolating performance within custom periods.
6️⃣ Visual Feedback & Annotations
Trend shading overlays: Green for bullish, red for bearish zones.
Up/Down triangle markers show when ZLEMA is rising/falling for 5 bars.
Stop-loss, TP, trailing lines drawn dynamically on the chart.
Floating stats table displays live performance (PnL, win %, GOA, drawdown, etc.).
Trade log labels annotate closed trades with entry/exit, duration, and reason.
7️⃣ CSV Export Integration
Seamless export of trade data including:
Entry/exit prices
Bars held
Encoded exit reasons
Enables post-processing or integration with external optimizers.
⚙️ Configurable Parameters
All key elements are customizable:
Entry band length and multiplier
ATR lengths, multipliers, TP/SL, trailing stop, break-even
Profit target RR ratio
Toggle switches for confirmations, trade types, and exit methods
🚀 Optimizer-Ready
This strategy was built for advanced backtesting automation:
100% compatible with the Quant Trading Strategy Optimizer Chrome Extension
Supports parameter sweeps, multi-symbol, and multi-timeframe optimization
Bandas e Canais
SOXL Trend Surge v3.0.2 – Profit-Only RunnerSOXL Trend Surge v3.0.2 – Profit-Only Runner (Long Only)
Optimized for the 45-minute chart
Description:
A refined breakout strategy tailored for SOXL on the 45-minute timeframe, this version of the Trend Surge engine eliminates stop losses entirely to focus on pure trend exploitation. Version 3.0.2 uses dynamic partial exits and trailing profits, enabling trades to run uninterrupted through volatile momentum expansions.
Performance Snapshot (45m timeframe):
+641% cumulative return
96.88% win rate (62 of 64 trades)
Avg. profit per trade: $50.09
Profit factor: 370.77
Max drawdown: 32.84%
Largest win: $148.47
Only 2 losing trades total
Entry Criteria:
Price > 200 EMA
Supertrend bullish
ATR increasing (volatility-confirmation)
Volume above 20-bar average
Trade window: 7am–12pm PST
Exit Strategy:
Take 50% profit at 2× ATR gain
Remaining position rides via 1.5× ATR trailing stop
No stop loss, no RSI or break-even exit
Ideal For:
Webull cash traders
ETF swing scalpers
Automated alert-to-order workflows (Alpaca, TradingView alerts, etc.)
Traders who prefer let-the-run happen style risk management
Big Mover Catcher BTC 4h🧠 Big Mover Catcher (BTC 4H Strategy) — Educational Tool
⚠️ Disclaimer: I am not a financial advisor. This script is for educational and testing purposes only. Cryptocurrency trading is highly volatile and involves significant risk. You can lose all of your invested capital.
📌 Overview
The Big Mover Catcher strategy is a work-in-progress trading system designed for Bitcoin (BTC) on the 4-hour chart. It aims to identify strong breakout moves by combining multiple technical indicators and conditions, allowing for high customization and filter-based confirmations.
This script is part of a personal project to learn Pine Script and backtesting on TradingView. It is currently in the testing and research phase.
🎯 Strategy Objective
Catch large, high-momentum breakout moves in the BTC market using:
Bollinger Band breakouts for entry signals
Momentum, volatility, and trend filters for trade confirmation
🧰 Features & Filters
The script provides a flexible set of filters that can be turned ON/OFF and adjusted directly from the settings panel:
✅ Entry Conditions
Price must break above or below Bollinger Bands
All selected filters must align before entry
🧪 Available Filters:
Relative Strength Index (RSI) with EMA/SMA smoothing
Average Directional Index (ADX) with EMA/SMA smoothing
Average True Range (ATR) with EMA/SMA smoothing
MACD Signal above or below zero
EMA 350 trend filter
ATR / ADX / RSI Threshold toggles for added control
🔥 Additional Feature:
Force Take Profit: Optionally closes the trade immediately if a candle closes with more than a defined % movement (default: 5%). This can help lock in quick profits during high volatility moves.
⚙️ Customizable Inputs
You can configure:
Stop loss percentage
All indicator lengths
Smoothing types (EMA/SMA)
Threshold activation toggles
Individual filter ON/OFF switches
This makes the strategy highly adaptable for educational exploration and optimization.
📊 Best Used For
Learning Pine Script and strategy structure
Testing filter combinations for BTC on the 4H timeframe
Understanding how different indicators interact in live markets
⚠️ Note: ❌ Short trades are currently disabled by default, as short-side logic is still under development.
❗ Final Reminder
This script is not financial advice. It is an educational tool. Use it to learn and explore trading logic. Trading cryptocurrencies carries high risk — only invest what you can afford to lose.
UMESHFXBOTUMESHFXBOT: UT Bot Strategy with Alligator Filter (Pine Script v6)
This strategy combines the UT Bot trailing stop logic with the Williams Alligator indicator to help avoid false signals during ranging (sideways) markets.
Key features:
Alligator Filter: Trades are only allowed when the Alligator lines (Jaw, Teeth, Lips) are not intertwined, helping to avoid choppy, non-trending conditions.
Customizable Alligator Settings: You can adjust the Jaw, Teeth, and Lips lengths and shifts to suit your market and timeframe.
Separate Uptrend/Downtrend Thresholds: Set different thresholds for trend strength filtering in uptrends and downtrends.
Heikin Ashi Option: Optionally use Heikin Ashi candle logic for signal generation, calculated internally for compatibility with all symbols.
No Consecutive Signals: Prevents new buy (or sell) signals if already in a long (or short) position.
Visuals: Plots buy/sell signals and Alligator lines on the chart for easy analysis.
SOXL Trend Surge v3.0.2 – Profit-Only RunnerSOXL Trend Surge v3.0.2 – Profit-Only Runner
Optimized for the 45-minute chart
Description:
A refined breakout strategy tailored for SOXL on the 45-minute timeframe, this version of the Trend Surge engine eliminates stop losses entirely to focus on pure trend exploitation. Version 3.0.2 uses dynamic partial exits and trailing profits, enabling trades to run uninterrupted through volatile momentum expansions.
Performance Snapshot (45m timeframe):
+641% cumulative return
96.88% win rate (62 of 64 trades)
Avg. profit per trade: $50.09
Profit factor: 370.77
Max drawdown: 32.84%
Largest win: $148.47
Only 2 losing trades total
Entry Criteria:
Price > 200 EMA
Supertrend bullish
ATR increasing (volatility-confirmation)
Volume above 20-bar average
Trade window: 7am–12pm PST
Exit Strategy:
Take 50% profit at 2× ATR gain
Remaining position rides via 1.5× ATR trailing stop
No stop loss, no RSI or break-even exit
Ideal For:
Webull cash traders
ETF swing scalpers
Automated alert-to-order workflows (Alpaca, TradingView alerts, etc.)
Traders who prefer let-the-run happen style risk management
Fibonacci Counter-Trend TradingOverview:
The Fibonacci Counter-Trend Trading strategy is designed to capitalize on price reversals by utilizing Fibonacci levels calculated from the standard deviation of price movements. This strategy opens a sell order when the closing price crosses above a specified upper Fibonacci level and a buy order when the closing price crosses below a specified lower Fibonacci level. By leveraging the principles of Fibonacci retracement and volatility, this strategy aims to identify potential reversal points in the market.
How It Works:
Fibonacci Levels Calculation:
The strategy calculates upper and lower Fibonacci levels based on the standard deviation of the price over a specified moving average length. These levels are derived from the Fibonacci sequence, which is widely used in technical analysis to identify potential support and resistance levels.
The upper levels are calculated by adding specific Fibonacci ratios (0.236, 0.382, 0.5, 0.618, 0.764, and 1.0) multiplied by the standard deviation to the basis (the volume-weighted moving average).
The lower levels are calculated by subtracting the same Fibonacci ratios multiplied by the standard deviation from the basis.
Trade Entry Rules:
Sell Order: A sell order is triggered when the closing price crosses above the selected upper Fibonacci level. This indicates a potential reversal point where the price may start to decline.
Buy Order: A buy order is initiated when the closing price crosses below the selected lower Fibonacci level. This suggests a potential reversal point where the price may begin to rise.
Trade Management:
The strategy includes stop-losses based on the Fibonacci levels to protect against adverse price movements.
How to Use:
Users can customize the moving average length and the multiplier for the standard deviation to suit their trading preferences and market conditions.
The strategy can be applied to various financial instruments, including stocks, forex, and cryptocurrencies, making it versatile for different trading environments.
Pros:
The Fibonacci Counter-Trend Trading strategy combines the mathematical principles of the Fibonacci sequence with the statistical measure of standard deviation, providing a unique approach to identifying potential market reversals.
This strategy is particularly useful in volatile markets where price swings can lead to significant trading opportunities.
The use of Fibonacci levels can help traders identify key support and resistance areas, enhancing decision-making.
Cons:
The strategy may generate false signals in choppy or sideways markets, leading to potential losses if the price does not reverse as anticipated.
Relying solely on Fibonacci levels without considering other technical indicators or market conditions may result in missed opportunities or increased risk.
The effectiveness of the strategy can vary depending on the chosen parameters (e.g., moving average length and standard deviation multiplier), requiring users to spend time optimizing these settings for different market conditions.
As with any counter-trend strategy, there is a risk of significant drawdowns during strong trending markets, where the price continues to move in one direction without reversing.
By understanding the mechanics of the Fibonacci Counter-Trend Trading strategy, along with its pros and cons, traders can effectively implement it in their trading routines and potentially enhance their trading performance.
SOXL Trend Surge v3.0.2 - Refined Reality RunnerSOXL Trend Surge v3.0.2 – Refined Reality Runner (Long Only)
Overview:
A precision-engineered, swing-focused strategy built for SOXL on the 1-hour chart. Designed to mirror real-world execution in a cash account, this system blends trend confirmation, volatility filters, and profit-locking logic to extract gains from explosive semiconductor moves — without relying on fantasy backtest fills.
Key Features:
Cumulative gain: +25% (1H SOXL, 2024–2025)
Win rate: ~65%
Profit factor: >2.0
Max drawdown: ~5%
Strategy Highlights:
Entry Logic:
Price above 200 EMA
Supertrend confirmation
RSI under 75
Volume & ATR filters to avoid false breakouts
Price must be outside a tight EMA “chop zone”
Exit Logic:
Partial profit at 2× ATR
Break-even stop after partial taken
RSI exit if overheated
Full exit via ATR stop or trailing stop on the runner
Execution Style:
Cash-account friendly
All trades ≥ 2 bars (no same-candle flips)
Ideal for Webull, TradingView alerts, or Alpaca automation
Growth Screener Strategy with 9 EMA ExitEntry on Weekly chart for riding the upper Bollinger band with certain more conditions and exiting on breaking of 21 EMA on Weekly chart
Keltner Channels Strategy with Middle Band ExitThis is the strategy version of the popular Keltner Channels Indicator with a Trailing Middle Band Exit.
Recommended use with Renko candles for automation.
Twin Range Filter StrategyThis is the strategy version of the popular Twin Range Filter by colinmck.
Recommended use with Renko Candlesticks.
Source:
Ichimoku Cloud Breakout Only LongThis is a very simple trading strategy based exclusively on the Ichimoku Cloud. There are no additional indicators or complex rules involved. The key condition is that we only open long positions when the price is clearly above the cloud — indicating a bullish trend.
For optimal results, the recommended timeframes are 1D (daily) or 1W (weekly) charts. These higher timeframes help filter out market noise and provide more reliable trend signals.
We do not short the market under any circumstances. The focus is purely on riding upward momentum when the price breaks out or stays above the cloud.
This strategy works best when applied to growth stocks with strong upward trends and good fundamentals — such as Google (GOOGL), Tesla (TSLA), Apple (AAPL), or NVIDIA (NVDA).
Gold Breakout Strategy - RR 4Strategy Name: Gold Breakout Strategy - RR 4
🧠 Main Objective
This strategy aims to capitalize on breakouts from the Donchian Channel on Gold (XAU/USD) by filtering trades with:
Volume confirmation,
A custom momentum indicator (LWTI - Linear Weighted Trend Index),
And a specific trading session (8 PM to 8 AM Quebec time — GMT-5).
It takes only one trade per day, either a buy or a sell, using a fixed stop-loss at the wick of the breakout candle and a 4:1 reward-to-risk (RR) ratio.
📊 Indicators Used
Donchian Channel
Length: 96
Detects breakouts of recent highs or lows.
Volume
Simple Moving Average (SMA) over 30 bars.
A breakout is only valid if the current volume is above the SMA.
LWTI (Linear Weighted Trend Index)
Measures momentum using price differences over 25 bars, smoothed over 5.
Used to confirm trend direction:
Buy when LWTI > its smoothed version (uptrend).
Sell when LWTI < its smoothed version (downtrend).
⏰ Time Filter
The strategy only allows entries between 8 PM and 8 AM (GMT-5 / Quebec time).
A timestamp-based filter ensures the system recognizes the correct trading session even across midnight.
📌 Entry Conditions
🟢 Buy (Long)
Price breaks above the previous Donchian Channel high.
The current channel high is higher than the previous one.
Volume is above its moving average.
LWTI confirms an uptrend.
The time is within the trading session (20:00 to 08:00).
No trade has been taken yet today.
🔴 Sell (Short)
Price breaks below the previous Donchian Channel low.
The current channel low is lower than the previous one.
Volume is above its moving average.
LWTI confirms a downtrend.
The time is within the trading session.
No trade has been taken yet today.
💸 Trade Management
Stop-Loss (SL):
For long entries: placed below the wick low of the breakout candle.
For short entries: placed above the wick high of the breakout candle.
Take-Profit (TP):
Set at a fixed 4:1 reward-to-risk ratio.
Calculated as 4x the distance between the entry price and stop-loss.
No trailing stop, no break-even, no scaling in/out.
🎨 Visuals
Green triangle appears below the candle on a buy signal.
Red triangle appears above the candle on a sell signal.
Donchian Channel lines are plotted on the chart.
The strategy is designed for the 5-minute timeframe.
🔄 One Trade Per Day Rule
Once a trade is taken (buy or sell), no more trades will be executed for the rest of the day. This prevents overtrading and limits exposure.
Smart Fib StrategySmart Fibonacci Strategy
This advanced trading strategy combines the power of adaptive SMA entries with Fibonacci-based exit levels to create a comprehensive trend-following system that self-optimizes based on historical market conditions. Credit goes to Julien_Eche who created the "Best SMA Finder" which received an Editors Pick award.
Strategy Overview
The Smart Fibonacci Strategy employs a two-pronged approach to trading:
1. Intelligent Entries: Uses a self-optimizing SMA (Simple Moving Average) to identify optimal entry points. The system automatically tests multiple SMA lengths against historical data to determine which period provides the most robust trading signals.
2. Fibonacci-Based Exits: Implements ATR-adjusted Fibonacci bands to establish precise exit targets, with risk-management options ranging from conservative to aggressive.
This dual methodology creates a balanced system that adapts to changing market conditions while providing clear visual reference points for trade management.
Key Features
- **Self-Optimizing Entries**: Automatically calculates the most profitable SMA length based on historical performance
- **Adjustable Risk Parameters**: Choose between low-risk and high-risk exit targets
- **Directional Flexibility**: Trade long-only, short-only, or both directions
- **Visualization Tools**: Customizable display of entry lines and exit bands
- **Performance Statistics**: Comprehensive stats table showing key metrics
- **Smoothing Option**: Reduces noise in the Fibonacci bands for cleaner signals
Trading Rules
Entry Signals
- **Long Entry**: When price crosses above the blue center line (optimal SMA)
- **Short Entry**: When price crosses below the blue center line (optimal SMA)
### Exit Levels
- **Low Risk Option**: Exit at the first Fibonacci band (1.618 * ATR)
- **High Risk Option**: Exit at the second Fibonacci band (2.618 * ATR)
Strategy Parameters
Display Settings
- Toggle visibility of the stats table and indicator components
Strategy Settings
- Select trading direction (long, short, or both)
- Choose exit method (low risk or high risk)
- Set minimum trades threshold for SMA optimization
SMA Settings
- Option to use auto-optimized or fixed-length SMA
- Customize SMA length when using fixed option
Fibonacci Settings
- Adjust ATR period and SMA basis for Fibonacci bands
- Enable/disable smoothing function
- Customize Fibonacci ratio multipliers
Appearance Settings
- Modify colors, line widths, and transparency
Optimization Methodology
The strategy employs a sophisticated optimization algorithm that:
1. Tests multiple SMA lengths against historical data
2. Evaluates performance based on trade count, profit factor, and win rate
3. Calculates a "robustness score" that balances profitability with statistical significance
4. Selects the SMA length with the highest robustness score
This ensures that the strategy's entry signals are continuously adapting to the most effective parameters for current market conditions.
Risk Management
Position sizing is fixed at $2,000 per trade, allowing for consistent exposure across all trading setups. The Fibonacci-based exit system provides two distinct risk management approaches:
- **Conservative Approach**: Using the first Fibonacci band for exits produces more frequent but smaller wins
- **Aggressive Approach**: Using the second Fibonacci band allows for larger potential gains at the cost of increased volatility
Ideal Usage
This strategy is best suited for:
- Trending markets with clear directional moves
- Timeframes from 4H to Daily for most balanced results
- Instruments with moderate volatility (stocks, forex, commodities)
Traders can further enhance performance by combining this strategy with broader market analysis to confirm the prevailing trend direction.
Reverse Keltner Channel StrategyReverse Keltner Channel Strategy
Overview
The Reverse Keltner Channel Strategy is a mean-reversion trading system that capitalizes on price movements between Keltner Channels. Unlike traditional Keltner Channel strategies that trade breakouts, this system takes the contrarian approach by entering positions when price returns to the channel after overextending.
Strategy Logic
Long Entry Conditions:
Price crosses above the lower Keltner Channel from below
This signals a potential reversal after an oversold condition
Position is entered at market price upon signal confirmation
Long Exit Conditions:
Take Profit: Price reaches the upper Keltner Channel
Stop Loss: Placed at half the channel width below entry price
Short Entry Conditions:
Price crosses below the upper Keltner Channel from above
This signals a potential reversal after an overbought condition
Position is entered at market price upon signal confirmation
Short Exit Conditions:
Take Profit: Price reaches the lower Keltner Channel
Stop Loss: Placed at half the channel width above entry price
Key Features
Mean Reversion Approach: Takes advantage of price tendency to return to mean after extreme moves
Adaptive Stop Loss: Stop loss dynamically adjusts based on market volatility via ATR
Visual Signals: Entry points clearly marked with directional triangles
Fully Customizable: All parameters can be adjusted to fit various market conditions
Customizable Parameters
Keltner EMA Length: Controls the responsiveness of the channel (default: 20)
ATR Multiplier: Determines channel width/sensitivity (default: 2.0)
ATR Length: Affects volatility calculation period (default: 10)
Stop Loss Factor: Adjusts risk management aggressiveness (default: 0.5)
Best Used On
This strategy performs well on:
Currency pairs with defined ranging behavior
Commodities that show cyclical price movements
Higher timeframes (4H, Daily) for more reliable signals
Markets with moderate volatility
Risk Management
The built-in stop loss mechanism automatically adjusts to market conditions by calculating position risk relative to the current channel width. This approach ensures that risk remains proportional to potential reward across varying market conditions.
Notes for Optimization
Consider adjusting the EMA length and ATR multiplier based on the specific asset and timeframe:
Lower values increase sensitivity and generate more signals
Higher values produce fewer but potentially more reliable signals
As with any trading strategy, thorough backtesting is recommended before live implementation.
Past performance is not indicative of future results. Always practice sound risk management.
External Signals Strategy Tester v5External Signals Strategy Tester v5 – User Guide (English)
1. Purpose
This Pine Script strategy is a universal back‑tester that lets you plug in any external buy/sell series (for example, another indicator, webhook feed, or higher‑time‑frame condition) and evaluate a rich set of money‑management rules around it – with a single click on/off workflow for every module.
2. Core Workflow
Feed signals
Buy Signal / Sell Signal inputs accept any series (price, boolean, output of request.security(), etc.).
A crossover above 0 is treated as “signal fired”.
Date filter
Start Date / End Date restricts the test window so you can exclude unwanted history.
Trade engine
Optional Long / Short enable toggles.
Choose whether opposite signals simply close the trade or reverse it (flip direction in one transaction).
Risk modules – all opt‑in via check‑boxes
Classic % block – fixed % Take‑Profit / Stop‑Loss / Break‑Even.
Fibonacci Bollinger Bands (FBB) module
Draws dynamic VWMA/HMA/SMA/EMA/DEMA/TEMA mid‑line with ATR‑scaled Fibonacci envelopes.
Every line can be used for stops, trailing, or multi‑target exits.
Separate LONG and SHORT sub‑modules
Each has its own SL plus three Take‑Profits (TP1‑TP3).
Per TP you set line, position‑percentage to close, and an optional trailing flag.
Executed TP/SLs deactivate themselves so they cannot refire.
Trailing behaviour
If Trail is checked, the selected line is re‑evaluated once per bar; the order is amended via strategy.exit().
3. Inputs Overview
Group Parameter Notes
Trade Settings Enable Long / Enable Short Master switches
Close on Opposite / Reverse Position How to react to a counter‑signal
Risk % Use TP / SL / BE + their % Traditional fixed‑distance management
Fibo Bands FIBO LEVELS ENABLE + visual style/length Turn indicator overlay on/off
FBB LONG SL / TP1‑TP3 Enable, Line, %, Trail Rules applied only while a long is open
FBB SHORT SL / TP1‑TP3 Enable, Line, %, Trail Rules applied only while a short is open
Line choices: Basis, 0.236, 0.382, 0.5, 0.618, 0.764, 1.0 – long rules use lower bands, short rules use upper bands automatically.
4. Algorithm Details
Position open
On the very first bar after entry, the script checks the direction and activates the corresponding LONG or SHORT module, deactivating the other.
Order management loop (every bar)
FBB Stop‑Loss: placed/updated at chosen band; if trailing, follows the new value.
TP1‑TP3: each active target updates its limit price to the selected band (or holds static if trailing is off).
The classic % block runs in parallel; its exits have priority because they call strategy.close_all().
Exit handling
When any strategy.exit() fires, the script reads exit_id and flips the *_Active flag so that order will not be recreated.
A Stop‑Loss (SL) also disables all remaining TPs for that leg.
5. Typical Use Cases
Scenario Suggested Setup
Scalping longs into VWAP‐reversion Enable LONG TP1 @ 0.382 (30 %), TP2 @ 0.618 (40 %), SL @ 0.236 + trailing
Fade shorts during news spikes Enable SHORT SL @ 1.0 (no trail) and SHORT TP1,2,3 on consecutive lowers with small size‑outs
Classic trend‑follow Use only classic % TP/SL block and disable FBB modules
6. Hints & Tips
Signal quality matters – this script manages exits, it does not generate entries.
Keep TV time zone in mind when picking start/end dates.
For portfolio‑style testing allocate smaller default_qty_value than 100 % or use strategy.percent_of_equity sizing.
You can combine FBB exits with fixed‑% ones for layered management.
7. Limitations / Safety
No pyramiding; the script holds max one position at a time.
All calculations are bar‑close; intra‑bar touches may differ from real‑time execution.
The indicator overlay is optional, so you can run visual‑clean tests by unchecking FIBO LEVELS ENABLE.
Bollinger + EMA Strategy with StatsThis strategy is a mean-reversion trading model that combines Bollinger Band deviation entries with EMA-based exits. It enters a long position when the price drops significantly below the lower Bollinger Band by a user-defined multiple of standard deviation (x), and a short position when the price exceeds the upper band by the same logic. To manage risk, it uses a wider Bollinger Band threshold (y standard deviations) as a stop loss, while take profit occurs when the price reverts to the n-period EMA, indicating mean reversion. The strategy maintains only one active position at a time—either long or short—and allocates a fixed percentage of capital per trade. Performance metrics such as equity curve, drawdown, win rate, and total trades are tracked and displayed for backtesting evaluation.
SmartScale Envelope DCA This is a Dollar-Cost Averaging (DCA) long strategy that buys when price dips below a moving average envelope and adds to the position in a stepwise, risk-controlled way. It uses up to 8 buy-ins, applies a cooldown between entries, and exits based on either a take profit from average entry price or a stop loss. Backtest range limits trades to the last 365 days for backtest control.
All input settings can and should be adjusted to the chart, as volatility in price action varies. Simply go into the inputs settings, and start from the top and move down to get better backtest results. Moving from the top down has been proven to give the best results. Then, move to properties and set your order size, pyramiding, and so on. It may be necessary to then fine tune your adjustments a second time to dial it in.
Works well on 1 hour time frames and in volatility.
Happy Trading!
Gaussian Channel StrategyGaussian Channel Strategy — User Guide
1. Concept
This strategy builds trades around the Gaussian Channel. Based on Pine Script v4 indicator originally published by Donovan Wall. With rework to v6 Pine Script and adding entry and exit functions.
The channel consists of three dynamic lines:
Line Formula Purpose
Filter (middle) N-pole Gaussian filter applied to price Market "equilibrium"
High Band Filter + (Filtered TR × mult) Dynamic upper envelope
Low Band Filter − (Filtered TR × mult) Dynamic lower envelope
A position is opened when price crosses a user-selected line in a user-selected direction.
When the smoothed True Range (Filtered TR) becomes negative, the raw bands can flip (High drops below Low).
The strategy automatically reorders them so the upper band is always above the lower band.
Visual colors still flip, but signals stay correct.
2. Entry Logic
Choose a signal line for longs and/or shorts: Filter, Upper band, or Lower band.
Choose a cross direction (Cross Up or Cross Down).
A signal remains valid for Lookback bars after the actual cross, as long as price is still on the required side of the line.
When the opposite signal appears, the current position is closed or reversed depending on Reverse on opposite.
3. Parameters
Group Setting Meaning
Source & Filter Source Price series used (close, hlc3, etc.)
Poles (N) Number of Gaussian filter poles (1-9). More poles ⇒ smoother but laggier
Sampling Period Main period length of the channel
Filtered TR Multiplier Width of the bands in fractions of smoothed True Range
Reduced Lag Mode Adds a lag-compensation term (faster but noisier)
Fast Response Mode Blends 1-pole & N-pole outputs for quicker turns
Signals Long → signal line / Short → signal line Which line generates signals
Long when price / Short when price Direction of the cross
Lookback bars for late entry Bars after the cross that still allow an entry
Trading Enable LONG/SHORT-side trades Turn each side on/off
On opposite signal: reverse True: reverse -- False: flat
Misc Start trading date Ignores signals before this timestamp (back-test focus)
4. Quick Start
Add the strategy to a chart. Default: hlc3, N = 4, Period = 144.
Select your signal lines & directions.
Example: trend trading – Long: Filter + Cross Up, Short: Filter + Cross Down.
Disable either side if you want long-only or short-only.
Tune Lookback (e.g. 3) to catch gaps and strong impulses.
Run Strategy Tester, optimise period / multiplier / stops (add strategy.exit blocks if needed).
When satisfied, connect alerts via TradingView webhooks or use the builtin broker panel.
5. Notes
Commission & slippage are not preset – adjust them in Properties → Commission & Slippage.
Works on any market and timeframe, but you should retune Sampling Period and Multiplier for each symbol.
No stop-loss / take-profit is included by default – feel free to add with strategy.exit.
Start trading date lets you back-test only recent history (e.g. last two years).
6. Disclaimer
This script is for educational purposes only and does not constitute investment advice.
Use entirely at your own risk. Back-test thoroughly and apply sound risk management before trading real capital.
Supertrend Hombrok BotSupertrend Hombrok Bot – Automated Trading Strategy for Dynamic Market Conditions
This trading strategy script has been developed to operate automatically based on detailed market conditions. It combines the popular Supertrend indicator, RSI (Relative Strength Index), Volume, and ATR (Average True Range) to determine the best entry and exit points while maintaining proper risk management.
Key Features:
Supertrend as the Base: Uses the Supertrend indicator to identify the market's trend direction, generating buy signals when the market is in an uptrend and sell signals when in a downtrend.
RSI Filter: The RSI is used to determine overbought and oversold conditions, helping to avoid entries in extreme market conditions. Entries are avoided when RSI > 70 (overbought) and RSI < 30 (oversold), reducing the risk of false movements.
Volume Filter: The strategy checks if the trading volume is above the average multiplied by a user-defined factor. This ensures that only significant movements, with higher liquidity, are considered.
Candle Body Size: The strategy filters only candles with a body large enough relative to the ATR (Average True Range), ensuring that the price movements on the chart have sufficient strength.
Risk Management: The bot is configured to operate with an adjustable Risk/Reward Ratio (R:R). This means that for each trade, both Take Profit (TP) and Stop Loss (SL) are adjusted based on the market's volatility as measured by the ATR.
Automatic Entries and Exits: The script automatically executes entries based on the specified conditions and exits with predefined Stop Loss and Take Profit levels, ensuring risk is controlled for each trade.
How It Works:
Buy Condition: Triggered when the market is in an uptrend (Supertrend), the volume is above the adjusted average, the candle body is strong enough, and the RSI is below the overbought level.
Sell Condition: Triggered when the market is in a downtrend (Supertrend), the volume is above the adjusted average, the candle body is strong enough, and the RSI is above the oversold level.
Alerts:
Buy and Sell Alerts are configured with detailed information, including Stop Loss and Take Profit values, allowing the user to receive notifications when trading conditions are met.
Capital Management:
The capital per trade can be adjusted based on account size and risk profile.
Important Note:
Always test before trading with real capital: While the strategy has been designed based on solid technical analysis methods, always perform tests in real-time market conditions with demo accounts before applying the bot in live trading.
Disclaimer: This script is a tool to assist in the trading process and does not guarantee profit. Past performance is not indicative of future results, and the trader is always responsible for their investment decisions.
Vinicius Setup ATR
Description:
This script is a strategy based on the Supertrend indicator combined with volume analysis, candle strength, and RSI. Its goal is to identify potential entry points for buy and sell trades based on technical criteria, without promising profitability or guaranteed results.
Script Components:
Supertrend: Used as the main trend compass. When the trend is positive (direction = 1), buy signals are considered; when negative (direction = -1), sell signals are considered.
Volume: Entries are only validated if the volume is above the average of the last 20 candles, adjusted with a 1.2 multiplier.
Candle Body: The candle body must be larger than a certain percentage of the ATR, ensuring sufficient strength and volatility.
RSI: Used as a filter to avoid trades in extreme overbought or oversold zones.
Support and Resistance: Identified based on simple pivots (5 periods before and after).
Customizable Parameters:
ATR Length and Multiplier: Controls the sensitivity of the Supertrend.
RSI Period: Adjusts the relative strength filter.
Minimum Volume and Candle Body: Settings to validate entry signals.
Entry Conditions:
Buy: Positive trend + strong candle + high volume + RSI below 70.
Sell: Negative trend + strong candle + high volume + RSI above 30.
Exit Conditions:
The trade is closed upon the appearance of an opposite signal.
Notes:
This is a technical system with no profit guarantees.
It is recommended to test with realistic capital values and parameters suited to your risk management.
The script is not optimized for specific profitability, but rather to support study and the construction of setups with objective criteria.
TASC 2025.05 Trading The Channel█ OVERVIEW
This script implements channel-based trading strategies based on the concepts explained by Perry J. Kaufman in the article "A Test Of Three Approaches: Trading The Channel" from the May 2025 edition of TASC's Traders' Tips . The script explores three distinct trading methods for equities and futures using information from a linear regression channel. Each rule set corresponds to different market behaviors, offering flexibility for trend-following, breakout, and mean-reversion trading styles.
█ CONCEPTS
Linear regression
Linear regression is a model that estimates the relationship between a dependent variable and one or more independent variables by fitting a straight line to the observed data. In the context of financial time series, traders often use linear regression to estimate trends in price movements over time.
The slope of the linear regression line indicates the strength and direction of the price trend. For example, a larger positive slope indicates a stronger upward trend, and a larger negative slope indicates the opposite. Traders can look for shifts in the direction of a linear regression slope to identify potential trend trading signals, and they can analyze the magnitude of the slope to support trading decisions.
One caveat to linear regression is that most financial time series data does not follow a straight line, meaning a regression line cannot perfectly describe the relationships between values. Prices typically fluctuate around a regression line to some degree. As such, analysts often project ranges above and below regression lines, creating channels to model the expected extent of the data's variability. This strategy constructs a channel based on the method used in Kaufman's article. It measures the maximum distances from points on the linear regression line to historical price values, then adds those distances and the current slope to the regression points.
Depending on the trading style, traders might look for prices to move outside an established channel for breakout signals, or they might look for price action to reach extremes within the channel for potential mean reversion opportunities.
█ STRATEGY CALCULATIONS
Primary trade rules
This strategy implements three distinct sets of rules for trend, breakout, and mean-reversion trades based on the methods Kaufman describes in his article:
Trade the trend (Rule 1) : Open new positions when the sign of the slope changes, indicating a potential trend reversal. Close short trades and enter a long trade when the slope changes from negative to positive, and do the opposite when the slope changes from positive to negative.
Trade channel breakouts (Rule 2) : Open new positions when prices cross outside the linear regression channel for the current sample. Close short trades and enter a long trade when the price moves above the channel, and do the opposite when the price moves below the channel.
Trade within the channel (Rule 3) : Open new positions based on price values within the channel's range. Close short trades and enter a long trade when the price is near the channel's low, within a specified percentage of the channel's range, and do the opposite when the price is near the channel's high. With this rule, users can also filter the trades based on the channel's slope. When the filter is active, long positions are allowed only when the slope is positive, and short positions are allowed only when it is negative.
Position sizing
Kaufman's strategy uses specific trade sizes for equities and futures markets:
For an equities symbol, the number of shares traded is $10,000 divided by the current price.
For a futures symbol, the number of contracts traded is based on a volatility-adjusted formula that divides $25,000 by the product of the 20-bar average true range and the instrument's point value.
By default, this script automatically uses these sizes for its trade simulation on equities and futures symbols and does not simulate trading on other symbols. However, users can control position sizes from the "Settings/Properties" tab and enable trade simulation on other symbol types by selecting the "Manual" option in the script's "Position sizing" input.
Stop-loss
This strategy includes the option to place an accompanying stop-loss order for each trade, which users can enable from the "SL %" input in the "Settings/Inputs" tab. When enabled, the strategy places a stop-loss order at a specified percentage distance from the closing price where the entry order occurs, allowing users to compare how the strategy performs with added loss protection.
█ USAGE
This strategy adapts its display logic for the three trading approaches based on the rule selected in the "Trade rule" input:
For all rules, the script plots the linear regression slope in a separate pane. The plot is color-coded to indicate whether the current slope is positive or negative.
When the selected rule is "Trade the trend", the script plots triangles in the separate pane to indicate when the slope's direction changes from positive to negative or vice versa. Additionally, it plots a color-coded SMA on the main chart pane, allowing visual comparison of the slope to directional changes in a moving average.
When the rule is "Trade channel breakouts" or "Trade within the channel", the script draws the current period's linear regression channel on the main chart pane, and it plots bands representing the history of the channel values from the specified start time onward.
When the rule is "Trade within the channel", the script plots overbought and oversold zones between the bands based on a user-specified percentage of the channel range to indicate the value ranges where new trades are allowed.
Users can customize the strategy's calculations with the following additional inputs in the "Settings/Inputs" tab:
Start date : Sets the date and time when the strategy begins simulating trades. The script marks the specified point on the chart with a gray vertical line. The plots for rules 2 and 3 display the bands and trading zones from this point onward.
Period : Specifies the number of bars in the linear regression channel calculation. The default is 40.
Linreg source : Specifies the source series from which to calculate the linear regression values. The default is "close".
Range source : Specifies whether the script uses the distances from the linear regression line to closing prices or high and low prices to determine the channel's upper and lower ranges for rules 2 and 3. The default is "close".
Zone % : The percentage of the channel's overall range to use for trading zones with rule 3. The default is 20, meaning the width of the upper and lower zones is 20% of the range.
SL% : If the checkbox is selected, the strategy adds a stop-loss to each trade at the specified percentage distance away from the closing price where the entry order occurs. The checkbox is deselected by default, and the default percentage value is 5.
Position sizing : Determines whether the strategy uses Kaufman's predefined trade sizes ("Auto") or allows user-defined sizes from the "Settings/Properties" tab ("Manual"). The default is "Auto".
Long trades only : If selected, the strategy does not allow short positions. It is deselected by default.
Trend filter : If selected, the strategy filters positions for rule 3 based on the linear regression slope, allowing long positions only when the slope is positive and short positions only when the slope is negative. It is deselected by default.
NOTE: Because of this strategy's trading rules, the simulated results for a specific symbol or channel configuration might have significantly fewer than 100 trades. For meaningful results, we recommend adjusting the start date and other parameters to achieve a reasonable number of closed trades for analysis.
Additionally, this strategy does not specify commission and slippage amounts by default, because these values can vary across market types. Therefore, we recommend setting realistic values for these properties in the "Cost simulation" section of the "Settings/Properties" tab.
DI+/- Cross Strategy with ATR SL and 2% TPDI+/- Cross Strategy with ATR Stop Loss and 2% Take Profit
📝 Script Description for Publishing:
This strategy is based on the directional movement of the market using the Average Directional Index (ADX) components — DI+ and DI- — to generate entry signals, with clearly defined risk and reward targets using ATR-based Stop Loss and Fixed Percentage Take Profit.
🔍 How it works:
Buy Signal: When DI+ crosses above 40, signaling strong bullish momentum.
Sell Signal: When DI- crosses above 40, indicating strong bearish momentum.
Stop Loss: Dynamically calculated using ATR × 1.5, to account for market volatility.
Take Profit: Fixed at 2% above/below the entry price, for consistent reward targeting.
🧠 Why it’s useful:
Combines momentum breakout logic with volatility-based risk management.
Works well on trending assets, especially when combined with higher timeframe filters.
Clean BUY and SELL visual labels make it easy to interpret and backtest.
✅ Tips for Use:
Use on assets with clear trends (e.g., major forex pairs, trending stocks, crypto).
Best on 30m – 4H timeframes, but can be customized.
Consider combining with other filters (e.g., EMA trend direction or Bollinger Bands) for even better accuracy.
Donchian Breakout Strategy📈 Donchian Breakout Strategy (Inspired by Way of the Turtle)
This strategy is a modern adaptation of the legendary Turtle Trading system as taught in Way of the Turtle by Curtis Faith — re-engineered for the crypto market’s volatility, 24/7 nature, and frequent fakeouts.
⸻
🐢 Original Inspiration
The original Turtle system, created by Richard Dennis and William Eckhardt, used:
• Breakouts of Donchian Channels (20-day for entry, 10-day for exit)
• Volatility-based position sizing using ATR (N)
• Simple rules, big trend exposure, and pyramiding to grow winners
It was built for futures and commodities, trading daily bars, assuming stable trading hours and regulated markets.
⸻
🚀 What’s Different in This Strategy?
✅ Optimized for Crypto
• Adapts to constant volatility and price manipulation common in crypto
• Adds commission modeling for realistic results (0.045% default)
✅ Improved Entry Filtering
• Uses EMA filter to align with trend direction
• Adds RSI momentum check to avoid early or weak breakouts
• Optional volatility and volume filters to reduce false signals
✅ Smarter Exits
• ATR-based volatility stop loss, not just Donchian reversal
• Avoids pyramiding to reduce risk from sudden reversals
✅ Backtest-Friendly
• Default backtest window starts from 2025-01-01
• Fully configurable: long/short toggle, filter control, stop loss multiplier
⸻
🧪 Use Case
• Best on trending coins with strong directional moves
• Avoids chop via filters, preserving capital
• Can be tuned for aggressive or conservative setups with just a few tweaks