ノロの急速なRSI突破戦略

作者: リン・ハーンチャオチャン, 日付: 2023-09-12 11:40:02
タグ:

この記事では,NoroのFast RSI Breakthrough戦略の背後にある論理を詳細に説明し,取引シグナルがどのように生成されるかを説明し,この戦略の利点と潜在的なリスクを分析します.

I. 戦略の概要

この戦略は主にRSIインジケーターを使用して取引信号を生成し,キャンドルスタイクフィルタリングと最小/最大突破を補助判断として組み合わせ,完全なロング/ショート意思決定システムを形成する. 戦略名はNoroのFast RSI Breakthrough Strategyである.

戦略の詳細

  1. RSI の 速度の 設定

この戦略は,RSIの速度の振動を通じて市場動向の兆候を捕捉するために長さ7の速いRSIを使用する.また,RSIが破られたときに信号を誘発するために70と30の上下限も設定されている.

  1. ろうそくフィルタリング

この戦略は,キャンドルスタイヤのボディサイズ sma を使って RSI 信号をフィルターし, 5 日平均ボディサイズより大きいキャンドルスタイヤの RSI 信号のみを考慮し,ウィップソウを避ける.

  1. 最小/最大 突破

この戦略は,最近mmbarsで最小/最大突破が起きたかどうかを確認し,RSIレベルと組み合わせて,底部逆転と上部分解を決定します.

  1. トレーディング・シグナル要約

長信号:RSIが30以下に 身体のサイズが平均体サイズを超え ミニブレイクサポート

短信号:RSIが70を超えると 身体の大きさは平均体サイズを超え 最大の抵抗を突破します

出口シグナル:RSIがポジションの反対方向の限界を再突破したとき.

戦略の利点

  1. RSIのパラメータを最適化することで 傾向の変化を素早く把握できます

  2. ろうそくと最小/最大を組み合わせると,不必要な鞭打ちを防ぐことができます.

  3. ストップロスのメカニズムは,RSIが限界を超えると終了します.

IV 戦略のリスク

  1. RSIは誤った信号を受けやすい 補足的な確認が必要です

  2. バックテストの過適性リスク.最適化されたパラメータは特定の市場期間にのみ適合する可能性があります.

  3. ストップ・ロスのメカニズムは機械的すぎるし,単一のストップ・ロスの大きな損失を制御できないかもしれない.

V. 結論

この戦略は,強力なトレンドフォローのために複数の技術指標を統合しています. しかし,バックテストオーバーフィッティングおよびストップロスのリスクは注意すべきであり,ライブパフォーマンスは慎重に評価されるべきです. パーマータの細かな調整とポジションサイズ管理はライブ取引に推奨されています.


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

//Noro
//2018

//@version=3
strategy(title = "Noro's Fast RSI Strategy v1.6", shorttitle = "Fast RSI str 1.6", overlay = true, default_qty_type = strategy.percent_of_equity, default_qty_value = 100, pyramiding = 10)

//Settings
needlong = input(true, defval = true, title = "Long")
needshort = input(true, defval = true, title = "Short")
usersi = input(true, defval = true, title = "Use Fast RSI Strategy")
usemm = input(true, defval = true, title = "Use Min/Max Strategy")
usebc = input(true, defval = true, title = "Use BarColor Strategy")
usesma = input(false, defval = false, title = "Use SMA Filter")
smaperiod = input(20, defval = 20, minval = 2, maxval = 1000, title = "SMA Filter Period")
fast = input(7, defval = 7, minval = 2, maxval = 50, title = "Fast RSI Period")
limit = input(30, defval = 30, minval = 1, maxval = 100, title = "RSI limit")
rsisrc = input(close, defval = close, title = "RSI Price")
rsibars = input(1, defval = 1, minval = 1, maxval = 20, title = "RSI Bars")
mmbars = input(1, defval = 1, minval = 1, maxval = 5, title = "Min/Max Bars")
showsma = input(false, defval = false, title = "Show SMA Filter")
showarr = input(false, defval = false, title = "Show Arrows")
fromyear = input(2018, defval = 2018, minval = 1900, maxval = 2100, title = "From Year")
toyear = input(2100, defval = 2100, minval = 1900, maxval = 2100, title = "To Year")
frommonth = input(01, defval = 01, minval = 01, maxval = 12, title = "From Month")
tomonth = input(12, defval = 12, minval = 01, maxval = 12, title = "To Month")
fromday = input(01, defval = 01, minval = 01, maxval = 31, title = "From day")
today = input(31, defval = 31, minval = 01, maxval = 31, title = "To day")

