急速RSI逆転取引戦略は,低リスク逆転取引のためのトレンド逆転点を決定するために,Fast RSI指標,キャンドルスタックボディフィルター,min/max価格フィルターおよびSMAフィルターを組み合わせて取引信号を生成する.この戦略は,短期逆転機会を把握することを目的としています.
この戦略は主に以下の判断指標に基づいています.
速度のRSIインジケーター: RMA関数を使ってRSIを計算し,過買い/過売り信号をより早く把握するためにより敏感にする.
キャンドルスタイクボディフィルター: 低波動性の状況をフィルタリングするために,キャンドルスタイルのボディサイズが EMAボディ平均の1/5を超えることを要求します.
最低/最大価格フィルター価格が新高値や新低値に達すると判断し 傾向の逆転を確認します
SMAフィルター追加確認のためにSMAラインを突破する価格が必要です.
トレーディング・シグナルは,上記の複数の条件が同時にトリガーされたときに生成される. 具体的な論理は:
長期エントリー:急激なRSIは過売値を下回り,キャンドルボディはEMAボディの1/5以上になり,最低価格ブレイクとSMAを超えた値が上昇する
短期入場: 過剰購入値以上の急速なRSIと,EMAの1/5以上のキャンドルボディと,SMAを下回る最大値ブレイクと,SMAを下回る価格ブレイク
アクセス: 急速なRSIは正常範囲に戻る
この戦略には以下の利点があります.
この戦略にはいくつかのリスクもあります:
更に最適化できるのは:
一般的には,低リスクの短期間の平均逆転取引戦略である.Fast RSIで取引信号を識別し,偽信号を減らすために複数のフィルターを使用し,制御可能なリスク逆転取引を達成する.戦略はさらに最適化され,大きな可能性を秘めています.
/*backtest start: 2024-02-01 00:00:00 end: 2024-02-26 23:59:59 period: 1h basePeriod: 15m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //Noro //2018 //@version=3 strategy(title = "Noro's Fast RSI Strategy v1.4", shorttitle = "Fast RSI str 1.4", overlay = true, default_qty_type = strategy.percent_of_equity, default_qty_value = 100, pyramiding = 5) //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") usesma = input(true, defval = true, title = "Use SMA Filter") smaperiod = input(20, defval = 20, minval = 2, maxval = 1000, title = "SMA Filter Period") rsiperiod = input(7, defval = 7, minval = 2, maxval = 50, title = "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), rsiperiod) fastdown = rma(-min(change(rsisrc), 0), rsiperiod) 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) emabody = ema(body, 30) //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 > emabody / 5 and usersi dn1 = bar == 1 and (strategy.position_size == 0 or close > strategy.position_avg_price) and uprsi and body > emabody / 5 and usersi up2 = mins and (close > sma or usesma == false) and usemm dn2 = maxs and (close < sma or usesma == false) and usemm exit = ((strategy.position_size > 0 and fastrsi > dnlimit and bar == 1) or (strategy.position_size < 0 and fastrsi < uplimit and bar == -1)) and body > emabody / 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 strategy.entry("Long", strategy.long, needlong == false ? 0 : na) if dn1 or dn2 strategy.entry("Short", strategy.short, needshort == false ? 0 : na) if time > timestamp(toyear, tomonth, today, 00, 00) or exit strategy.close_all()