暗号通貨のための高速RSIギャップ戦略


作成日: 2023-11-27 11:22:19 最終変更日: 2023-11-27 11:22:19
コピー: 0 クリック数: 643
1
フォロー
1617
フォロワー

暗号通貨のための高速RSIギャップ戦略

概要: この戦略は,暗号通貨に適用される急速RSI跳躍取引戦略である.これは,同時,急速RSI指標と跳躍K線戦略を使用して取引機会を探している.

戦略の原則: この戦略は,高速RSIと跳躍K線という2つの主要な指標を同時に使用します.

まず,それは7つのK線のみの急速RSI指標を計算する.このRSI指標は,より敏感で,急激に超買超売の現象を捉える.RSIの上限を70に設定し,下限を30に設定します.RSIが70以上であれば超買,30未満であれば超売となります.

2つ目は,空飛ぶK線を検知する.空飛ぶとは,前日の終盤価格と比べて,開盤価格に大幅なギャップがあることを示している.空飛ぶとは,高波動の信号であり,可能性のあるトレンドの逆転を予兆している.

下を跳ね上がるK線が検出されたとき,そして急速RSI指標が超売りを示しているとき,空きをする. 上を跳ね上がるK線が検出されたとき,そして急速RSI指標が超買いを示しているとき,空きをする.

さらに,この戦略は,SMA平均線と最小最大指標をフィルターとして設定し,誤った取引を避ける.フィルターを通過した場合のみ,真の取引信号が発信される.

優位分析: この戦略の最大の利点は,急速な超買い超売り現象と跳躍逆転の機会を捉えることです.特に,波動が大きい暗号通貨市場には適用され,迅速なトレードターニングポイントを捉えることができます.通常のRSIと比較して,急速なRSIは,より敏感で,暗号通貨の高周波取引に適応できます.最小最大指標とSMA均線の加えは,いくつかの誤報機会を排除し,戦略の安定性を向上させることができます.

リスク分析: この戦略には4つのリスクがあります.

  1. 急速RSIは過度に敏感に設定され,多くの誤報信号を発生させるリスクがあります.

  2. 跳躍は実際の反転ではなく,通常の価格変動であり,戦略はストップダストのリスクがある可能性がある.

  3. 市場が平穏な時には,長期にわたって平定状態で過ごしやすい.

  4. 最小最大指標長さなどの策略パラメータの設定が不適切である場合,信号の稀和と低効率が引き起こされます.

リスクの低減には,以下の方法があります.

  1. RSI周期数を増やすように,急速なRSIのパラメータを調整する.

  2. モバイル・ストップを使用して,空飛ぶ追跡による損失を回避し,利益をロックします.

  3. 戦略の参加率の設定を最適化し,低波動的な状況で戦略の参加率を制御する.

  4. 戦略の効果を保証する最適なパラメータを見つけるため,パラメータを繰り返しテストし,最適化します.

改善する方向: この戦略の最適化方向は以下の通りです.

  1. MACD,KDJなどの他の価格指標を空飛ぶと組み合わせて,信号の精度を向上させる.

  2. 市場波動に応じて自動でストップポイントを調整する自己適応のストップポイント設定を追加します.

  3. 結合量能指標であるOBVは空飛ぶ確認信号をチェックし,反転傾向を確認する.

  4. フィルターの長さとパラメータを最適化して,誤報を減らすために最適なパラメータの組み合わせを見つけます.

  5. 異なる暗号通貨の戦略パラメータへの適応性を研究し,より正確なパラメータを設定する.

これらの最適化により,戦略の安定性,適応性,信頼性が向上します.

結論から言うと 急速RSI跳躍戦略は,仮想通貨の変動状況に特化した高効率の取引戦略である.それは,急速RSI指標の感度とK線を跳躍する予測能力を組み合わせている.継続的なテストと最適化は,市場の急速な逆転を捕捉する戦略の能力をさらに改善し,変動性のある仮想通貨市場で長期にわたる安定した収益を得ることができる.

ストラテジーソースコード
/*backtest
start: 2023-10-27 00:00:00
end: 2023-11-26 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//Noro
//2018

//@version=3
strategy(title = "Noro's Fast RSI Strategy v1.5", shorttitle = "Fast RSI str 1.5", overlay = true)

//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(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 
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
    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
    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()