この戦略は50周期均線通路とADX動向指数とEFIエネルギー指標の組み合わせを使用してトレンド取引を行う.EFIエネルギー指標がトレンドを開始した後,50均線通路領域で回調して場内に入ります.この戦略は1分間の時間周期に適用されます.
50周期の平均線通路を計算し,通路上の平均線を高点とし,下の平均線を低点とする.
ADXの動向指数は,トレンドの強さを判断するために計算され,強いトレンドの場合のみ ((ADX>20) で取引が考慮されます.
長期周期 (>120サイクル) と短期周期 (>15サイクル) のEFIエネルギー指標を計算する.長期周期指標は0より大きく,全体的な上昇傾向のエネルギー増強を示し,短期周期指標は0より小さい,短期的な上昇脈衝消退を示している.
長期短期EFI指標が買入シグナルを発し,価格が50均線通路まで回調されたときに買入操作を行う.
長期短期EFI指標が売り込み信号を発し,価格が50均線通路まで戻ったときに売り込みを行う.
この戦略は,トレンド,動力,およびリコールシグナルを組み合わせて,ほとんどの偽ブレイクを効果的にフィルターすることができます.具体的には以下の利点があります.
50 均線通路は,主要トレンドの方向を明確に決定する.
ADX指数は,トレンドが明瞭であるときにのみ取引することを保証し,波動的な市場でのレバレッジを避けます.
EFI指標は,トレンドのエネルギーが増加した瞬間に買い物をし,買い物のリスクを低下させます.
競技場内への復帰を待つことで,よりよいリスク・リターン比率が得られます.
複数の指標の組み合わせにより,偽の突破のリスクを効果的にフィルターできます.
この戦略には以下のリスクがあります.
強いトレンドには大きな反調があり,広い止損範囲を設定する必要があります.
振動的な状況では,EFI指標は誤った信号を発し,ADXのようなトレンド判断指標と組み合わせる必要があります.
逆回線が深すぎると入場時間を逃してしまうので,適当に平均線パラメータを調整することができる。
単一取引品種では,市場におけるシステミック・リスクが効率的に分散できません.
この戦略は以下の点で最適化できます.
戦略パラメータの汎用範囲を探すために,より多くの品種をテストします.
ストップ・ロスを追加し,ストップ・ロスを追跡して利益を固定する.
参数最適化,ADX,EFIなどの指標パラメータ最適化を行う.
機械学習のアルゴリズムを追加し,ビッグデータでトレンドの真偽を判断する訓練を行います.
複数のタイムサイクルの取引を増やし,異なるサイクルの間にSpacing技術を使用してポジションを制御する.
信号の質を向上させるため,より多くのトレンドフィルタリング指標を評価し導入します.
この戦略は,全体として,初心者にとって非常に適したトレンドリフート戦略である.これは,トレンド,動力,リフートなどの複数の信号を融合し,偽突破を効果的にフィルターすることができます.この戦略は,ストップ・ロスの戦略,パラメータの設定,時間周期などの最適化によって,強力なトレンド追跡システムになることができます.全体として,この戦略は,非常に実用的なトレンド取引戦略であり,深入な研究と適用に値します.
/*backtest
start: 2023-08-19 00:00:00
end: 2023-09-18 00:00:00
period: 1h
basePeriod: 15m
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/
// © trent777brown
//@version=5
// strategy("adx efi 50 ema channel, trend pullback", overlay=true, margin_long=100, margin_short=100, currency=currency.USD, initial_capital= 100000, close_entries_rule="ANY")
//bollingerbands
[basis, upperband, lowerband]= ta.bb(ohlc4, 50, 3)
[basis2, upperband2, lowerband2]= ta.bb(ohlc4, 50, 2)
psar= ta.sar(.1, .1, .09)
ema50= ta.ema(hlc3, 50)
ema50hi= ta.ema(high, 50)
ema50lo= ta.ema(low, 50)
ema18= ta.wma(hlc3, 15)
wma9= ta.wma(open, 9)
wma5= ta.wma(ohlc4, 5)
ema34= ta.rma(hlc3, 10)
[macdline, signalline, histline]= ta.macd(hlc3, 5, 34, 5)
[macdline2, signalline2, histline2]= ta.macd(hlc3, 15,70, 24)
[diplus, diminus, adx]= ta.dmi(20, 20)
[diplus2, diminus2, adx2]= ta.dmi(12, 12)
rsi= ta.rsi(hlc3, 14)
rsisma= ta.sma(rsi, 10)
stoch= ta.stoch(close, high, low, 21)
k= ta.wma(stoch, 3)
d= ta.wma(k, 3)
trendline5= ta.wma(hlc3, 300)
trendline9= ta.wma(open, 540)
trendline18= ta.wma(open, 1080)
atr=ta.atr(14)
plot(psar, color=color.red, style=plot.style_circles)
plot(ema50, color=color.white, linewidth=4)
plot(ema50hi, color=color.yellow, linewidth=4)
plot(ema50lo, color=color.yellow, linewidth=4)
plot(ema34, color=color.aqua, linewidth=4)
plot(wma9, color=color.gray, linewidth=4)
plot(wma5, color=color.lime, linewidth=4)
plot(trendline18, color=color.orange, linewidth=4)
plot(upperband, color=color.navy, linewidth=4)
plot(lowerband, color=color.navy, linewidth=4)
plot(upperband2, color=color.navy, linewidth=4)
plot(lowerband2, color=color.navy, linewidth=4)
plot(trendline9, color=color.maroon, linewidth=4)
plot(trendline5, color=color.yellow, linewidth=4)
efi = ta.rma(ta.change(close) * volume, 15)
efi2= ta.rma(ta.change(close) * volume, 120)
buy= efi2 > 0 and efi < 0 and efi[1] < efi and adx >= 20 and open < ema50hi
sell= efi2 < 0 and efi > 0 and efi[1] > efi and adx >= 20 and open > ema50lo
//ell= rsi > 50 and ta.crossunder(wma5, wma9) and psar > high and ema18 <= ema50hi and macdline > 0 and macdline < signalline
//buy= ta.crossunder(close, ema50) and rsi < 50 and adx2 < adx2[1] and k < 25 and psar > high
//uy= rsi < 60 and ta.crossover(wma5, wma9) and psar < low and ema18 >= ema50 and macdline2 > 0 and diplus2 < 30 // and histline2 < 0
//buy= ema18 > ema50 and ta.crossunder(rsi, 45) and open < ema50hi and adx2[3] < adx2 and diplus2 < 25 and macdline < 0 and adx < 10
//sell= ta.crossover(close, ema50) and rsi > 50 and adx2 < adx2[1] and k > 75 and psar < low
//ell= ema18 < ema50 and ta.crossover(rsi, 60) and open > ema50lo and diminus2 < 30 and macdline2 < 0 and adx2[2] < adx2
//buy sell conditions 1
//buy= ta.crossover(wma5, ema18) and ema18 > ema50lo and diplus > 22 and diminus < 22 and adx > 15
//ell= ta.crossover(psar, high) and macdline2 < signalline2 and rsi < rsisma
//when conditions
buytrig= ema34 >= ema50lo
selltrig= ema34 <= ema50hi
//strategy
sl= low - atr * 8
tp= high + atr * 4
sellsl= high + atr * 8
selltp= low - atr * 4
if(buy)
strategy.entry("buy", strategy.long, when= buytrig)
strategy.exit("exit buy", "buy", limit= tp, stop= sl)
strategy.close("close", when= ta.crossunder(ema34, ema50lo))
if(sell)
strategy.entry("sell", strategy.short, when= selltrig)
strategy.exit("exit sell", "sell", limit= selltp, stop= sellsl)