急速なRSI突破戦略

作者: リン・ハーンチャオチャン,日付: 2023年10月24日 11:51:56
タグ:

img

概要

この戦略は,RSIインジケーターとキャンドルストックボディのEMAをベースに急速な突破操作を実施する.RSIと大型キャンドルストックボディの急速な形成を使用して逆転信号を識別する.

戦略の論理

  1. RSIインジケーターを周期7で計算し,加速のためにRMAを使用します.

  2. フレームワークのEMAを計算する.

  3. RSIが限界線 (デフォルト 30) を越えており,現在のキャンドルボディが平均ボディサイズの 1/4 よりも大きい場合は,ロングします.

  4. RSIが限界線 (デフォルト70) を下回り,現在のキャンドルボディが平均ボディサイズの 1/4 よりも大きい場合,ショートします.

  5. 位置が確認されたら,RSIが限界線を越えると閉じる.

  6. RSIの長さ,限界,基準価格などのパラメータを設定できます.

  7. ボディ EMA 期間,オープン ポジション chroot マルチプリキュアなどのパラメータを設定できます.

  8. RSIの交差点数は設定できます.

利点分析

  1. RSIの逆転属性を活用して,逆転をタイミングで把握する.

  2. RMAはより敏感な逆転のために RSIの形成を加速させる.

  3. 大きなキャンドルスタイクボディで小さな範囲の統合をフィルターします.

  4. 十分なバックテストデータが信頼性を保証します

  5. パーソナライズ可能なパラメータは,異なる市場環境に適応します.

  6. シンプルで明確な論理です

リスク分析

  1. RSIはバックテストのバイアスで 実際のパフォーマンスが検証される

  2. 大手企業は 不安定な市場を 完全にフィルタリングできません

  3. デフォルトパラメータはすべての製品に適合しない可能性があります.最適化が必要です.

  4. 勝率が高くないかもしれないし 負けたら負ける必要がある

  5. 破綻の危険性があるので タイムリーストロップが必要です

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

  1. RSI パラメータを異なる期間や製品に最適化する.

  2. 身体のEMA期間を最適化して 体のサイズを平らにする

  3. オープンポジションのボディマルチプライヤーを最適化して 入力の頻度を制御する

  4. 移動ストップ損失を追加して 勝利率を保証します

  5. 逆トレンド取引を避けるためにトレンドフィルターを追加します.

  6. リスク管理のために 資金管理を最適化します

結論

簡単に言うと,これは非常にシンプルで直接的な逆転戦略です.これはRSIの逆転属性と大きなキャンドルスタックボディの勢いを両方に活用して,市場の逆転時に迅速に入ります.バックテスト結果は良いように見えますが,実際のパフォーマンスはまだ検証されていません.それを適用する際にパラメータ最適化とリスク管理が必要です.全体として,これは大きな価値のある戦略であり,ライブ取引で適用し,常に改善する価値があります.


/*backtest
start: 2023-09-23 00:00:00
end: 2023-10-23 00:00:00
period: 3h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3
strategy(title = "Noro's Fast RSI Strategy v1.2", shorttitle = "Fast RSI str 1.2", 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")
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")
rb = input(1, defval = 1, minval = 1, maxval = 5, title = "RSI Bars")
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))
uplimit = 100 - limit
dnlimit = limit

//RSI Bars
ur = fastrsi > uplimit
dr = fastrsi < dnlimit
uprsi = rb == 1 and ur ? 1 : rb == 2 and ur and ur[1] ? 1 : rb == 3 and ur and ur[1] and ur[2] ? 1 : rb == 4 and ur and ur[1] and ur[2] and ur[3] ? 1 : rb == 5 and ur and ur[1] and ur[2] and ur[3] and ur[4] ? 1 : 0
dnrsi = rb == 1 and dr ? 1 : rb == 2 and dr and dr[1] ? 1 : rb == 3 and dr and dr[1] and dr[2] ? 1 : rb == 4 and dr and dr[1] and dr[2] and dr[3] ? 1 : rb == 5 and dr and dr[1] and dr[2] and dr[3] and dr[4] ? 1 : 0

//Body
body = abs(close - open)
emabody = ema(body, 30)

//Signals
bar = close > open ? 1 : close < open ? -1 : 0
up = bar == -1 and (strategy.position_size == 0 or close < strategy.position_avg_price) and dnrsi and body > emabody / 4
dn = bar == 1 and (strategy.position_size == 0 or close > strategy.position_avg_price) and uprsi and body > emabody / 4
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

//Trading
if up
    strategy.entry("Long", strategy.long, needlong == false ? 0 : na, when=(time > timestamp(fromyear, frommonth, fromday, 00, 00) and time < timestamp(toyear, tomonth, today, 00, 00)))

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

もっと