
双唐津通道突破策は,唐津通道に基づく量化取引策である.この戦略は,高速唐津通道と遅い唐津通道の組み合わせを利用して,低リスクの高収益の突破取引を実現する.価格が遅い通道突破したときの入場は多出/空出,価格が再び高速通道突破したときの出場は止損または停止する.
この戦略は主に2つの唐津通路に基づいている. 一つは慢速の唐津通路で周期が長い,もう一つは短期の高速の唐津通路である.
慢速通関の周期は長いため,市場の騒音を効果的に除することができ,その突破信号は高い信頼性を有する. 価格が慢速通道を突破したときに,多入場をする. 価格が慢速通道を突破したときに,空き入場をする.
急速唐通路の周期は短いので,短期的な価格変動に迅速に反応することができる.価格が再びこの通路を突破すると,トレンドの転換が起こることを示すので,直ちに止損または止まりを退場させる必要がある.
また,波動率条件を策略の入場フィルターとして設定している.価格の波動が,事前に設定された値パーセントを超えるとのみ入場をトリガーする.横軸整理で頻繁に入場を回避する.
これらのリスクは,パラメータの最適化,合理的なストップポイント設定,重大事件への注意などの措置によって軽減できます.
双唐津通路突破戦略は,全体として比較的安定した信頼性の高いトレンド追跡戦略である.それは,トレンドキャプチャとリスク管理の優位性を兼ね備えており,多種多様な株式取引戦略の基本モジュールに適しています.パラメータの最適化と規則の完善により,その戦略の効果をさらに向上させることができます.
/*backtest
start: 2024-01-04 00:00:00
end: 2024-02-03 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © omererkan
//@version=5
strategy(title="Double Donchian Channel Breakout", overlay=true, initial_capital = 1000, commission_value = 0.05, default_qty_value = 100, default_qty_type = strategy.percent_of_equity)
slowLen = input.int(50, title="Slow Donchian")
fastLen = input.int(30, title="Fast Donchian")
volatility = input.int(3, title="Volatility (%)")
longProfitPerc = input.float(2, title="Long TP1 (%)", minval=0.0, step=0.1) * 0.01
shortProfitPerc = input.float(2, title="Short TP1 (%)", minval=0.0, step=0.1) * 0.01
TP1Yuzde =input.int(50, title = "TP1 Position Amount (%)")
ubSlow = ta.highest(close, slowLen)[1]
lbSlow = ta.lowest(close, slowLen)[1]
ubFast = ta.highest(close, fastLen)[1]
lbFast = ta.lowest(close, fastLen)[1]
plot(ubSlow, color=color.green, linewidth=2, title="Slow DoCh - Upperband")
plot(lbSlow, color=color.green, linewidth=2, title="Slow DoCh - Lowerband")
plot(ubFast, color=color.blue, linewidth=2, title="Fast DoCh - Upperband")
plot(lbFast, color=color.blue, linewidth=2, title="Fast DoCh - Lowerband")
fark = (ubSlow - lbSlow) / lbSlow * 100
longExitPrice = strategy.position_avg_price * (1 + longProfitPerc)
shortExitPrice = strategy.position_avg_price * (1 - shortProfitPerc)
longCondition = ta.crossover(close, ubSlow) and fark > volatility
if (longCondition)
strategy.entry("Long", strategy.long)
shortCondition = ta.crossunder(close, lbSlow) and fark > volatility
if (shortCondition)
strategy.entry("Short", strategy.short)
if strategy.position_size > 0 and ta.crossunder(close, lbFast)
strategy.close("Long", "Close All")
if strategy.position_size < 0 and ta.crossover(close, ubFast)
strategy.close("Short", "Close All")
// Take Profit
if strategy.position_size > 0
strategy.exit("TP1", "Long", qty_percent = TP1Yuzde, limit = longExitPrice)
if strategy.position_size < 0
strategy.exit("TP1", "Short", qty_percent = TP1Yuzde, limit = shortExitPrice)