//Fast RSI
fastup = rma(max(change(rsisrc), 0), fast)
fastdown = rma(-min(change(rsisrc), 0), fast)
fastrsi = fastdown == 0 ? 100 : fastup == 0 ? 0 : 100 - (100 / (1 + fastup / fastdown))

//Limits
bar = close > open ? 1 : close < open ? -1 : 0
uplimit = 100 - limit
dnlimit = limit

//RSI Bars
upsignal = fastrsi > uplimit ? 1 : 0
dnsignal = fastrsi < dnlimit ? 1 : 0
uprsi = sma(upsignal, rsibars) == 1
dnrsi = sma(dnsignal, rsibars) == 1

//Body
body = abs(close - open)
abody = sma(body, 10)

//MinMax Bars
min = min(close, open)
max = max(close, open)
minsignal = min < min[1] and bar == -1 and bar[1] == -1 ? 1 : 0
maxsignal = max > max[1] and bar == 1 and bar[1] == 1 ? 1 : 0
mins = sma(minsignal, mmbars) == 1
maxs = sma(maxsignal, mmbars) == 1

//SMA Filter
sma = sma(close, smaperiod)
colorsma = showsma ? blue : na
plot(sma, color = colorsma, linewidth = 3)

//Signals
up1 = bar == -1 and (strategy.position_size == 0 or close < strategy.position_avg_price) and dnrsi and body > abody / 5 and usersi
dn1 = bar == 1 and (strategy.position_size == 0 or close > strategy.position_avg_price) and uprsi and body > abody / 5 and usersi
up2 = mins and (close > sma or usesma == false) and fastrsi < 70 and usemm
dn2 = maxs and (close < sma or usesma == false) and fastrsi > 30 and usemm 
up3 = sma(bar, 2) == -1 and usebc
dn3 = sma(bar, 2) == 1 and usebc
exit = ((strategy.position_size > 0 and fastrsi > dnlimit and bar == 1) or (strategy.position_size < 0 and fastrsi < uplimit and bar == -1)) and body > abody / 2

//Arrows
col = exit ? black : up1 or dn1 ? blue : up2 or dn2 ? red : na
needup = up1 or up2
needdn = dn1 or dn2
needexitup = exit and strategy.position_size < 0
needexitdn = exit and strategy.position_size > 0
plotarrow(showarr and needup ? 1 : na, colorup = blue, colordown = blue, transp = 0)
plotarrow(showarr and needdn ? -1 : na, colorup = blue, colordown = blue, transp = 0)
plotarrow(showarr and needexitup ? 1 : na, colorup = black, colordown = black, transp = 0)
plotarrow(showarr and needexitdn ? -1 : na, colorup = black, colordown = black, transp = 0)

//Trading
if up1 or up2 or up3
    if strategy.position_size < 0
        strategy.close_all()
        
    strategy.entry("Long", strategy.long, needlong == false ? 0 : na, when=(time > timestamp(fromyear, frommonth, fromday, 00, 00) and time < timestamp(toyear, tomonth, today, 23, 59)))

if dn1 or dn2 or dn3
    if strategy.position_size > 0
        strategy.close_all()
        
    strategy.entry("Short", strategy.short, needshort == false ? 0 : na, when=(time > timestamp(fromyear, frommonth, fromday, 00, 00) and time < timestamp(toyear, tomonth, today, 23, 59)))
    
if time > timestamp(toyear, tomonth, today, 23, 59) or exit
    strategy.close_all()

もっと