フィボナッチ HMA AI 買って売るシグナル戦略

作者: リン・ハーンチャオチャン, 日付: 2023-12-29 11:24:34
タグ:

img

概要

この戦略は,フィボナッチ数と関連した異なるHMA線を使用することで,取引環境内のエントリー&アウトプットに関する洞察を提供することを目指す.

戦略の論理

この戦略は,HMA 1,HMA 2,HMA 3 と表記されるフィボナッチ数とリンクされた特定のHMA ラインを使用します.これらのHMA ラインが互いに交差すると,自動的な買いと販売信号が生成されます.例えば,HMA 3 が HMA 2 を越えると買い信号が起動し,HMA 3 が HMA 2 を越えると販売信号が発生します.これらのHMA ラインは,取引機会を認識することを容易にするために,視覚的に色によって区別されます.

利点分析

この戦略は,フィボナッチ分析とハル移動平均の強みを組み合わせます.フィボナッチ分析は主要なサポートとレジスタンスレベルを特定するのに役立ちます.HMA線は価格データを滑らかにし,より信頼できる取引信号を生成します.さらに,簡素化されたビジュアライゼーションにより,トレンドの開始と終了を直接的に決定できます.

リスク分析

この戦略は,価格変動の期間中に誤った信号を生成する可能性がある.不適切なパラメータ設定もパフォーマンスに影響を与える可能性がある. HMAラインの期間は,異なる市場環境に合わせて調整する必要があります.

オプティマイゼーションの方向性

偽信号を避けるため,信号フィルタリングのためのRSIなどの他の指標を追加することを検討する.最適な設定を見つけるためにさまざまなパラメータ組み合わせをバックテストすることも価値があります.この戦略を他の取引システムと組み合わせることは別の強化の可能性です.

概要

この戦略は,金融市場におけるフィボナッチ分析の有効性を適切に利用し,それをHMAの信号フィルタリング能力と組み合わせて,潜在的なトレンドを明らかにするための効果的なツールを形成します. シンプルで直感的なので,さらなるテストと精製が必要です.


/*backtest
start: 2022-12-22 00:00:00
end: 2023-12-28 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
// © Blackynator
strategy("AI Fibonacci HMA Strategy | Buy / Sell Indicator")

// Set the parameters for the moving averages
hma377Period = 377
hma233Period = 233
hma21Period = 21

// Calculate the moving averages
hma377 = hma(close, hma377Period)
hma233 = hma(close, hma233Period)
hma21 = hma(close, hma21Period)

// Plot the moving averages on the chart with different colors and titles
plot(hma377, color=color.white, title="HMA 377")
plot(hma233, color=color.blue, title="HMA 233")
plot(hma21, color=color.green, title="HMA 21")

// Create variables to hold the HMA 21 value and its previous value
hmaValue = hma21
hmaValuePrev = nz(hmaValue[1], hmaValue)

// Create variables to hold the HMA 200 value and its previous value
hma233Value = hma233
hma233ValuePrev = nz(hma233Value[1], hma233Value)

// Check if the HMA 21 has crossed up the HMA 200 and create a buy signal if it has
if (hmaValue > hma233Value) and (hmaValuePrev < hma233ValuePrev)
    strategy.entry("Buy", true)

// Check if the HMA 21 has crossed down the HMA 200 and create a sell signal if it has
if (hmaValue < hma233Value) and (hmaValuePrev > hma233ValuePrev)
    strategy.entry("Sell", false)


もっと