この戦略は,複数の異なるパラメータ設定のEMA平均線とEOM量能指標を組み合わせて,長線と短線の共同判断を構成する多周期的なトレンド判断を実現する取引戦略である. この戦略は,異なる周期平均線の多周期的な共鳴を利用して,より長期間有効なトレンド走勢を発見することを目的としている.
この戦略は,4組の異なる周期のパラメータEMA平均線を使用し,それぞれ13周期,21周期,50周期および180周期のEMAである.この4組のEMA平均線は,価格の傾向を判断し,より長期的に効果のある傾向パターンを発見するために,複数の時間次元を構成する.
戦略は,トレンドを確認するためにEOM量能指標を使用する. EOM指標は,取引量と価格の変動幅を組み合わせて,買い売り力の道を効果的に判断することができます. 戦略は,EOMが0より大きいときは多頭市場であり,EOMが0より小さい時は空頭市場であると判断する.
戦略は2つのオプションを設定する.オプション1は,短期EMAで長期EMAを突破する際の多出,短期EMAで長期EMAを突破する際の平出である.オプション2は,短期EMAで中期EMAを突破する際の多出であり,短期EMAで中期EMAを突破する際の平出である.両方のオプションは,トレンドの確認をより全面的に判断することができます.
この戦略は,多時間周期EMA判断と量能指数フィルタを統合し,トレンド追跡とノイズ除去を実現している.最適化の余地は非常に大きく,異なるパラメータの組み合わせをテストし,より多くの指標を追加することにより,戦略の安定性をさらに向上させることができます.同時に,ダイナミックなストップ損失とポジション管理を採用することで,戦略のパフォーマンスを大幅に最適化することもできます.
/*backtest
start: 2022-10-02 00:00:00
end: 2023-10-08 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © SoftKill21
//@version=4
strategy("4x ema + volume", overlay=true,initial_capital = 1000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent , commission_value=0.1 )
//ema x 4
ema1l=input(13)
ema2l=input(21)
ema3l=input(50)
ema4l=input(180)
ema1=ema(close,ema1l)
ema2=ema(close,ema2l)
ema3=ema(close,ema3l)
ema4=ema(close,ema4l)
long1 = close > ema1 and ema1 > ema2 and ema2> ema3 and ema3 > ema4
long2 = crossover(ema1,ema2) and crossover(ema1,ema3)
short1 = close < ema1 and ema1 < ema2 and ema2< ema3 and ema3 < ema4
short2= crossunder(ema1,ema2) and crossunder(ema1,ema3)
//eom
length = input(14, minval=1)
div = input(10000, title="Divisor", minval=1)
eom = sma(div * change(hl2) * (high - low) / volume, length)
option1=input(true)
option2=input(false)
if(option1)
strategy.entry("long",1,when=long1 and eom>0)
strategy.close("long",when=short1 and eom<0)
if(option2)
strategy.entry("long",1,when=long2 and eom>0)
strategy.close("long",when=short2 and eom<0)