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
Göstergeler ve stratejiler
Syntropy Accumulation SystemThe Syntropy Accumulation System is a sophisticated, multi-timeframe algorithmic trading strategy meticulously designed to identify and capitalize on unique market inefficiencies. This system operates by intelligently combining insights from foundational price action patterns with dynamic volume and price flow analysis, providing a nuanced perspective on market sentiment and potential accumulation zones.
How the System Works:
At its core, the Syntropy Accumulation System employs a robust dual-confirmation approach. It leverages a "Pattern Genesis" module that scrutinizes higher timeframe price data to detect specific structural formations indicative of potential reversals or strong underlying accumulation. This module is designed to filter out noise and identify only the most compelling price symmetries.
Concurrently, a "Flux Anomaly" module analyzes a combination of price and volume behavior across different timeframes to detect divergences and shifts in market momentum. This component is crucial for confirming the strength and authenticity of the signals generated by the Pattern Genesis, ensuring that entries are aligned with genuine shifts in supply and demand rather than fleeting fluctuations.
When both the "Pattern Genesis" and "Flux Anomaly" modules align, the system generates a high-conviction "Double Entry" signal, aiming for optimal positioning. Beyond initial entries, the Syntropy Accumulation System incorporates advanced "Reentry" logic. This adaptive mechanism is designed to identify opportunistic re-entry points after initial long positions, specifically looking for specific price retracements and wick patterns that suggest renewed buying interest or a "retest" of critical levels. This allows for strategic scaling into positions, enhancing capital efficiency.
The strategy also includes a customizable profit-taking mechanism, allowing users to define their desired profit targets. The integrated performance dashboard provides real-time insights into trade statistics, including closed and open P&L, average entry prices, and invested capital, enabling comprehensive analysis of the system's performance.
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.
Momentum Wave & MACD Strategy - Improved Exitsmomdot+macd+adx+rsi/ema exit
It uses Momentum dots from Cipher B and MACD crossovers for entries, while either EMA or RSI crossovers are used for exits.
An optional ADX filter to avoid sideways trades.
Enjoy the rides, turn to RSI exits on shorter pullback trades.
LetsWinbyMrAthis is simple strategy
Follow only simple trend risk reward management and use magic of bolingar band.
Use the script back test and enjoy :)
Writer: Mr. A :)
Random MAThis strategy uses random number generator methods to create a noisy MA to create a cross then buy and tp with the price action that is presented within the chart. use on the 15m tf and it beats fees and slippage. 2 ticks which is plenty for SPY given it having 3B+ of volume and thin OB
InterStellarIntroducing the "InterStellar" Strategy: Conquer the Markets with Multi-Timeframe Precision
Prepare to navigate the financial cosmos with the InterStellar strategy, a sophisticated Pine Script creation for TradingView that fuses multi-timeframe trend analysis with precise moving average crossover signals. Designed for traders seeking high-confidence entries, InterStellar aligns signals across multiple timeframes to ensure trades are executed in sync with the broader market trend. With robust risk management and customizable parameters, this strategy is your launchpad to disciplined, high-impact trading.
Why "InterStellar" Shines
InterStellar is a stellar blend of multi-timeframe trend confirmation and classic MA crossover logic, delivering a robust system that excels across diverse market conditions. Here’s what sets it apart:
Multi-Timeframe Trend Alignment: Evaluates trends across 1m, 5m, 15m, 30m, 1h, 4h, and daily timeframes, requiring at least 4 out of 7 timeframes to align for trade entries, minimizing false signals.
MA Crossover Precision: Leverages fast and slow moving averages (default: 9 and 21 periods, EMA or SMA) to detect bullish and bearish crossovers on the current chart for timely trade execution.
Robust Risk Management: Configurable take-profit, stop-loss, maximum positions, commission, and slippage inputs ensure disciplined trading and capital protection.
Visual Clarity: Features a sleek table displaying trend status (Bullish 🚀, Bearish 🐻, or Neutral) across all timeframes, with clear buy/sell signals plotted on the chart.
Flexible Customization: Inputs for MA periods, MA type, and risk parameters allow traders to tailor the strategy to their unique style.
How It Works
InterStellar generates trade signals by calculating fast and slow moving averages on the current chart, triggering entries on crossovers. These signals are filtered by a multi-timeframe trend consensus, requiring at least 4 timeframes to confirm a bullish or bearish trend. Key mechanics include:
Long Entries: Initiated when the fast MA crosses above the slow MA and at least 4 timeframes are bullish.
Short Entries: Triggered when the fast MA crosses below the slow MA and at least 4 timeframes are bearish.
Position Management: Closes opposing positions if profitable, limits open positions, and sets dynamic take-profit and stop-loss levels scaled to the symbol’s tick size.
Visualization: A real-time trend table and ATR-adjusted buy/sell signals provide clear, actionable insights.
Why Collaborate on InterStellar?
InterStellar is a foundation for innovation, and I’m eager to team up with traders, developers, and market enthusiasts to propel it further. Whether you’re optimizing timeframe weights, integrating new indicators, or backtesting across markets, your expertise can make InterStellar a market-dominating force. Potential collaboration areas:
Adding volume or momentum filters for enhanced signal accuracy.
Incorporating machine learning for predictive signal optimization.
Testing performance across forex, stocks, or crypto.
Developing a real-time performance dashboard.
Join the Cosmic Journey
If InterStellar sparks your interest and you’re ready to help refine this powerful strategy, let’s connect! Email me at or reach out via TradingView. Together, we can chart the stars and build a trading system that’s out of this world.
InceptionAre you ready to explore a cutting-edge trading strategy that defies conventional market logic and harnesses the power of adaptive technical analysis? Introducing Inception, a meticulously crafted Pine Script strategy designed for TradingView that combines reversed trend logic, dynamic timeframe adaptability, and multi-indicator signal synthesis to unlock profitable opportunities across diverse market conditions. This strategy is engineered to empower traders with precision, flexibility, and robust risk management, making it a game-changer for both novice and seasoned traders.
Why "Inception" Stands Out
The Inception strategy is not your average trading system. It leverages a unique reversed trend logic, where bearish signals trigger long entries and bullish signals prompt short entries, challenging traditional market assumptions to capture counterintuitive opportunities. By integrating adaptive technical indicators, custom signal calculations, and stringent entry/exit conditions, Inception ensures trades are executed with surgical precision. Here’s what makes it exceptional:
Dynamic Timeframe Adaptation: Inception adjusts its parameters based on the chart’s timeframe (low, medium, or high), optimizing indicator periods for RSI, MACD, EMAs, and Bollinger Bands to suit intraday, swing, or long-term trading.
Reversed Signal Logic: By flipping conventional trend signals, Inception capitalizes on market reversals, using bearish conditions to enter long positions and bullish conditions for short positions, supported by a 0-5 signal strength scale.
Multi-Indicator Synergy: Combines RSI, MACD, EMAs, Bollinger Bands, volume analysis, and momentum indicators to create a robust signal framework, ensuring high-confidence trade entries.
Custom Signal Calculations: Proprietary signals (signal1 to signal4) incorporate current and previous candle data, weighted into a composite signal (sig) for enhanced decision-making.
Risk Management: Configurable take-profit (80,000 pips), stop-loss (8,000 pips), maximum positions (2), commission, and slippage inputs ensure disciplined trading and capital protection.
Visual Clarity: Clear buy and sell signals are plotted on the chart using ATR-adjusted labels, making it easy to identify trade opportunities at a glance.
How It Works
Inception’s core strength lies in its ability to synthesize multiple data points into actionable signals. It calculates a composite signal (sig) by weighing custom price-based signals, then validates them against reversed trend conditions and candlestick patterns. For example:
Long Entries: Triggered by bearish conditions (e.g., close below EMA20, negative MACD momentum, or bearish candles) combined with custom signal thresholds.
Short Entries: Initiated by bullish conditions (e.g., close above EMA20, positive MACD momentum, or bullish candles) with similar signal validation.
Position Management: The strategy closes opposing positions when profitable and enforces a maximum position limit, while setting dynamic take-profit and stop-loss levels scaled to the symbol’s tick size.
The result is a strategy that thrives in volatile markets, adapts to different timeframes, and maintains strict risk controls, making it ideal for forex, stocks, commodities, or crypto trading.
Why Collaborate on Inception?
Inception is a living project, and I’m excited to connect with traders, coders, and market enthusiasts who share a passion for innovative trading solutions. Whether you’re a Pine Script wizard, a backtesting guru, or a trader with insights to share, I’d love to collaborate to refine and enhance this strategy. Potential areas for collaboration include:
Optimizing signal weights for specific asset classes.
Integrating additional indicators or machine learning models.
Backtesting and stress-testing across diverse markets.
Developing a user-friendly interface for parameter tuning.
Join the Journey
If you’re intrigued by Inception’s potential and want to contribute to its evolution, let’s connect! Reach out via email at or message me directly on TradingView. Together, we can push the boundaries of algorithmic trading and turn Inception into a market-dominating force.
Pullback Strategy SpcL Edition By Mr.NΑυτό είναι ένα προηγμένο strategy για crypto trading, σχεδιασμένο για scalping και intraday συναλλαγές. Περιλαμβάνει:
• Λογική pullback εισόδου
• Επιβεβαίωση τάσης με πολλαπλά timeframes (MTF)
• Φίλτρα κινητών μέσων (Fast, Medium, Slow MA)
• Φίλτρα όγκου και μεταβλητότητας (volume & ATR)
• Δυναμικό και trailing Take Profit / Stop Loss
• Ρεαλιστικός υπολογισμός θέσης με βάση leverage
• Αυτόματα alerts συμβατά με WunderTrading bots
This is a high-performance, invite-only strategy for crypto traders, optimized for short-term scalping and intraday entries. Developed by Mr.N after extensive backtesting, it includes:
• Smart pullback entry logic
• Multi-timeframe trend confirmation
• Advanced MA filters (Fast, Medium, Slow)
• Volume spike and ATR volatility filters
• Dynamic & trailing SL/TP logic
• Realistic leverage-based position sizing
• Auto alerts for WunderTrading bots (JSON format)
Access is only granted to verified subscribers.
For access and support, contact:
Pyramiding Momentum (Less Lookahead) + PosSize LabelFutures Strategy based off of momentum and a proprietary list of factors.
SPY EMA Levels on RSPD/RSPS with SPY FilterBuys SPY when risk on environment occurs using the ratio of RSPD (equal weight discretionary) to RSPS (equal weight staples)
when the 9/20 EMA cross on that ratio occurs when SPY is above 20 EMA a buy occurs
A sell occurs when the 9/20 EMA ratio crosses downwards and SPY is below its 20 EMA
OB + FVG Strategy (No Sweep)looks for overlap between order blocks and fair value gaps that signal buys/sells with stop above the first candle that creates the fair value gap and targeting 2R profit.
Antony.N4A -MGC ORB Quartile Str v6.3 (Trial until 15/6/2025)🔷 Antony.N4A – MGC ORB Quartile Strategy v6.3
MGC ORB Quartile is a structured breakout strategy based on the Opening Range Breakout (ORB), enhanced with smart momentum and trend filters. It is designed for disciplined intraday execution and adaptable risk profiles.
🔹 Key Features:
Opening Range Breakout (ORB):
Automatically defines a breakout window (default: 09:30–09:45) and triggers entries when price breaks the high or low of that range.
Standard Deviation Profit Targets:
Supports SD0.5, SD1.0, SD1.5, and SD2.0 targets relative to the ORB range.
EMA Filtering (200-period):
Filters trades based on EMA direction and price position to validate breakout direction and avoid false entries.
Range Filtering:
Detects directional bias and volatility trends using smoothed range logic.
Momentum Triggering:
Validates breakout momentum and allows entries when directional momentum is positive and increasing.
⚙️ Trade Management Rules:
Entry:
Triggered at the close of a 5-minute candle confirming a breakout of the ORB range.
Stop Loss:
Defined by structural invalidation (quartile boundaries & mid-range buffers).
Take Profit Strategy:
75% closed at SD1.0 level
Remaining 25% trailed to further SD2 target
****SL is moved to breakeven after partial exit****
Execution Controls:
*No pyramiding
*No re-entries (cooldown enforced)
🔁 Trading Modes & Backtest Results:
1️⃣ Conservative Mode
Strictest filters combine: EMA filtering + RG filter for trend + Momentum Triggering
Excellent for clean-trend environments
Backtest (7 months):
✅ Win Rate: 73%
🧾 Total Trades: 15
💵 Earnings: $2314 (11.57R, R=200)
📉 Max Red Days in a Row: 1
🟥 Max Drawdown: $196
2️⃣ Moderate Mode
Balanced filter set combine: EMA filtering + RG filter for trend + Momentum Triggering
Optimized for broader market adaptability
Backtest (7 months):
✅ Win Rate: 72%
🧾 Total Trades: 32
💵 Earnings: $4373 (21.87R, R=200)
📉 Max Red Days in a Row: 3
🟥 Max Drawdown: $392
3️⃣ Aggressive Mode
No EMA filtering – higher opportunity, higher risk
Only RG filter for trend + Momentum Triggering
Ideal for experienced traders in trending conditions
Backtest (45 months):
✅ Win Rate: 64%
🧾 Total Trades: 45
💵 Earnings: $5126 (25.63R, R=200)
📉 Max Red Days in a Row: 4
🟥 Max Drawdown: $545
⏳ Trial Limitation:
This strategy version is active through June 15, 2025.
SF-NQ-3mThis is a short-term trading strategy based on the 3-minute timeframe. It uses multi-timeframe support and resistance zones combined with Bollinger Bands to determine market direction.
A long position is taken when the price breaks above the resistance zone, and a short position is taken when the price falls below the support zone.
A second set of Bollinger Bands is used as an additional layer of risk management.
Antony.N4A -NQ ORB Quartile Str v6.3 (Trial until 15/6/2025)📈 Antony.N4A - NQ ORB Quartile Strategy v6.3 (Trial until 15/06/2025)
A precision-engineered intraday breakout system built for the Nasdaq futures market, combining the Opening Range Breakout (ORB) logic with dynamic standard deviation targets, structural filters, and multi-layer risk management.
🧠 Key Features
Opening Range Breakout (ORB):
Automatically defines a breakout window (default: 09:30–09:45) and triggers entries when price breaks the high or low of that range.
Standard Deviation Profit Targets:
Supports SD0.5, SD1.0, SD1.5, and SD2.0 targets relative to the ORB range.
EMA Filtering (200-period):
Filters trades based on EMA direction and price position to validate breakout direction and avoid false entries.
Range Filtering:
Detects directional bias and volatility trends using smoothed range logic.
Momentum Triggering:
Validates breakout momentum and allows entries when directional momentum is positive and increasing.
⚙️ User Inputs
ORB Settings: Timeframe, session, and timezone customization
Entry Window: Define when trades are allowed to trigger
Day Filters: Enable/disable trading by weekday
SD Targets: Configure exit % and active levels (SD0.5 – SD2.0)
EMA Filter & Sensitivity
Cross Filter (Anti-chop logic)
Range Filter Parameters
Visual Toggles: ORB range, SD levels, EMA clouds
🎯 Trade Management Rules
Entry:
Triggered at the close of a 5-minute candle confirming a breakout of the ORB range.
Stop Loss:
Defined by structural invalidation (quartile boundaries & mid-range buffers).
Take Profit Strategy:
75% closed at SD1.0 level
Remaining 25% trailed to further SD2 target
****SL is moved to breakeven after partial exit****
Execution Controls:
*No pyramiding
*No re-entries (cooldown enforced)
🔧 Trading Modes
✅ Safe Mode
EMA Filter: Enabled
EMA Sensitivity: 19
Range Filter: Disabled
Ideal for conservative setups and reduced noise environments
🔥 Aggressive Mode
EMA Filter: Enabled
EMA Sensitivity: 5
Range Filter: Disabled
Suited for high-frequency setups and faster breakouts
📊 Backtest Performance (7-Month Sample)
Safe Mode:
Win Rate: 66%
Total Trades: 29
Net PnL: +21.79R (~$4,357 with R = $200)
Max Red Days: 3
Max Drawdown: -$663
Best Month: +9R, Worst Month: -2R
Aggressive Mode:
Win Rate: 63%
Total Trades: 52
Net PnL: +30R (~$6,080)
Max Red Days: 6
Max Drawdown: -$1,357
Best Month: +12R, Worst Month: -3.2R
🔒 Trial Mode Notice
This script is in trial mode and will only trigger new entries until June 15th, 2025.
After this date, entries are disabled, and a "⛔ Trial expired" label is shown on your chart.
👨💻 Developed by Antony.N4A
This tool is crafted for strategic intraday traders, system developers, and backtesters.
For full version access, customization, or licensing options, contact the developer directly.
📆 Trial Ends: June 15th, 2025
📈 Fully backtestable, clean logic, adjustable filters, and visual clarity.
STOBV-X v5: OBV Norm Signal Line Cross By momentumtradeThis strategy utilizes an adaptive momentum model based on OBV (On-Balance Volume) normalized by ATR to detect volume-driven market shifts. It eliminates fixed thresholding and instead uses signal line crossovers for cleaner and responsive trade entries.
🔹 Core Logic:
OBV Momentum is calculated by comparing cumulative volume shifts over a user-defined period.
The momentum is then normalized by ATR(26) × 100 for asset-agnostic scaling.
A signal line (default EMA-9) is applied to the normalized OBV momentum.
Entry signals occur when obv_norm crosses the signal line (crossover = Long, crossunder = Short).
Exits are triggered by the opposite signal (opposite crossover).
🔹 Features:
Clean cross-based entry logic, no static thresholds
Adaptive to different volatility environments via ATR
Includes alertcondition() for silent TradingView alerts without cluttering the chart
Fully backtestable as a TradingView strategy script
🔹 Recommended Use:
Best for spotting early momentum shifts driven by volume pressure, suitable for breakout or mean-reversion setups depending on confirmation filters.
Volume FIltered RSI Buy/Sell StrategyVolume Filtered RSI Buy/Sell Strategy
Introduction
This publication introduces the "Volume Filtered RSI Buy/Sell Strategy," a systematic trading approach designed specifically for cryptocurrency markets. This strategy combines RSI momentum signals with volume confirmation and precise candle pattern recognition to identify high-probability entry points while filtering out weak signals.
Overview
The strategy implements a multi-layered filtering system that requires several conditions to align before entering a trade. By requiring RSI momentum shifts, significant volume, and strong candle patterns, the system aims to capture only the most reliable trade setups. Built-in risk management features provide automatic stop-loss and take-profit placement based on either ATR volatility or fixed percentage risk.
Strategy Core Components:
RSI Momentum Detection : Identifies transitions from oversold to bullish (for longs) and overbought to bearish (for shorts)
Volume Confirmation : Ensures entries occur with above-average volume, filtering out low-liquidity signals
Candle Pattern Analysis : Requires strong bullish/bearish candles where the body comprises at least 50% of the candle range
Optional Supertrend Filter : Provides trend alignment confirmation across multiple timeframes
Dynamic ATR Stop-Loss System : Adapts protection levels based on current market volatility
Default Settings:
RSI Parameters : 14-period length with 70/30 overbought/oversold levels
Risk Management : 1.5 risk-reward ratio with option for ATR-based or fixed 0.5% stop-loss
Commission : 0.055% per trade (realistic for major exchanges)
Initial Capital : 100 USDT (realistic for average trader)
Order Size : Recommended 20 USDT per trade (20% risk per trade)
Entry Logic:
The strategy creates a powerful filtering system by requiring all of the following conditions to align:
Long Entry : RSI crosses above 30 from below + Strong bullish candle (body > 50% of range) + Volume > 14-period SMA
Short Entry : RSI crosses below 70 from above + Strong bearish candle (body > 50% of range) + Volume > 14-period SMA
Optional Trend Alignment : When enabled, entries must align with Supertrend direction
Exit Methods:
The strategy offers two comprehensive exit approaches:
ATR-Based : Dynamically calculates stop-loss and take-profit levels based on current volatility (3.5x ATR multiplier)
Fixed Percentage : Uses a consistent 0.5% stop-loss with take-profit set at 1.5x the risk distance
Visualization : All entry points, stop-loss levels and take-profit targets are clearly displayed on the chart
Why This Combination Works:
The power of this strategy comes from its multi-confirmation approach:
RSI identifies potential momentum shifts but can produce false signals in ranging markets
Volume confirmation ensures trades are only taken when sufficient market interest exists
Candle pattern requirements filter out weak reversals by demanding strong price action
When combined, these three filters significantly reduce false signals while capturing strong momentum shifts
Backtesting Results:
When tested on BTCUSDT 5-minute chart with the default settings:
Total trades: 53 (provides sufficient sample size)
Profitable trades: 58.49%
Profit factor: 1.472
Max drawdown: 3.01%
Net profit: +6.52%
Recommended Usage:
Optimal Timeframe : 5-minute chart for BTCUSDT
Trade Direction : Can be configured for Long-only, Short-only or Both directions
Risk Management : The default settings risk approximately 1% per trade with the recommended 20 USDT order size on 100 USDT capital
Indicator Mode : For those who prefer manual trade management, right-click on chart and disable "Trades On Chart"
Customization Options:
The strategy provides multiple parameters that can be adjusted to match different trading styles:
RSI length and overbought/oversold levels
ATR period for stop-loss calculation
Risk-reward ratio
Fixed stop-loss percentage
Optional Supertrend filter with adjustable factor and period
Disclaimer
This strategy is shared for educational purposes only. The default parameters have been tested to provide a balance between win rate and profitability, but past performance does not guarantee future results. The commission setting (0.055%) reflects realistic exchange fees, and the recommended position sizing (20% of capital) is higher than traditional 1-2% but represents common practice in cryptocurrency trading. Users should thoroughly test any changes to parameters before trading real capital.
BTC币本位MACD+RSI策略 (ADX过滤, Pine v6 Corrected Display)//@version=6
strategy("BTC币本位MACD+RSI策略 (ADX过滤, Pine v6 Corrected Display)", // 策略标题更新
overlay=true,
default_qty_type=strategy.percent_of_equity,
default_qty_value=10,
initial_capital=10000,
commission_value=0.075,
commission_type=strategy.commission.percent)
// --- 用户输入 ---
// 均线参数
string group_ma = "均线参数 (Moving Averages)"
len_ema_short = input.int(21, title="短期EMA周期", group = group_ma, tooltip="默认21")
len_ema_mid = input.int(55, title="中期EMA周期", group = group_ma, tooltip="默认55")
len_ema_long = input.int(144, title="长期EMA周期", group = group_ma, tooltip="默认144")
len_ema_ultra_long = input.int(233, title="超长EMA周期", group = group_ma, tooltip="默认233")
// MACD参数
string group_macd = "MACD参数"
macd_fast_len = input.int(12, title="快速EMA", group = group_macd, tooltip="默认12")
macd_slow_len = input.int(26, title="慢速EMA", group = group_macd, tooltip="默认26")
macd_signal_len = input.int(9, title="信号线SMA", group = group_macd, tooltip="默认9")
// Stochastic RSI参数
string group_stoch_rsi = "Stochastic RSI参数"
rsi_len_for_stoch = input.int(14, title="RSI周期 (用于StochRSI)", group = group_stoch_rsi, tooltip="默认14")
stoch_rsi_len = input.int(14, title="Stoch周期 (用于StochRSI)", group = group_stoch_rsi, tooltip="Stochastic计算RSI高低值的周期, 默认14")
stoch_k_smooth = input.int(3, title="%K平滑周期", group = group_stoch_rsi, tooltip="默认3")
stoch_d_smooth = input.int(3, title="%D平滑周期", group = group_stoch_rsi, tooltip="默认3")
// 趋势过滤器参数
string group_filter = "趋势过滤器 (Trend Filter)"
adx_len = input.int(14, title="ADX周期", group = group_filter, tooltip="默认14")
adx_threshold = input.float(20, title="ADX阈值", group = group_filter, tooltip="ADX大于此值时认为有趋势, 默认20")
// --- 计算指标 ---
// 均线 (Moving Averages)
ema_short = ta.ema(close, len_ema_short)
ema_mid = ta.ema(close, len_ema_mid)
ema_long = ta.ema(close, len_ema_long)
ema_ultra_long = ta.ema(close, len_ema_ultra_long)
// MACD
= ta.macd(close, macd_fast_len, macd_slow_len, macd_signal_len)
// Stochastic RSI
rsi_for_stoch_calc = ta.rsi(close, rsi_len_for_stoch)
stoch_rsi_raw_k = ta.stoch(rsi_for_stoch_calc, rsi_for_stoch_calc, rsi_for_stoch_calc, stoch_rsi_len)
stoch_rsi_k = ta.sma(stoch_rsi_raw_k, stoch_k_smooth)
stoch_rsi_d = ta.sma(stoch_rsi_k, stoch_d_smooth)
// ADX (Average Directional Index)
= ta.dmi(adx_len, adx_len)
is_trending_filter_active = adx_val > adx_threshold
// --- 计算斜率 (Slopes) ---
ema_short_slope_positive = ema_short > ema_short
stoch_rsi_d_slope_positive = stoch_rsi_d > stoch_rsi_d
// --- 开多条件 (Long Entry Conditions) ---
cond_long_1_macd = ta.crossover(macdLine, signalLine) and macdLine > 0
cond_long_2_stoch_rsi_slope = stoch_rsi_d_slope_positive
cond_long_3_ema_slope = ema_short_slope_positive
openLongOriginal = cond_long_1_macd and cond_long_2_stoch_rsi_slope and cond_long_3_ema_slope
openLongCondition = openLongOriginal and is_trending_filter_active
// --- 平多条件 (Close Long Conditions) ---
cond_close_long_1_macd_cross = ta.crossunder(macdLine, signalLine)
cond_close_long_2_price_cross_ema = ta.crossunder(close, ema_short)
closeLongCondition = cond_close_long_1_macd_cross or cond_close_long_2_price_cross_ema
// --- 开空条件 (Short Entry Conditions) ---
cond_short_1_stoch_rsi_d_slope_turn_neg = stoch_rsi_d >= stoch_rsi_d and stoch_rsi_d < stoch_rsi_d
cond_short_2_stoch_rsi_d_over_80 = stoch_rsi_d > 80
cond_short_3_price_below_long_emas = close < ema_long or close < ema_ultra_long
openShortOriginal = cond_short_1_stoch_rsi_d_slope_turn_neg and cond_short_2_stoch_rsi_d_over_80 and cond_short_3_price_below_long_emas
openShortCondition = openShortOriginal and is_trending_filter_active
// --- 平空条件 (Close Short Conditions) ---
stoch_rsi_d_below_30 = stoch_rsi_d < 30
stoch_d_slope_prev_neg_or_zero = stoch_rsi_d <= stoch_rsi_d
stoch_d_slope_curr_positive = stoch_rsi_d > stoch_rsi_d
stoch_d_turns_positive_from_neg_or_zero = stoch_d_slope_prev_neg_or_zero and stoch_d_slope_curr_positive
cond_close_short_stoch = stoch_rsi_d_below_30 and stoch_d_turns_positive_from_neg_or_zero
cond_close_short_ema_cross = open < ema_short and close > ema_short
closeShortCondition = cond_close_short_stoch or cond_close_short_ema_cross
// --- 策略执行 (Strategy Execution) ---
if openLongCondition
strategy.entry("EL", strategy.long, comment="开多")
if closeLongCondition
strategy.close("EL", comment="平多")
if openShortCondition
strategy.entry("ES", strategy.short, comment="开空")
if closeShortCondition
strategy.close("ES", comment="平空")
// --- 绘图 (Plotting) ---
// 均线
plot(ema_short, title="短期均线", color=color.blue, linewidth=1)
plot(ema_mid, title="中期均线", color=color.orange, linewidth=1)
plot(ema_long, title="长期均线", color=color.red, linewidth=2)
plot(ema_ultra_long, title="超长均线", color=color.purple, linewidth=2)
// ADX (可选,用于调试过滤器效果) - 已注释以避免影响主图Y轴
// plot(adx_val, title="ADX", color=color.teal, display=display.data_window)
// hline(adx_threshold, "ADX门槛", color=color.new(color.gray, 50), linestyle=hline.style_dashed)
// 交易信号 (可选,用于调试)
plotshape(openLongCondition, title="开多信号", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.normal)
plotshape(closeLongCondition and strategy.position_size > 0, title="平多信号", location=location.abovebar, color=color.maroon, style=shape.xcross, size=size.small)
plotshape(openShortCondition, title="开空信号", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.normal)
plotshape(closeShortCondition and strategy.position_size < 0, title="平空信号", location=location.belowbar, color=color.teal, style=shape.xcross, size=size.small)
Twin Range Filter StrategyThis is the strategy version of the popular Twin Range Filter by colinmck.
Recommended use with Renko Candlesticks.
Source:
My strategy"SCALPERS MOVE
"Printes the scalp before the scalp.Blue arrow up(bullish).Red arrow down (bearish)
Koin AlgoThis strategy looks at previous daily high and low to see if there is a closure above or below and will take a trade according to that. You input the max risk you want to take per trade and it goes for a 1:1 RR each time.