PROTECTED SOURCE SCRIPT
Güncellendi

量化多空策略 4H趋势+15M进场(高胜率高R:R·完整报警版)

277
这是一套结合多周期结构(4小时趋势 + 15分钟入场)的量化交易策略,
核心理念是「顺势而为 + 动量二次确认 + 高R:R风险控制」。

策略特点:
• 使用 4H EMA 趋势判定方向
• 结合 15m RSI + MACD 动量信号确认入场
• 二次确认(2~3 根内突破 + 动量共振)过滤假信号
• 自适应止盈止损(基于 ATR 和 ADX)
• 全自动计算 R:R、冷却周期、成交量放大过滤
适用场景
• 加密货币(BTC、ETH、SOL、BNB 等)
• 黄金 / 外汇 / 指数CFD
• 15m~1h短线趋势盯盘
• 适合希望提高信号质量、过滤假突破的交易者

注意事项
• 该策略为研究与教学用途,不构成投资建议
• 实盘前请先在回测与模拟盘验证参数
• 适度调整「确认根数」「R:R」「ADX阈值」以适应不同市场波动性


This is a multi-timeframe quantitative trading strategy combining the 4-hour trend with 15-minute entry signals.
Its core philosophy is “Trend following + Momentum confirmation + High R:R risk control.”


Key Features
• Uses 4H EMA structure to determine market trend
• Combines 15m RSI + MACD momentum for entry confirmation
• Dual confirmation within 2–3 bars (breakout + momentum alignment) to filter false signals
• Adaptive take-profit and stop-loss based on ATR and ADX
• Automatically calculates Risk/Reward ratio, cooldown period, and volume expansion filters


Best Use Cases
• Cryptocurrencies (BTC, ETH, SOL, BNB, etc.)
• Gold / Forex / Index CFDs
• Short-term trend tracking (15m–1h)
• Traders aiming to improve signal quality and avoid false breakouts


Notes
• This strategy is for research and educational purposes only — not financial advice.
• Always backtest and paper trade before live deployment.
• Adjust confirmation bars, R:R ratio, and ADX threshold to suit different market volatilities.

Sürüm Notları
更新数据看板与K线距离,优化订盘感受

Updated the data dashboard and candlestick chart spacing to optimize the order placement experience.
Sürüm Notları
🧩 本次更新说明(v2.3 优化版)

🆕 中文版

本次更新主要针对信号一致性与视觉优化进行了全面改进,确保实盘与回测结果完全同步:
1. 信号方向缓存修正
• 解决了多空信号在同一根K线内可能被覆盖的问题;
• 现在系统强制单边记录候选信号,避免空单SL显示在入场价下方的错误。
2. 止盈止损一致性提升
• 回测、报警与图形绘制全部采用“信号当时”的 ATR 与 ADX 计算;
• 报警、SL/TP线与回测结果三者完全对齐。
3. 确认逻辑优化
• 二次确认窗口自动与 confirmBars 参数联动,逻辑更清晰;
• 新增窗口过期自动清空机制,防止旧信号残留。
4. 冷却机制修复
• 删除重复的冷却更新,修复偶发节拍偏差;
• 冷却周期以“最后一次确认Bar”为准,信号触发更精确。
5. 视觉体验改进
• 数据看板默认与K线拉开 1.5 × ATR 的距离,极值观察更清晰;
• 你可以自由调整参数以适配不同波动率。



🇬🇧 English Version

Update v2.3 — Stability & Visualization Upgrade

This update focuses on signal consistency, execution accuracy, and UI optimization:
1. Signal Direction Lock
• Fixed a rare issue where long/short candidates could overlap on the same bar.
• Enforced single-side recording — eliminating inverted SL positioning.
2. Unified SL/TP Calculation
• Backtest, alerts, and chart visuals now use ATR & ADX values at signal time.
• Ensures full alignment across alerts, plotted levels, and strategy results.
3. Improved Confirmation Logic
• Breakout window auto-syncs with confirmBars input.
• Added auto-reset when confirmation expires — no stale signals remain.
4. Cooldown Anchor Fix
• Removed duplicate updates and unified timing reference;
• Cooldown strictly based on the last confirmed bar, improving signal timing.
5. UI & Panel Enhancement
• Info panel now auto-offsets from price by 1.5 × ATR for clearer visibility;
• Adjustable for different volatility conditions.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.