EMA 8/33 Optimized Crossover w/FilterThis strategy is ideal for fast-moving assets like cryptocurrencies (e.g., SOLUSDT) on intraday to swing trading timeframes. Its robust filtering aims for fewer trades but with higher accuracy, producing a smoother equity curve and lower drawdown in your backtests.
You can further optimize the EMA lengths, minimum candle size, and TP/SL percentages to suit your preferred asset and timeframe.
指标和策略
维加斯双通道策略Vegas Channel Comprehensive Strategy Description
Strategy Overview
A comprehensive trading strategy based on the Vegas Dual Channel indicator, supporting dynamic position sizing and fund management. The strategy employs a multi-signal fusion mechanism including classic price crossover signals, breakout signals, and retest signals, combined with trend filtering, RSI+MACD filtering, and volume filtering to ensure signal reliability.
Core Features
Dynamic Position Sizing: Continue adding positions on same-direction signals, close all positions on opposite signals
Smart Take Profit/Stop Loss: ATR-based dynamic TP/SL, updated with each new signal
Fund Management: Supports dynamic total amount management for compound growth
Time Filtering: Configurable trading time ranges
Risk Control: Maximum order limit to prevent over-leveraging
Leverage Usage Instructions
Important: This strategy does not use TradingView's margin functionality
Setup Method
Total Amount = Actual Funds × Leverage Multiplier
Example: Have 100U actual funds, want to use 10x leverage → Set total amount to 100 × 10 = 1000U
Trading Amount Calculation
Each trade percentage is calculated based on leveraged amount
Example: Set 10% → Actually trade 100U margin × 10x leverage = 1000U trading amount
Maximum Orders Configuration
Must be used in conjunction with leveraged amount
Example: 1000U total amount, 10% per trade, maximum 10 orders = maximum use of 1000U
Note: Do not exceed 100% of total amount to avoid over-leveraging
Parameter Configuration Recommendations
Leverage Configuration Examples
Actual funds 100U, 5x leverage, total amount setting 500U, 10% per trade, 50U per trade, recommended maximum orders 10
Actual funds 100U, 10x leverage, total amount setting 1000U, 10% per trade, 100U per trade, recommended maximum orders 10
Actual funds 100U, 20x leverage, total amount setting 2000U, 5% per trade, 100U per trade, recommended maximum orders 20
Risk Control
Conservative: 5-10x leverage, 10% per trade, maximum 5-8 orders
Aggressive: 10-20x leverage, 5-10% per trade, maximum 10-15 orders
Extreme: 20x+ leverage, 2-5% per trade, maximum 20+ orders
Strategy Advantages
Signal Reliability: Multiple filtering mechanisms reduce false signals
Capital Efficiency: Dynamic fund management for compound growth
Risk Controllable: Maximum order limits prevent liquidation
Flexible Configuration: Supports various leverage and fund allocation schemes
Time Control: Configurable trading hours to avoid high-risk periods
Usage Notes
Ensure total amount is set correctly (actual funds × leverage multiplier)
Maximum orders should not exceed the range allowed by total funds
Recommend starting with conservative configuration and gradually adjusting parameters
Regularly monitor strategy performance and adjust parameters timely
维加斯通道综合策略说明
策略概述
基于维加斯双通道指标的综合交易策略,支持动态加仓和资金管理。策略采用多信号融合机制,包括经典价穿信号、突破信号和回踩信号,结合趋势过滤、RSI+MACD过滤和成交量过滤,确保信号的可靠性。
核心功能
动态加仓:同向信号继续加仓,反向信号全部平仓
智能止盈止损:基于ATR的动态止盈止损,每次新信号更新
资金管理:支持动态总金额管理,实现复利增长
时间过滤:可设置交易时间范围
风险控制:最大订单数限制,防止过度加仓
杠杆使用说明
重要:本策略不使用TradingView的保证金功能
设置方法
总资金 = 实际资金 × 杠杆倍数
示例:实际有100U,想使用10倍杠杆 → 总资金设置为 100 × 10 = 1000U
交易金额计算
每笔交易百分比基于杠杆后的金额计算
示例:设置10% → 实际交易 100U保证金 × 10倍杠杆 = 1000U交易金额
最大订单数配置
必须配合杠杆后的金额使用
示例:1000U总资金,10%单笔,最大10单 = 最多使用1000U
注意:不要超过总资金的100%,避免过度杠杆
参数配置建议
杠杆配置示例
实际资金100U,5倍杠杆,总资金设置500U,单笔百分比10%,单笔金额50U,建议最大订单数10单
实际资金100U,10倍杠杆,总资金设置1000U,单笔百分比10%,单笔金额100U,建议最大订单数10单
实际资金100U,20倍杠杆,总资金设置2000U,单笔百分比5%,单笔金额100U,建议最大订单数20单
风险控制
保守型:5-10倍杠杆,10%单笔,最大5-8单
激进型:10-20倍杠杆,5-10%单笔,最大10-15单
极限型:20倍以上杠杆,2-5%单笔,最大20单以上
策略优势
信号可靠性:多重过滤机制,减少假信号
资金效率:动态资金管理,实现复利增长
风险可控:最大订单数限制,防止爆仓
灵活配置:支持多种杠杆和资金配置方案
时间控制:可设置交易时间,避开高风险时段
使用注意事项
确保总资金设置正确(实际资金×杠杆倍数)
最大订单数不要超过总资金允许的范围
建议从保守配置开始,逐步调整参数
定期监控策略表现,及时调整参数
KEEN risk cashthis strategy is based on orb 5 minutes and is set off for risk per trade and take profit.
try yourself and let me know how it works
EMA Crossover Cloud w/Range-Bound FilterA focused 1-minute EMA crossover trading strategy designed to identify high-probability momentum trades while filtering out low-volatility consolidation periods that typically result in whipsaw losses. Features intelligent range-bound detection and progressive market attention alerts to help traders manage focus and avoid overtrading during unfavorable conditions.
Key Features:
EMA Crossover Signals: 10/20 EMA crossovers with volume surge confirmation (1.3x 20-bar average)
Range-Bound Filter: Automatically detects when price is consolidating in tight ranges (0.5% threshold) and blocks trading signals during these periods
Progressive Consolidation Stages: Visual alerts progress through Range Bound (red) → Coiling (yellow) → Loading (orange) → Trending (green) to indicate market compression and potential breakout timing
Market Attention Gauge: Helps manage focus between active trading and other activities with states: Active (watch close), Building (check frequently), Quiet (check occasionally), Dead (handle other business)
Smart RSI Exits: Cloud-based and RSI extreme level exits with conservative stop losses
Dual Mode Operation: Separate settings allow full backtesting performance while providing visual stay-out warnings for manual trading
How to Use:
Entry Signals: Trade aqua up-triangles (long) and orange down-triangles (short) when they appear with volume confirmation
Stay-Out Warnings: Ignore gray "RANGE" triangles - these indicate crossovers during range-bound periods that should be avoided
Monitor Top-Right Display:
Range: Current 60-bar dollar range
Attention: Market activity level for focus management
Status: Consolidation stage (trade green/yellow, avoid red, prepare for orange)
Position Sizing: Default 167 shares per signal, optimized for the crossover frequency
Alerts: Enable consolidation stage alerts and market attention alerts for automated notifications
Recommended Settings:
Timeframe: 1-minute charts
Symbol: Optimized for volatile stocks like TSLA
"Apply Filter to Backtest": Keep OFF for realistic backtesting, ON to see filtered results
Risk Management:
The strategy includes built-in overtrading protection by identifying and blocking trades during low-volatility periods. The progressive consolidation alerts help identify when markets are "loading" for significant moves, allowing traders to position appropriately for higher-probability setups.
SMA Cross 5/50 with Trend Filter & Risk Management by JuggiDThe basic SMA (5/50) crossover strategy can be enhanced to improve profitability by adding filters and risk management. For example, a long entry is triggered only when the fast SMA (5) crosses above the slow SMA (50) **and** the price is above the SMA (200), ensuring trades align with the major trend. Similarly, a short entry requires the crossover confirmation plus the price staying below the SMA (200). To reduce false signals and protect capital, stop-loss and take-profit levels can be set automatically (e.g., 2% loss, 5% gain), while additional confirmation tools such as volume spikes, RSI above 50, or MACD momentum can be applied to validate stronger signals. This approach helps avoid whipsaws in sideways markets and allows trades to capture larger moves while minimizing downside risk.
KDJ – Long Only v3.0 (TradingView Strategy)
Overview|概覽
EN
A research strategy that automates long-only entries using a KDJ-centric core with multi-layer confirmations and volatility-aware exits. Default preset targets ETH 5m; other symbols/timeframes can be tuned.
中文
研究用策略,透過 KDJ 核心與多層確認來自動化只做多進場,並以隨波動調整的出場邏輯運作。預設為 ETH 5 分鐘;其他商品/週期可自行調參。
Backtest (hypothetical) example: ETHUSDT.P, 5m, 2024-09-18→2025-09-18, fee 0.05%, slippage 1 tick.(僅示意,屬假設性回測)
What it does|做什麼
EN
Signals are organized into channels:
A KDJ trend core
B OB/FVG touch pullback
CP Double-bottom (buffered neckline)
SR Support/Resistance bounce with rejection/zone checks
D EMA pullback (long EMA length)
E VWAP reclaim (lower-band pierce & recapture)
F Prior-low sweep & reclaim
中文
訊號分成多通道:
A KDJ 順勢核心
B OB/FVG 回踩觸價
CP 雙底(頸線含緩衝)
SR 支撐/阻力觸價不破(含拒絕與區域檢查)
D EMA 回踩(長週期 EMA)
E VWAP 收復(下緣穿越後收回)
F 前低掃回
High-level logic|高層級原理
HTF/Mid-TF context:內建 5/15/1H 或 15/60/4H 組合;以簡化趨勢線/區域提供觸價參考
Trend & structure:本階 EMA(8/21/200) 結構;Structure Breakout(近期高低點 ±ATR 緩衝)/EMA8/21 回踩
Momentum/volume:MACD、KDJ 金叉與低區偵測、量能驗證
Regime:ADX 閘(趨勢/盤整門檻)、EMA 帶寬過濾震盪、Peak Guard 避免過度延伸
No look-ahead:入場不使用前視;樞紐/趨勢線僅作情境參考
Inputs & Features|參數與功能
Market Preset:Generic / ETH(ETH 預設收緊若干門檻,開箱即用)
Entry Mode:KDJ_Core / CandleOnly / KDJ_and_Candle
Session Filter:最多三段交易時窗
Lite Filters:過度延伸、實體大小、DI 差距
S/R 模組:拒絕條件、KDJ 覆核、區域要求、即時 R:R 檢核
OrderBlock/FVG:近棒位移掃描
Chart Pattern:雙底 W,ATR 容差與頸線緩衝
Plotting:EMA200、通道字母標記、可選 TP/SL 標籤
Automation via Alerts(generic)|快訊自動化(通用)
EN
On entries/exits the strategy emits JSON through alert_message. Create alerts with “Any alert() function call” and route them to your own webhook/bridge. Symbol mapping, sizing mode, and user info are configurable in inputs.
中文
進出場時透過 alert_message 輸出 JSON。建立快訊時選 “Any alert() function call”,再由你的 webhook/橋接服務轉單;輸入面板可設定商品代碼、下單型式與使用者資訊。
提示:調整參數後,請重建快訊,並將訊息欄設為 {{strategy.order.alert_message}}。
Position sizing|部位大小
base / quote / percent_local / percent(percent_local 以本地 USD 估值計算)
可選「按數量模式」以便與本地部位同步(position_size sync)
Risk & Exits|風險與出場
SL:ATR / Swing / ATR_or_Swing;TP Cap 以 ATR 或 % 限制上限
Breakeven & Trailing:達指定 R:R 啟動保本;之後以 最高價回看 − ATR×k 追蹤
Same-bar exits:可允許/禁止同根觸發 TP/SL
Pyramiding:pyramiding=2,最多兩筆多單可同時存在(淨倉交易所請留意整體倉位的平倉行為)
Suggested workflow|建議流程
回測目標市場/週期 → 設定時段/濾網與門檻 → 微調 TP/SL 與部位大小 → 建立快訊({{strategy.order.alert_message}})→ 監看執行日誌
Notes & Disclaimer|注意與免責
回測結果仰賴時間框解析與成交規則;棒內路徑與實盤可能不同
僅供研究/教育;非投資建議
本頁無廣告、無外部連結或聯絡資訊
Release Notes|版本說明
2025-09-19
新增:One-shot Force Flat(一鍵清倉僅一次)— 於下一根收盤執行,完成後自動失效
Webhook:進/出場皆輸出 JSON;提醒更新參數後重建快訊
行為澄清:pyramiding=2,允許同圖表最多兩筆多單並存;同棒出場可設定
2025-09-18
Netted venue 說明:在淨倉模式下,出場會影響同商品的整體淨多倉;請留意手動單與策略單的互動
2025-08-28
修正小數顯示;預設優化(ETH/5m);保留隨波動的 RR/SL 邏輯
💎 WarrIA Pro v1.0 - Multidimensional Crypto Trading System💎 WarrIA Pro v1.0 - Multidimensional Crypto Trading System
The Unfair Advantage You've Been Looking For.
Version 1.0 | © 2025 Warri Finance - All Rights Reserved
Triple Quad Frosty v4.5Triple Quad Frosty v4.5 is a Renko-friendly strategy that lets you trade from up to four signal sources per side. Orders are only placed when your chosen conditional filters (A/B/C) agree, giving you full control over when entries are valid. You decide how signals must line up — from simple single-source triggers to majority or full agreement across all four.
Renko-based, with customizable static stops, take profits, and trailing stops. Time/day filters, daily trade limits, and forced closures let you restrict trading to specific windows.
The HTF filters in Triple Quad Frosty v4.5 use a higher-timeframe Hull Moving Average (HMA) to confirm trend direction, while slope and distance settings on the local HMA help filter out weak or choppy setups. Longs only trigger when price is above the HTF HMA and meets slope/distance requirements, and shorts only when the opposite is true.
Color-coded labels mark each exit as a win or loss, with reversal trades labeled separately for clarity. Conditional bars plotted above and below the chart show when the A/B/C filters align on a long or short bias, giving clear visual confirmation of entry conditions. Stop loss and take profit levels are plotted directly on the chart with guide lines, so you can easily track active trade management in real time.
[K] MA Deviation Strategy Pro**This strategy is designed to demonstrate strength in sideways markets (range-bound), using envelope to determine entry and SMA to determine exit.**
**Key Points:**
• **Flexible optimization**: The strategy can be optimized by operating Long (buy) and Short (sell) positions with separate and independent settings.
• **Important risk management**: Since the maximum drawdown (maximum loss) can be significant, it is recommended to operate with low leverage.
**Strategy Summary:**
- **Entry signal**: Determined by the envelope indicator
- **Exit signal**: Determined by SMA (Simple Moving Average)
- **Ideal environment**: Range-bound (sideways) markets
- **Configuration**: Long and Short with independent parameters
- **Recommendation**: Use low leverage due to high drawdown risk
This is a strategy suitable for markets that oscillate within a defined price range, without a clear upward or downward trend.
Grand Master's Candlestick Dominance (ATR Enhanced)### Grand Master's Candlestick Dominance (ATR Enhanced)
**Overview**
Unleash the ancient wisdom of Japanese candlestick charting with a modern twist! This comprehensive Pine Script v5 strategy and indicator scans for over 75 classic and advanced candlestick patterns (bullish, bearish, and neutral), assigning dynamic strength scores (1-10) to each for precise signal filtering. Enhanced with Average True Range (ATR) for volatility-aware body size validation, it dominates the markets by combining timeless pattern recognition with robust confirmation layers. Whether used as a backtestable strategy or visual indicator, it empowers traders to spot high-probability reversals, continuations, and indecision setups with surgical accuracy.
Inspired by Steve Nison's *Japanese Candlestick Charting Techniques*, this tool elevates pattern analysis beyond basics—think Hammers, Engulfing patterns, Morning Stars, and rare gems like Abandoned Baby or Concealing Baby Swallow—all consolidated into intelligent arrays for real-time averaging and prioritization.
**Key Features**
- **Extensive Pattern Library**:
- **Bullish (25+ patterns)**: Hammer (8.0), Bullish Engulfing (10.0), Morning Star (7.0), Three White Soldiers (9.0), Dragonfly Doji (8.0), and more (e.g., Rising Three, Unique Three River Bottom).
- **Bearish (25+ patterns)**: Hanging Man (8.0), Bearish Engulfing (10.0), Evening Star (7.0), Three Black Crows (9.0), Gravestone Doji (8.0), and exotics like Upside Gap Two Crows or Stalled Pattern.
- **Neutral/Indecision (34+ patterns)**: Doji variants (Long-Legged, Four Price), Spinning Tops, Harami Crosses, and multi-bar setups like Upside Tasuki Gap or Advancing Block.
Each pattern includes duration tracking (1-5 bars) and ATR-adjusted body/shadow criteria for relevance in volatile conditions.
- **Smart Confirmation Filters** (All Toggleable):
- **Trend Alignment**: 20-period SMA (customizable) ensures entries align with the prevailing trend; optional higher timeframe (e.g., Daily) MA crossover for multi-timeframe confluence.
- **Support/Resistance (S/R)**: Pivot-based levels with 0.01% tolerance to confirm bounces or breaks.
- **Volume Surge**: 20-period volume MA with 1.5x spike multiplier to validate momentum.
- **ATR Body Sizing**: Filters small bodies (<0.3x ATR) and long bodies (>0.8x ATR) for context-aware pattern reliability.
- **Follow-Through**: Ensures post-pattern confirmation via bullish/bearish closes or closes beyond prior bars.
Minimum average strength (default 7.0) and individual pattern thresholds (5.0) prevent weak signals.
- **Entry & Exit Logic**:
- **Long Entry**: Bullish average strength ≥7.0 (outweighing bearish), uptrend, volume spike, near support, follow-through, and HTF alignment.
- **Short Entry**: Mirror for bearish dominance in downtrends near resistance.
- **Exits**: Bearish/neutral shift, or fixed TP (5%) / SL (2%)—pyramiding disabled, 10% equity sizing.
- Backtest range: Jan 1, 2020 – Dec 31, 2025 (editable). Initial capital: $10,000.
- **Interactive Dashboard** (Top-Right Panel):
Real-time insights including:
- Market phase (e.g., "Bullish Phase (Avg Str: 8.2)"), active pattern (e.g., "BULLISH: Bullish Engulfing (Str: 10.0, Bars: 2)"), and trend status.
- Strength breakdowns (Bull/Bear/Neutral counts & averages).
- Filter status (e.g., "Volume: ✔ Spike", "ATR: Enabled (L:0.8, S:0.3)").
- Backtest stats: Total trades, win rate, streak, and last entry/exit details (price & timestamp).
Toggle mode: Strategy (live trades) or Indicator (signals only).
- **Advanced Alerts** (15+ Toggleable Types):
Set up via TradingView's "Any alert() function call" for bar-close triggers:
- Entry/Exit signals with strength & pattern details.
- Strong patterns (≥2 bullish/bearish), neutral indecision, volume spikes.
- S/R breakouts, HTF reversals, high-confidence singles (≥8.0 strength).
- Conflicting signals, MA crossovers, ATR volatility bursts, multi-bar completions.
Example: "STRONG BULLISH PATTERN detected! Strength: 9.5 | Top Pattern: Three White Soldiers | Trend: Up".
**Customization & Usage Tips**
- **Inputs Groups**: Strategy toggles, confirmations, exits, backtest dates, and 15+ alert switches—all intuitively grouped.
- **Optimization**: Tune min strengths for aggressive (lower) or conservative (higher) trading; enable/disable filters to suit your style (e.g., disable S/R for scalping).
- **Best For**: Forex, stocks, crypto on 1H–Daily charts. Test on historical data to refine TP/SL.
- **Limitations**: No external data installs; relies on built-in TA functions. Patterns are probabilistic—combine with your risk management.
Master the candles like a grandmaster. Deploy on TradingView, backtest relentlessly, and let dominance begin! Questions? Drop a comment.
*Version: 1.0 | Updated: September 2025 | Credits: Built on Pine Script v5 with nods to Nison's timeless techniques.*
Sr.Rma.Breakout.Fib (Merged)DO YOUR DUE DILIGENCE – THIS IS FOR EDUCATIONAL PURPOSE AND NOT A TRADE ADVICE-
This strategy is designed for traders who want to merge pattern recognition (breakouts) with market structure context (Fibonacci), while maintaining disciplined trade management through automated stop-loss and reversal logic. “Once the chart is added, please ensure the candle pattern is set to Heikin Ashi.”
1. Breakout Finder Logic
The breakout finder identifies bullish and bearish breakouts using pivots, thresholds, and test counts:
• Pivot Highs & Lows (PH/PL): Calculated using user-defined periods.
• Breakout Threshold: Dynamic channel width based on recent volatility.
• Confirmation: A breakout is validated when price action clears the breakout Conditions
• Bullish Breakout: Triggered when multiple pivot highs are cleared by bullish Conditions.
• Bearish Breakout: Triggered when multiple pivot lows are broken by bearish Conditions.
• Sessions ignored: Traders can exclude up to three custom time windows to prevent signals during low-quality periods.
Risk & Reversal Controls
• Stop-Loss: Adjustable % thresholds for both long and short trades.
• Reversal Entries: Optional signals that trigger after a stop-loss, capturing potential price reversals.
2. Strategy Order Management
The strategy executes entries and exits based on confirmed breakout and reversal signals:
• Entries:
o Long on confirmed bullish breakout.
o Short on confirmed bearish breakout.
• Stops:
o Automatic closure of open positions when stop-loss conditions are hit.
• Reversals:
o Transition directly from long to short or vice versa when reversal conditions are met.
3. Auto Fibonacci Retracement
A ZigZag-based system automatically plots Fibonacci retracement levels on the chart:
• Swing Context: Derived dynamically from pivots with adjustable depth and deviation settings.
• Fib Levels: Standard retracement and extension levels (0.236, 0.382, 0.5, 0.618, 0.786, 1.0, 1.618, 2.618, 3.618, 4.236, etc.) are supported.
• Custom Options:
o Extend lines left or right.
o Show/hide level prices and percentage values.
o Control label positions (left or right).
o Adjustable transparency for background fills between levels.
• Crossing Alerts: Alerts are fired when the price crosses specific Fibonacci levels, enhancing confluence with breakout signals.
5. Key Benefits
• Comprehensive Trading Framework: Combines breakout confirmation, risk management, and Fibonacci context.
• Visual Clarity: Automatic plotting of breakout structures and Fib levels makes the chart intuitive.
• Flexible Controls: Full customization of pivots, thresholds, sessions, stop-loss %, and Fib settings.
• Automation Ready: Alerts and strategy orders allow seamless integration with brokers or external systems.
Marcels ComboMulti-timeframe trend + reversal strategy using EMA200, BBTrend, Ichimoku Cloud, and price pullbacks. Trades only when all filters align in any of 3 timeframe combos. Designed for disciplined, low-drawdown entries with fixed TP/SL and flat-only logic.
Nirvana True Duel전략 이름
열반의 진검승부 (영문: Nirvana True Duel)
컨셉과 철학
“열반의 진검승부”는 시장 소음은 무시하고, 확실할 때만 진입하는 전략입니다.
EMA 리본으로 추세 방향을 확인하고, 볼린저 밴드 수축/확장으로 변동성 돌파를 포착하며, OBV로 거래량 확인을 통해 가짜 돌파를 필터링합니다.
전략 로직
매수 조건 (롱)
20EMA > 50EMA (상승 추세)
밴드폭 수축 후 확장 시작
종가가 상단 밴드 돌파
OBV 상승 흐름 유지
매도 조건 (숏)
20EMA < 50EMA (하락 추세)
밴드폭 수축 후 확장 시작
종가가 하단 밴드 이탈
OBV 하락 흐름 유지
진입·청산
손절: ATR × 1.5 배수
익절: 손절폭의 1.5~2배에서 부분 청산
시간 청산: 설정한 최대 보유 봉수 초과 시 강제 청산
장점
✅ 추세·변동성·거래량 3중 필터 → 노이즈 최소화
✅ 백테스트·알람 지원 → 기계적 매매 가능
✅ 5분/15분 차트에 적합 → 단타/스윙 트레이딩 활용 가능
주의점
⚠ 횡보장에서는 신호가 적거나 실패 가능
⚠ 수수료·슬리피지 고려 필요
📜 Nirvana True Duel — Strategy Description (English)
Name:
Nirvana True Duel (a.k.a. Nirvana Cross)
Concept & Philosophy
The “Nirvana True Duel” strategy focuses on trading only meaningful breakouts and avoiding unnecessary noise.
Nirvana: A calm, patient state — waiting for the right opportunity without emotional trading.
True Duel: When the signal appears, enter decisively and let the market reveal the outcome.
In short: “Ignore market noise, trade only high-probability breakouts.”
🧩 Strategy Components
Trend Filter (EMA Ribbon): Stay aligned with the main market trend.
Volatility Squeeze (Bollinger Band): Detect volatility contraction & expansion to catch explosive moves early.
Volume Confirmation (OBV): Filter out false breakouts by confirming with volume flow.
⚔️ Entry & Exit Conditions
Long Setup:
20 EMA > 50 EMA (uptrend)
BB width breaks out from recent squeeze
Close > Upper Bollinger Band
OBV shows positive flow
Short Setup:
20 EMA < 50 EMA (downtrend)
BB width breaks out from recent squeeze
Close < Lower Bollinger Band
OBV shows negative flow
Risk Management:
Stop Loss: ATR × 1.5 below/above entry
Take Profit: 1.5–2× stop distance, partial take-profit allowed
Time Stop: Automatically closes after max bars held (e.g. 8h on 5m chart)
✅ Strengths
Triple Filtering: Trend + Volatility + Volume → fewer false signals
Mechanical & Backtestable: Ideal for objective trading & performance validation
Adaptable: Works well on Bitcoin, Nasdaq futures, and other high-volatility markets (5m/15m)
⚠️ Things to Note
Low signal frequency or higher failure rate in sideways/range markets
Commission & slippage should be factored in, especially on lower timeframes
ATR multiplier and R:R ratio should be optimized per asset
ADRIXAUUSD - BUY/SELL (MultiTF Strategy + Labels + Alerts)This strategy is designed for XAU/USD (Gold) and can be tested on multiple timeframes (15m, 1H, 4H).
It combines several confluences for high-probability trades:
🔹 EMA Cross (Fast/Slow) to capture trend direction
🔹 Fibonacci Golden Zone retracements
🔹 Fair Value Gaps (FVG) for imbalance confirmation
🔹 ATR-based Stop Loss and Take Profit for adaptive risk management
The script works as both a backtesting strategy and a live indicator:
✅ Strategy Tester shows profit factor, win rate, and performance
✅ On-chart labels with "BUY" and "SELL"
✅ Built-in alerts for real-time notifications
Presets included:
- 15m Scalping (short-term, more trades)
- 1H Intraday (balanced)
- 4H Swing (longer-term, fewer but stronger setups)
ADRIXAUUSD BUY/SELL/AlertsThis strategy is designed for XAU/USD (Gold) on the 15-minute timeframe.
It combines multiple confluences to identify high-probability trades:
1) EMA Cross (9/50) to capture trend direction.
2) Fibonacci Golden Zone (0.236 – 0.786) as a key retracement area.
3) Fair Value Gaps (FVG) for imbalance confirmation.
4) ATR-based Stop Loss and Take Profit for adaptive risk management.
The script works as both a backtesting strategy and a live indicator:
✅ Strategy Tester shows profit factor, win rate, and performance.
✅ On-chart signals with "BUY 🚀" and "SELL 🔻".
✅ Built-in alerts for real-time notifications.
Ramen & OJ V1Ramen & OJ V1 — Strategy Overview
Ramen & OJ V1 is a mechanical price-action system built around two entry archetypes—Engulfing and Momentum—with trend gates, session controls, risk rails, and optional interval take-profits. It’s designed to behave the same way you’d trade it manually: wait for a qualified impulse, enter with discipline (optionally on a measured retracement), and manage the position with clear, rules-based exits.
Core Idea (What the engine does)
At its heart, the strategy looks for a decisive candle, then trades in alignment with your defined trend gates and flattens when that bias is no longer valid.
Entry Candle Type
Engulfing: The body of the current candle swallows the prior candle’s body (classic momentum shift).
Momentum: A simple directional body (close > open for longs, close < open for shorts).
Body Filter (lookback): Optional guard that requires the current body to be at least as large as the max body from the last N bars. This keeps you from chasing weak signals.
Primary MA (Entry/Exit Role):
Gate (optional): Require price to be above the Primary MA for longs / below for shorts.
Exit (always): Base exit occurs when price closes back across the Primary MA against your position.
Longs: qualifying bullish candle + pass all enabled filters.
Shorts: mirror logic.
Entries (Impulse vs. Pullback)
You choose how aggressive to be:
Market/Bars-Close Entry: Fire on the bar that confirms the signal (respecting filters and sessions).
Retracement Entry (optional): Instead of chasing the close, place a limit around a configurable % of the signal candle’s range (e.g., 50%). This buys the dip/sells the pop with structure, often improving average entry and risk.
Flip logic is handled: when an opposite, fully-qualified signal appears while in a position, the strategy closes first and then opens the new direction per rules.
Exits & Trade Management
Primary Exit: Price closing back across the Primary MA against your position.
Interval Take-Profit (optional):
Pre-Placed (native): Automatically lays out laddered limit targets every X ticks with OCO behavior. Each rung can carry its own stop (per-rung risk). Clean, broker-like behavior in backtests.
Manual (legacy): Closes slices as price steps through the ladder levels intrabar. Useful for platforms/brokers that need incremental closes rather than bracketed OCOs.
Per-Trade Stop: Choose ticks or dollars, and whether the $ stop is per position or per contract. When pre-placed TP is on, each rung uses a coordinated OCO stop; otherwise a single hard stop is attached.
Risk Rails (Session P&L Controls)
Session Soft Lock: When a session profit target or loss limit is hit, the strategy stops taking new trades but does not force-close open positions.
Session Hard Lock: On reaching your session P&L limit, all orders are canceled and the strategy flattens immediately. No new orders until the next session.
These rails help keep good days good and bad days survivable.
Filters & How They Work Together
1) Trend & Bias
Primary MA Gate (optional): Only long above / only short below. This keeps signals aligned with your primary bias.
Primary MA Slope Filter (optional): Require a minimum up/down slope (in degrees over a defined bar span). It’s a simple way to force impulse alignment—green light only when the MA is actually moving up for longs (or down for shorts).
Secondary MA Filter (optional): An additional trend gate (SMA/EMA, often a 200). Price must be on the correct side of this higher-timeframe proxy to trade. Great for avoiding countertrend picks.
How to combine:
Use Secondary MA as the “big picture” bias, Primary MA gate as your local regime check, and Slope to ensure momentum in that regime. That three-layer stack cuts a lot of chop.
2) Volatility/Exhaustion
CCI Dead Zone Filter (optional): Trades only when CCI is inside a specified band (default ±200). This avoids entries when price is extremely stretched; think of it as a no-chase rule.
TTM Squeeze Filter (optional): When enabled, the strategy avoids entries during a squeeze (Bollinger Bands inside Keltner Channels). You’re effectively waiting for the release, not the compression itself. This plays nicely with momentum entries and the slope gate.
How to combine:
If you want only the clean breaks, enable Slope + Squeeze; if you want structure but fewer chases, add CCI Dead Zone. You’ll filter out a lot of low-quality “wiggle” trades.
3) Time & Market Calendar
Sessions: Up to two session windows (America/Chicago by default), with background highlights.
Good-Till-Close (GTC): When ON, trades can close outside the session window; when OFF, all positions are flattened at session end and pending orders canceled.
Market-Day Filters: Skip US listed holidays and known non-full Globex days (e.g., Black Friday, certain eves). Cleaner logs and fewer backtest artifacts.
How to combine:
Run your A-setup window (e.g., cash open hour) with GTC ON if you want exits to obey system rules even after the window, or GTC OFF if you want the book flat at the bell, no exceptions.
Practical Profiles (mix-and-match presets)
Trend Rider: Primary MA gate ON, Slope filter ON, Secondary MA ON, Retracement ON (50%).
Goal: Only take momentum that’s already moving, buy the dip/sell the pop back into trend.
Structure-First Pullback: Primary MA gate ON, Secondary MA ON, CCI Dead Zone ON, Retracement 38–62%.
Goal: Filter extremes, use measured pullbacks for better R:R.
Break-Only Mode: Slope ON + Squeeze filter ON (avoid compression), Body filter ON with short lookback.
Goal: Only catch clean post-compression impulses.
Session Scalper: Tight session window, GTC OFF, Interval TP ON (small slices, short rungs), per-trade tick stop.
Goal: Quick hits in a well-defined window, always flat after.
Automation Notes
The system is built with intrabar awareness (calc_on_every_tick=true) and supports bracket-style behavior via pre-placed interval TP rungs. For webhook automation (e.g., TradersPost), keep chart(s) open and ensure alerts are tied to your order events or signal conditions as implemented in your alert templates. Always validate live routing with a small-size shakedown before scaling.
Tips, Caveats & Good Hygiene
Intrabar vs. Close: Backtests can fill intrabar where your broker might not. The pre-placed mode helps emulate OCO behavior but still depends on feed granularity.
Slippage & Fees: Set realistic slippage/commission in Strategy Properties to avoid fantasy equity curves.
Session Consistency: Use the correct timezone and verify that your broker’s session aligns with your chart session settings.
Don’t Over-stack Filters: More filters ≠ better performance. Start with trend gates, then add one volatility filter if needed.
Disclosure
This script is for educational purposes only and is not financial advice. Markets carry risk; only trade capital you can afford to lose. Test thoroughly on replay and paper before using any automated routing.
TL;DR
Identify a decisive candle → pass trend/vol filters → (optionally) pull back to a measured limit → scale out on pre-planned rungs → exit on Primary MA break or session rule. Clear, mechanical, repeatable.
DMI Toolbox StrategyThe Directional Movement Index (DMI) was originally developed by J. Welles Wilder Jr. in 1978. Wilder introduced the DMI along with the Average Directional Index (ADX) in his book, “New Concepts in Technical Trading Systems,” which became a foundational reference for technical analysis.
The indicator can offer a myriad of signals for building a trading strategy. In an effort to provide the user with a meaningful way to evaluate these signals, this DMI Toolbox Strategy offers the chance to back-test various combinations and permutations of DMI signals on long trades. By default it will open a long position on the +DI (upward movement) crossing above the -DI (downward movement). By default, It exits long positions when the ADX (trend strength) reverses.
Suggested Use
Try a wide variety of long entry and exit signals across many different timeframes to see what is most effective for the item you wish to trade. There is a table in the upper right corner that will give a quick view of which signal is dominant across 5 timeframes, based on your current settings. Adjust the pyramidding, slippage, and commission values to more closely match your situation.
Visual Helpers
The DMI indicator has been altered to include a smoothed version of the ADX, as well as a colored background to show which signal is dominant (+DI or -DI). Small up arrows call your attention to ADX crossovers that may indicate a significant threshold in trend strength.
Extremum Range MA Crossover Strategy1. Principle of Work & Strategy Logic ⚙️📈
Main idea: The strategy tries to catch the moment of a breakout from a price consolidation range (flat) and the start of a new trend. It combines two key elements:
Moving Average (MA) 📉: Acts as a dynamic support/resistance level and trend filter.
Range Extremes (Range High/Low) 🔺🔻: Define the borders of the recent price channel or consolidation.
The strategy does not attempt to catch absolute tops and bottoms. Instead, it enters an already formed move after the breakout, expecting continuation.
Type: Trend-following, momentum-based.
Timeframes: Works on different TFs (H1, H4, D), but best suited for H4 and higher, where breakouts are more meaningful.
2. Justification of Indicators & Settings ⚙️
A. Moving Average (MA) 📊
Why used: Core of the strategy. It smooths price fluctuations and helps define the trend. The price (via extremes) must cross the MA → signals a potential trend shift or strengthening.
Parameters:
maLength = 20: Default length (≈ one trading month, 20-21 days). Good balance between sensitivity & smoothing.
Lower TF → reduce (10–14).
Higher TF → increase (50).
maSource: Defines price source (default = Close). Alternatives (HL2, HLC3) → smoother, less noisy MA.
maType: Default = EMA (Exponential MA).
Why EMA? Faster reaction to recent price changes vs SMA → useful for breakout strategies.
Other options:
SMA 🟦 – classic, slowest.
WMA 🟨 – weights recent data stronger.
HMA 🟩 – near-zero lag, but “nervous,” more false signals.
DEMA/TEMA 🟧 – even faster & more sensitive than EMA.
VWMA 🔊 – volume-weighted.
ZLEMA ⏱ – reduced lag.
👉 Choice = tradeoff between speed of reaction & false signals.
B. Range Extremes (Previous High/Low) 📏
Why used: Define borders of recent trading range.
prevHigh = local resistance.
prevLow = local support.
Break of these levels on close = trigger.
Parameters:
lookbackPeriod = 5: Searches for highest high / lowest low of last 5 candles. Very recent range.
Higher value (10–20) → wider, stronger ranges but rarer signals.
3. Entry & Exit Rules 🎯
Long signals (BUY) 🟢📈
Condition (longCondition): Previous Low crosses MA from below upwards.
→ Price bounced from the bottom & strong enough to push range border above MA.
Execution: Auto-close short (if any) → open long.
Short signals (SELL) 🔴📉
Condition (shortCondition): Previous High crosses MA from above downwards.
→ Price rejected from the top, upper border failed above MA.
Execution: Auto-close long (if any) → open short.
Exit conditions 🚪
Exit Long (exitLongCondition): Close below prevLow.
→ Uptrend likely ended, range shifts down.
Exit Short (exitShortCondition): Close above prevHigh.
→ Downtrend likely ended, range shifts up.
⚠️ Important: Exit = only on candle close beyond extremes (not just wick).
4. Trading Settings ⚒️
overlay = true → indicators shown on chart.
initial_capital = 10000 💵.
default_qty_type = strategy.cash, default_qty_value = 100 → trades fixed $100 per order (not lots). Can switch to % of equity.
commission_type = strategy.commission.percent, commission_value = 0.1 → default broker fee = 0.1%. Adjust for your broker!
slippage = 3 → slippage = 3 ticks. Adjust to asset liquidity.
currency = USD.
margin_long = 100, margin_short = 100 → no leverage (100% margin).
5. Visualization on Chart 📊
The strategy draws 3 lines:
🔵 MA line (thickness 2).
🔴 Previous High (last N candles).
🟢 Previous Low (last N candles).
Also: entry/exit arrows & equity curve shown in backtest.
Disclaimer ⚠️📌
Risk Warning: This description & code are for educational purposes only. Not financial advice. Trading (Forex, Stocks, Crypto) carries high risk and may lead to full capital loss. You trade at your own risk.
Testing: Always backtest & demo test first. Past results ≠ future profits.
Responsibility: Author of this strategy & description is not responsible for your trading decisions or losses.
Trendline Breakout Strategy [KedArc Quant] Description
A single, rule-based system that builds two trendlines from confirmed swing pivots and trades their breakouts, with optional retest, trend-regime gates (EMA / HTF EMA), and ATR-based risk. All parts serve one decision flow: structure → breakout → gated entry → managed risk.
What it does (for traders)
Draws Up line (teal) through the last two Higher Lows and Down line (red) through the last two Lower Highs, then extends them forward.
Long when price breaks above red; Short when price breaks below teal.
Optional Retest entry: after a break, wait for a pullback toward the broken line within an ATR-scaled buffer.
Uses ATR stop and R-multiple target so risk is consistent across symbols/timeframes.
Labels HL1/HL2/LH1/LH2 so non-coders can verify which pivots built each line.
Why these components are combined
Pure breakout systems on trendlines suffer from three practical issues:
False breaks in chop → solved by trend-regime gates (EMA / HTF EMA) that only allow trades aligned with the prevailing trend.
Uneven volatility across markets/timeframes → solved by ATR-based stop/target, normalizing distance so R-multiples are comparable.
First break whipsaws near wedge apices → mitigated by the optional retest rule that demands a pullback/hold before entry.
These modules are not separate indicators with their own signals. They are support roles inside one method.
The pivot engine defines structure, the breakout detector defines signal, the regime gates decide if we’re allowed to take that signal, and the ATR module sizes risk.
Together they make the trendline breakout usable, testable, and explainable.
How it works (mechanism; each component explained)
1) Pivot engine (structure, non-repainting)
Swings are confirmed with ta.pivotlow/high(L, R). A pivot only exists after R bars (no look-ahead), so once plotted, the line built from those pivots will not repaint.
2) Trendline builder (geometry)
Teal line updates when two consecutive pivot lows satisfy HL2.price > HL1.price (and HL2 occurs after HL1).
Red line updates when two consecutive pivot highs satisfy LH2.price < LH1.price.
Lines are extended right and their current value is read every bar via line.get_price().
3) Breakout detector (signal)
On every bar, compute:
crossover(close, redLine) ⇒ Long breakout
crossunder(close, tealLine) ⇒ Short breakdown
4) Regime gates (trend filters, not separate signals)
EMA gate: allow longs only if close > EMA(len), shorts only if close < EMA(len).
HTF EMA gate (optional): same rule on a higher timeframe to avoid fighting the larger trend.
These do not create entries; they simply permit or block the breakout signal.
5) Retest module (optional confirmation)
After a breakout, record the line price. A valid retest occurs if price pulls back within an ATR-scaled buffer toward that broken line and then closes back in the breakout direction.
This reduces first-tick fakeouts.
6) Risk module (position exit)
Initial stop = ATR(len) × atrMult from entry.
Target = tpR × (ATR × atrMult) (e.g., 2R).
This keeps results consistent across instruments/timeframes.
Entries & exits
Long entry
Base: close breaks above red and passes EMA/HTF gates.
Retest (if enabled): after the break, price pulls back near the broken red line (within the ATR buffer) and holds; then enter.
Short entry
Mirror logic with teal (break below & gates), optionally with a retest.
Exit
strategy.exit places ATR stop & R-multiple target automatically.
Optional “flip”: close if the opposite base signal triggers.
How to use it (step-by-step)
Timeframe: 1–15m for intraday, 1–4h for swing.
Start defaults: Pivot L/R = 5, EMA len = 200, ATR len = 14, ATR mult = 2, TP = 2R, Retest = ON.
Tune sensitivity:
Faster lines (more trades): set L/R = 3–4.
Fewer counter-trend trades: enable HTF EMA (e.g., 60-min or Daily).
Visual audit: labels HL1/HL2 & LH1/LH2 show which pivots built each line—verify by eye.
Alerts: use Long breakout, Short breakdown, and Retest alerts to automate.
Originality (why it merits publication)
Trades the visualization: many “auto-trendline” tools only draw lines; this one turns them into testable, alertable rules.
Integrated design: each component has a defined role in the same pipeline—no unrelated indicators bolted together.
Transparent & non-repainting: pivot confirmation removes look-ahead; labels let non-coders understand the setup that produced each signal.
Notes & limitations
Lines update only after pivot confirmation; that lag is intentional to avoid repainting.
Breakouts near an apex can whipsaw; prefer Retest and/or HTF gate in choppy regimes.
Backtests are idealized; forward-test and size risk appropriately.
⚠️ Disclaimer
This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.
Cs Fenix Us30The price unbalances the Asia and Frankfurt range and if there is a structural change it highlights a possible entry with a stop and target level.
Trend Following S/R Fibonacci StrategyTrend Following S/R Fibonacci Strategy
Trend Following S/R Fibonacci Strategy
CoinGpt NQ策略# CoinGpt NQ 策略(MACD·多因子·可金字塔)
## 概述
**CoinGpt NQ策略**是一套面向 **纳指期货 NQ(建议:`CME_MINI:NQ1!`)30 分钟** 的可运行交易策略。
核心以 **MACD 趋势动量** 为骨架,叠加 **EMA 趋势过滤**、**可选金字塔加仓**、**三种出场模式(固定 TP/SL、追踪、追踪+TP)** 与 **风控上限**,提供三套一键预设(Balanced / Trend / Scalper),满足不同市场状态与风险偏好。
> 适配:期货/连续合约;仅做多(本脚本版本)。
> 时间框架:**30m**(可在“仅在 30m 生效”开关控制)。
---
## 进场逻辑
* **信号触发**:`MACD 上穿 Signal`(并要求直方图连续上升 2 根)。
* **趋势过滤**:价格位于 `EMA(p_emaLen)` 上方,且 `MACD>0 & Signal>0`(可关闭)。
* **时间框架限制**:默认仅在 30m 有效(可关闭)。
## 出场逻辑
* **固定 TP/SL**:按百分比计算限价止盈与止损。
* **追踪止盈**:默认以 **ATR 偏移** 跟踪;
* **追踪 + TP**:在拖尾的同时设置上沿 TP。
* **反向保护**:`MACD 下穿 Signal` 时市价平仓。
> 出场模式在输入项 **「出场模式」** 选择:
> `Auto(by preset) / Fixed TP/SL / Trailing / Trailing + TP`
---
## 金字塔加仓(可选)
* 仅在已有多单且不利回撤达到阈值时触发;
* 最多 `p_maxAdds` 层;每层在 **上次加仓价** 基础上按 `p_addStep%` 回撤触发;
* 目的:**拉低均价、提高持仓性价比**;采用小步长、有限层数控制回撤风险。
---
## 风险管理
* **当日最大亏损**:`strategy.risk.max_intraday_loss(p_maxDailyDD, %权益)`
* **单笔头寸上限**:`strategy.risk.max_position_size(p_posCapPct)`
* **订单量**(策略属性):默认 **90% 权益**。
* 实盘更建议:Balanced≈**40%**、Trend≈**35%**、Scalper≈**30%**(在“策略属性 → 订单大小”中调整)。
---
## 三套预设(参数一键生效)
| 预设 | MACD(fast/slow/signal) | 趋势EMA | 金字塔 | 加仓步长 | 固定TP/SL(%) | 追踪(ATR倍数) | 单笔上限 | 当日亏损 |
| ---------------- | ---------------------- | ----- | --- | ----- | ----------------- | --------- | ---- | ---- |
| **Balanced(默认)** | 8 / 21 / 5 | 233 | 2 层 | 0.12% | TP 0.22 / SL 0.15 | 1.2× | 50% | 1.5% |
| **Trend** | 10 / 24 / 7 | 200 | 3 层 | 0.10% | TP 0.25 / SL 0.18 | 1.6× | 45% | 1.2% |
| **Scalper** | 6 / 19 / 4 | 100 | 关闭 | —— | TP 0.18 / SL 0.12 | 1.3× | 35% | 1.0% |
> 说明:
>
> * Balanced:均衡型,适合多数时期;
> * Trend:顺势拉伸,持仓更久、盈亏比更高;
> * Scalper:快进快出、高胜率、不过度叠仓。
---
## 使用建议
1. **品种/周期**:`CME_MINI:NQ1!`(或当季主力合约),**30m**。
2. **手续费**:本策略默认 **1 USD/合约**(在“策略属性”可按实盘成本调整)。
3. **成交精度**:建议在“策略属性 → 高级设置”勾选 **Bar Magnifier**,提升限价/拖尾成交模拟精度。
4. **仓位**:策略默认 90% 仅为展示;回测与实盘更建议 **30%\~40% 权益**。
5. **风险**:金字塔仅做轻量、有限层数;若市场极端震荡,适当降低单笔上限与当日亏损阈值。
---
## 输入项(TradingView 右侧面板)
* **参数预设**:`Balanced / Trend / Scalper`
* **仅在 30m 周期生效**:开/关
* **出场模式**:`Auto(by preset) / Fixed TP/SL / Trailing / Trailing + TP`
> 其余细节参数由预设自动注入,无需手动繁杂调整,**开箱即用**。
---
## 注意事项
* 本脚本为研究与教育用途,不构成投资建议。期货与杠杆交易风险高,请在可承受范围内使用。
* 预设适配历史统计特征,未来表现不保证;建议结合自身风控与账户规模,先小仓/纸面验证。
* 仅做多版本;若需要双向(多空)或加入 RTH(美股盘中)/HTF(更高周期确认)等扩展,请在评论区留言。
---
**作者注**:
* 本策略在 Pine v6 编写,避免了常见的 v6 语法踩坑(如 `strategy.risk.max_position_size()` 仅 1 参、`plot` 标题需常量、追踪需成对参数 `trail_price + trail_offset` 等)。
* 欢迎在评论区反馈你的回测截图(区间、手续费、订单量),我会根据数据给出更贴合你的参数档。
# CoinGpt NQ Strategy (MACD · Multi-Factor · Optional Pyramiding)
## Overview
**CoinGpt NQ Strategy** is a ready-to-trade system for **Nasdaq-100 futures (NQ; recommended: `CME_MINI:NQ1!`) on the 30-minute timeframe**.
It uses **MACD momentum** as the backbone, adds an **EMA trend filter**, optional **pyramiding**, and **three exit modes** (Fixed TP/SL, Trailing, Trailing+TP) with built-in risk caps. Three one-click presets—**Balanced / Trend / Scalper**—cover different regimes and risk appetites.
> Instruments: futures / continuous contract
> Direction: **Long-only** (this script version)
> Timeframe: **30m** (toggleable)
---
## Entry
* **Trigger:** `MACD` line crossing **above** `Signal`.
* **Trend filter (optional):** price above `EMA(p_emaLen)` and `MACD > 0 & Signal > 0`.
* **Timeframe guard:** by default, signals are valid on **30m** only.
## Exit
* **Fixed TP/SL:** percentage-based limit and stop.
* **Trailing:** ATR-based trailing offset (or percent).
* **Trailing + TP:** trailing stop **and** a take-profit cap.
* **Protective flip:** when `MACD` crosses **below** `Signal`, close the long.
> Choose exit mode in **Inputs → “Exit Mode”**:
> `Auto(by preset) / Fixed TP/SL / Trailing / Trailing + TP`.
---
## Pyramiding (optional)
* Adds only **against adverse pullbacks** from the last add price.
* Up to `p_maxAdds` layers; each layer triggers at `p_addStep%` pullback from the **previous add**.
* Goal: **improve average price** with **small steps & limited layers** to keep drawdowns controlled.
---
## Risk Management
* **Daily loss cap:** `strategy.risk.max_intraday_loss(p_maxDailyDD, % of equity)`.
* **Per-trade size cap:** `strategy.risk.max_position_size(p_posCapPct)`.
* **Order size (strategy properties):** default **90% of equity** (for display).
* Practical suggestion: Balanced ≈ **40%**, Trend ≈ **35%**, Scalper ≈ **30%** (set in Strategy Properties → Order size).
---
## Presets (one-click)
| Preset | MACD (fast/slow/signal) | Trend EMA | Pyramiding | Add Step | Fixed TP/SL (%) | Trailing (ATR) | Pos Cap | Daily DD |
| ---------------------- | ----------------------- | --------- | ---------- | -------- | ------------------------- | -------------- | ------- | -------- |
| **Balanced (default)** | 8 / 21 / 5 | 233 | 2 layers | 0.12% | TP **0.22** / SL **0.15** | **1.2×** | **50%** | **1.5%** |
| **Trend** | 10 / 24 / 7 | 200 | 3 layers | 0.10% | TP **0.25** / SL **0.18** | **1.6×** | **45%** | **1.2%** |
| **Scalper** | 6 / 19 / 4 | 100 | Off | — | TP **0.18** / SL **0.12** | **1.3×** | **35%** | **1.0%** |
> **Balanced:** all-weather, stable.
> **Trend:** holds longer and targets higher R multiples.
> **Scalper:** quick in/out, higher hit-rate, no stacking.
---
## Usage Tips
1. **Symbol/TF:** `CME_MINI:NQ1!`, **30m**.
2. **Fees:** default **\$1 per contract** (adjust to your broker in Strategy Properties).
3. **Execution realism:** enable **Bar Magnifier** (Strategy Properties → Advanced) for more accurate limit/trailing fills.
4. **Sizing:** the script defaults to 90% only to showcase behavior—use **30–40%** in realistic tests.
5. **Pyramiding:** keep layers small & capped. In choppy regimes, reduce `p_posCapPct` and `p_maxDailyDD`.
---
## Inputs (right-panel)
* **Param Preset:** `Balanced / Trend / Scalper`
* **30m-only:** on/off
* **Exit Mode:** `Auto(by preset) / Fixed TP/SL / Trailing / Trailing + TP`
> All other parameters are pre-wired by the chosen preset for **plug-and-play** operation.
---
## Notes & Disclaimer
* Educational use only—**not** financial advice. Futures and leverage carry substantial risk.
* Presets reflect historical characteristics; **future performance is not guaranteed**. Start small or paper trade first.
* This version is **long-only**; if you need a two-sided (long & short) variant or extras (RTH/HTF filters), leave a comment.
---
**Author Notes**
* Written in **Pine v6** with common pitfalls avoided (e.g., `strategy.risk.max_position_size()` takes **one** arg, `plot` titles are **const strings**, trailing requires `trail_price + trail_offset`).
* Share your backtest screenshots (period, fees, order size) and I can suggest **tighter, data-driven knobs** for your setup.