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 邏輯
Update summary for TradingView release:
Changed: execution rebuilt to single-position mode to prevent interference between entry engines. Only one active long position at a time. Signals A/B/DB/SR/D/E/F still plot and can trigger alerts.
Fixed: One-shot Force Flat now cancels pending orders, then closes all open trades on the current bar without reopening.
Optimized: ETH defaults fine-tuned (ADX gates, ATR-based SL, TP cap) for ETHUSDT perpetuals on intraday charts. Alert JSON schema unchanged.
Notes: Backward-compatible for alerts. Re-run backtests after updating. For research and education only. No performance guarantees.
更新說明(TradingView 發布用):
調整:執行邏輯重整為單倉模式,避免多進場引擎互相干擾。任一時刻僅維持一筆多單。A/B/DB/SR/D/E/F 訊號維持顯示並可觸發警報。
修正:一鍵清倉會先取消掛單,於當根關閉所有持倉,且不會被既有條件單重新開倉。
最佳化:針對 ETH 預設值微調(ADX 門檻、ATR 止損、TP 上限),適配 ETHUSDT 永續之分時圖。警報 JSON 結構不變。
附註:對警報維持相容。更新後請重新回測。僅供研究與教育使用。無任何績效保證。
Single-Position mode: no pyramiding; simpler risk, lower drawdown.
Two order modes:
Fixed quote amount (auto-converts to base).
Server-side Percent payload (mode=percent, percent, leverage).
Auto payload switch between Percent vs Quote based on setting.
Backtest snapshot
ETHUSDT.P, 5m, Single-Position, defaults: recent win rate ~92.5% (varies by market/time).
Compatibility
Backward compatible with prior webhook. Percent mode requires receiver to accept mode/percent/leverage.
Notes
Backtests are research-only. Validate live with small size; tune leverage/position sizing.
中文
重點
單倉模式: 不疊單;風控更直觀、回撤更低。
兩種下單:
固定成本額度(quote) 自動換算 base 數量。
伺服端百分比(payload 含 mode=percent、percent、leverage)。
Webhook 自動切換:依設定在 Percent 與 Quote 間切換。
回測概況
ETHUSDT.P|5分|單倉&預設:近期勝率約 92.5%(依商品/時段而異)。
相容性
與既有 Webhook 相容;使用百分比模式時,接收端需支援 mode/percent/leverage 欄位。
注意
回測僅供研究。實盤請小倉位先驗證,再調整槓桿與倉位配置。
Release notes — KDJ Long Only • Single-Position Unified Exits
Version: v3.2 update
Unified exit engine. One strategy.exit manages Base SL, Breakeven, and Trailing.
Deterministic entry arbitration across modes. Single position at all times.
Auto-cancel stale pending orders when flat and the trigger is invalid.
Webhook ready. Use {{strategy.order.alert_message}}. Percent or quantity mode.
Same-bar TP/SL toggle.
Optional session filter and EMA200 bias.
Bilingual panel retained.
How to use
Turn on tradeEnabled and useWebhook.
Set sendPercent=true for percent or false for quantity.
Alert text: {{strategy.order.alert_message}}.
——
發布說明 — KDJ Long Only • 單倉統一出場
版本:v3.2 更新
統一出場引擎。單一 strategy.exit 同時管控基礎SL、保本與移動止損。
進場仲裁固定順序。全程單倉。
無持倉時,觸發失效之掛單自動取消。
Webhook 完整支援。警報訊息填 {{strategy.order.alert_message}}。可選百分比或數量模式。
支援同根TP/SL開關。
可選時段過濾與 EMA200 位階濾網。
保留國際雙語面板。
使用方式
開啟 tradeEnabled 與 useWebhook。
sendPercent=true 走百分比,false 走數量。
警報內容使用 {{strategy.order.alert_message}}。
Script su invito
Solo gli utenti approvati dall'autore possono accedere a questo script. È necessario richiedere e ottenere l'autorizzazione per utilizzarlo. Tale autorizzazione viene solitamente concessa dopo il pagamento. Per ulteriori dettagli, seguire le istruzioni dell'autore riportate di seguito o contattare direttamente yoyoman868.
TradingView NON consiglia di pagare o utilizzare uno script a meno che non ci si fidi pienamente del suo autore e non si comprenda il suo funzionamento. Puoi anche trovare alternative gratuite e open-source nei nostri script della comunità.
Istruzioni dell'autore
Access will be granted after verification.
This is a growing AI-powered indicator that will be updated regularly based on market conditions and user feedback
Declinazione di responsabilità
Script su invito
Solo gli utenti approvati dall'autore possono accedere a questo script. È necessario richiedere e ottenere l'autorizzazione per utilizzarlo. Tale autorizzazione viene solitamente concessa dopo il pagamento. Per ulteriori dettagli, seguire le istruzioni dell'autore riportate di seguito o contattare direttamente yoyoman868.
TradingView NON consiglia di pagare o utilizzare uno script a meno che non ci si fidi pienamente del suo autore e non si comprenda il suo funzionamento. Puoi anche trovare alternative gratuite e open-source nei nostri script della comunità.
Istruzioni dell'autore
Access will be granted after verification.
This is a growing AI-powered indicator that will be updated regularly based on market conditions and user feedback