
この戦略は,Bollinger BandsとRSIの二重確認戦略と呼ばれています. この戦略は,ブルイン帯の上下軌道を計算して,RSIの超買い超売りシグナルと組み合わせて,低買い高売りを目的としています.
この戦略は,ブリン帯とRSIの2つの指標に基づいています.
ブリン帯は,上線,中線,下線を構成し,一定の周期内の平均線と標準差を計算することによって構成されている. 価格が上線に近づくと超買区,下線に近づくと超売区である.
RSIは,底の反転と頂上の回調のタイミングを判断するために使用されます. RSIが70を超えると,超買区であり,30を下ると,超売区です.
この戦略の取引シグナルは:
単一の指数による偽信号を回避し,より信頼性の高い低価格,高価格のセールス戦略を実現できます.
リスクの解決:
この戦略は,ブリン帯とRSIの二重検証メカニズムにより,低買高出場を実現し,偽信号の確率を低減し,最適な買入タイミングを逃さないようにする.同時に,パラメタリックな設計は,戦略の適応性と最適化スペースを増加させる.しかし,一定のリスクも存在し,安定性を高めるためにさらなる最適化が必要である.全体的に,この戦略は,トレンドと超買超売り指標の優位性を組み合わせ,パラメタルの最適化とリスクが制御されている場合に,良い収益の余地がある.
/*backtest
start: 2024-01-06 00:00:00
end: 2024-02-05 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © samuelarbos
//@version=4
strategy("Estrategia de Bandas de Bollinger y RSI", overlay=true)
// Definimos los parámetros de las bandas de Bollinger
source = input(close, title="Precio base")
length = input(20, minval=1, title="Longitud")
mult = input(2.0, minval=0.001, maxval=50, title="Desviación estándar")
// Calculamos las bandas de Bollinger
basis = sma(source, length)
dev = mult * stdev(source, length)
upper = basis + dev
lower = basis - dev
// Definimos el RSI y sus parámetros
rsi_source = input(close, title="RSI Fuente")
rsi_length = input(14, minval=1, title="RSI Longitud")
rsi_overbought = input(70, minval=0, maxval=100, title="RSI Sobrecompra")
rsi_oversold = input(30, minval=0, maxval=100, title="RSI Sobrevendido")
// Calculamos el RSI
rsi = rsi(rsi_source, rsi_length)
// Definimos las señales de compra y venta
buy_signal = crossover(close, lower) and rsi < rsi_oversold
sell_signal = crossunder(close, upper) and rsi > rsi_overbought
// Compramos cuando se da la señal de compra
if (buy_signal)
strategy.entry("Buy", strategy.long)
// Vendemos cuando se da la señal de venta
if (sell_signal)
strategy.entry("Sell", strategy.short)