
この戦略は,RSI指標と価格突破を組み合わせて,特定のトレンドの下で形成された収束範囲の中で輪動の機会を探し,その後,ショートライン取引を行い,高効率のショートラインの利益を追求します.
したがって,この戦略は,複数の次元の判断論理を統合し,特定の傾向と突破の機会の下で,RSI指標によって生成された買入シグナルを利用して,ショートラインで利益を得る周期的な操作を行います. 市場の短期的な超下反転と超買い反転の機会を効果的に捉えることができます.
この戦略は,RSI指標を使用して,超買い超売りの短期逆転機会を判断し,価格突破と組み合わせて,短線で利益を得る回転操作を行う.短期的な効率性を追求し,操作が簡単で,リスクが制限され,特定の状況で短線トレーダーに非常によく適しています.全体的な大トレンドを判断し,パラメータを最適化することに注意する必要があります.
/*backtest
start: 2024-01-01 00:00:00
end: 2024-01-31 23:59:59
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/
// © relevantLeader16058
//@version=4
strategy(shorttitle='RSI Classic Strategy',title='RSI Classic Strategy (by Coinrule)', overlay=true, initial_capital = 1000, process_orders_on_close=true, default_qty_type = strategy.percent_of_equity, default_qty_value = 30, commission_type=strategy.commission.percent, commission_value=0.1)
//Backtest dates
fromMonth = input(defval = 1, title = "From Month", type = input.integer, minval = 1, maxval = 12)
fromDay = input(defval = 1, title = "From Day", type = input.integer, minval = 1, maxval = 31)
fromYear = input(defval = 2020, title = "From Year", type = input.integer, minval = 1970)
thruMonth = input(defval = 1, title = "Thru Month", type = input.integer, minval = 1, maxval = 12)
thruDay = input(defval = 1, title = "Thru Day", type = input.integer, minval = 1, maxval = 31)
thruYear = input(defval = 2112, title = "Thru Year", type = input.integer, minval = 1970)
showDate = input(defval = true, title = "Show Date Range", type = input.bool)
start = timestamp(fromYear, fromMonth, fromDay, 00, 00) // backtest start window
finish = timestamp(thruYear, thruMonth, thruDay, 23, 59) // backtest finish window
window() => true
// RSI inputs and calculations
lengthRSI = 14
RSI = rsi(close, lengthRSI)
oversold= input(30)
overbought= input(60)
//Entry
strategy.entry(id="long", long = true, when = RSI< oversold and window())
//Exit
//RSI
strategy.close("long", when = RSI > overbought and window())