ウィリアム・魚均線トレンドキャピティング戦略は,ウィリアム・魚指数と移動平均を組み合わせたトレンド追跡戦略である.この戦略は,ウィリアム・魚指数の3つの線 (線,歯線,唇線) の相対的な位置を利用して,トレンドの方向を判断し,移動平均をトレンドの二次確認として使用する.価格が移動平均を破り,ウィリアム・魚指数の3つの線が多頭列を呈するときに,戦略は,ポジションを多く開く.価格が移動平均を破り,ウィリアム・魚指数の3つの線が空頭列を呈するときに,戦略は,ポジションを空にして開く.この戦略は,特価通貨やイーサンのような,明らかにトレンド特有の高波資産を持つ市場に適用される.
ウィリアム・クローバー均線トレンド捕捉戦略の核心は,ウィリアム・クローバー指数と移動平均を使用してトレンドを識別し,確認することです. ウィリアム・クローバー指数は,3つの線で構成されています:線 (Jaw),歯線 (Teeth),および唇線 (Lips),それぞれ異なる周期の平滑移動平均 (SMMA) です. 市場が上昇傾向にあるとき,唇線は歯線の上にあり,歯線は線の上にあり,市場が下降傾向にあるとき,唇線は歯線の下にあり,歯線は線の下にあります.
ウィリアム・魚均線トレンドキャプチャ戦略は,ウィリアム・魚指標と移動平均を組み合わせて,シンプルで効果的なトレンド追跡戦略を形成する. この戦略は,傾向が強い市場に適用され,二重確認メカニズムによってトレンド識別の正確性が向上する. しかし,この戦略は,揺れ動いた市場では不良なパフォーマンスを発揮し,明確なリスク管理の手段が欠如している. 将来の戦略の安定性と収益性を高めるために,トレンドの強さからフィルタリング,出場メカニズムの最適化,動態パラメータの調整,リスク管理などの面で戦略の最適化を考慮することができます.
/*backtest
start: 2024-05-09 00:00:00
end: 2024-05-16 00:00:00
period: 5m
basePeriod: 1m
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/
// © tradedots
//@version=5
strategy("Alligator + MA Trend Catcher [TradeDots]", overlay=true, initial_capital = 10000, default_qty_type = strategy.percent_of_equity, default_qty_value = 80, commission_type = strategy.commission.percent, commission_value = 0.01)
// william alligator
smma(src, length) =>
smma = 0.0
smma := na(smma[1]) ? ta.sma(src, length) : (smma[1] * (length - 1) + src) / length
smma
jawLength = input.int(8, minval=1, title="Jaw Length", group = "william alligator settings")
teethLength = input.int(5, minval=1, title="Teeth Length", group = "william alligator settings")
lipsLength = input.int(3, minval=1, title="Lips Length", group = "william alligator settings")
jawOffset = input(8, title="Jaw Offset", group = "william alligator settings")
teethOffset = input(5, title="Teeth Offset", group = "william alligator settings")
lipsOffset = input(3, title="Lips Offset", group = "william alligator settings")
jaw = smma(hl2, jawLength)
teeth = smma(hl2, teethLength)
lips = smma(hl2, lipsLength)
// ma
input_trendline_length = input.int(200, "Trendline Length", group = "moving average settings")
trendline = ta.ema(close, input_trendline_length)
// strategy settings
input_long_orders = input.bool(true, "Long", group = "Strategy Settings")
input_short_orders = input.bool(true, "Short", group = "Strategy Settings")
//long
if close > trendline and lips > teeth and teeth > jaw and input_long_orders and strategy.opentrades == 0
strategy.entry("Long", strategy.long)
label.new(bar_index, low, text = "🟢 Long", style = label.style_label_up, color = #9cff87)
if close < trendline and lips < teeth and teeth < jaw
strategy.close("Long")
//short
if close < trendline and lips < teeth and teeth < jaw and input_short_orders and strategy.opentrades == 0
strategy.entry("Short", strategy.short)
label.new(bar_index, high, text = "🔴 Short", style = label.style_label_down, color = #f9396a, textcolor = color.white)
if close > trendline and lips > teeth and teeth > jaw
strategy.close("Short")
//ploting
plot(trendline, "Trendline", color = #9cff87, linewidth = 3)
plot(jaw, "Jaw", offset = jawOffset, color=#b3e9c7)
plot(teeth, "Teeth", offset = teethOffset, color=#c2f8cb)
plot(lips, "Lips", offset = lipsOffset, color=#f0fff1)