
この戦略は,RSI指標との実体であるEMAをベースに,急速な突破操作を実現する. RSIの急速な形状と大型の実体を利用して,反転信号を認識する.
RSI指標,周期7を計算し,RMAで加速形状を実現する.
実体サイズのEMA,周期30,を実体サイズの基準として計算する.
RSI上での限界値の穿越 (デフォルト 30) と,現在のK線実体が平均実体サイズの1/4より大きい場合,多めにする.
RSIの下の穿越限界線 ((デフォルト70)) で,現在のK線実体が平均実体サイズの1/4より大きい場合,空白する.
持仓していた場合,RSIが再び限界線を突破すると平仓する.
RSIの長さ,限界値,参照価格などのパラメータを設定できます.
エントリーサイズEMA周期,倉庫開設 chroot倍数などのパラメータを設定できます.
RSI ゴールドフォーク/デッドフォークの根数を設定できます.
RSI指標の反転特性を利用して,反転信号をタイムリーに捕捉することができる.
RMAはRSIの加速形を実現し,反転をより敏感にします.
大規模なK線実体フィルターと組み合わせて,小範囲の振動ブレイクを回避する.
観測データは充実しており,信頼性が高い.
異なる市場環境に対応するカスタマイズ可能なパラメータ
取引の論理は明確でシンプルです.
RSI指標は反測偏差があり,実盤効果は検証を待っています.
巨大なK線は,市場を完全にフィルタリングできない.
デフォルトのパラメータは,すべての品種に当てはまらない可能性があり,最適化が必要である.
勝利率は低いかもしれないし,継続的な損失の心理的ストレスに耐えなければならない.
突破の失敗の危険性があるため,早期に破損を防ぐ必要があります.
RSIパラメータを最適化して,異なる周期と品種に対応する.
K線実体EMA周期を最適化し,平らな実体サイズ。
ポジション開設の実数倍数を最適化し,入場頻度を制御する.
移動停止を増加させ,勝利率を保証する.
トレンドフィルターを加え,逆行を避ける.
資金管理戦略を最適化し,単一リスクをコントロールする.
この戦略は,全体として非常にシンプルで直接的な逆転戦略である。それは,同時にRSI指標の逆転属性と大型K線実体による破壊力を利用し,市場突破時に迅速に入場する。反測効果は良いが,実盤効果は検証される必要がある.使用する際には,最適化パラメータとリスク管理に注意する必要がある。全体として,この戦略は,非常に高い価値を持ち,実盤で適用され,継続的に最適化できる非常に良い戦略の1つである。
/*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()