
この戦略は,ガウスチャンネルの (Gaussian Channel) とランダムな比較的弱い指標 (Stochastic RSI) を組み合わせた定量取引システムである.この戦略は,価格とガウスチャンネルの交差,およびランダムなRSIの動きを監視することによって,市場のトレンドの逆転の機会を捉える.ガウスチャンネルは,移動平均と標準差によって構成され,市場の波動範囲を動的に反映し,ランダムなRSIは,動力の確認信号を提供します.
戦略の中核となるロジックには、次の主要な部分が含まれます。
この戦略は,技術分析のトレンド追跡と動向指標を組み合わせて,論理的に完全でリスクが制御可能な量化取引システムを構築しています. いくつかの固有のリスクがあるにもかかわらず,継続的な最適化と改善により,戦略は,異なる市場環境で安定したパフォーマンスを維持すると見込まれています.
/*backtest
start: 2024-02-21 00:00:00
end: 2025-02-18 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Binance","currency":"BNB_USDT"}]
*/
//@version=5
strategy("SAJJAD JAMSHIDI Channel with Stochastic RSI Strategy", overlay=true, commission_type=strategy.commission.percent, commission_value=0.1, slippage=0, default_qty_type=strategy.percent_of_equity, default_qty_value=100, process_orders_on_close=true)
// Gaussian Channel Inputs
lengthGC = input.int(20, "Gaussian Channel Length", minval=1)
multiplier = input.float(2.0, "Standard Deviation Multiplier", minval=0.1)
// Calculate Gaussian Channel
basis = ta.ema(close, lengthGC)
deviation = multiplier * ta.stdev(close, lengthGC)
upperChannel = basis + deviation
lowerChannel = basis - deviation
// Plot Gaussian Channel
plot(basis, "Basis", color=color.blue)
plot(upperChannel, "Upper Channel", color=color.green)
plot(lowerChannel, "Lower Channel", color=color.red)
// Stochastic RSI Inputs
rsiLength = input.int(14, "RSI Length", minval=1)
stochLength = input.int(14, "Stochastic Length", minval=1)
smoothK = input.int(3, "Smooth K", minval=1)
smoothD = input.int(3, "Smooth D", minval=1)
// Calculate RSI
rsi = ta.rsi(close, rsiLength)
// Calculate Stochastic RSI
lowestRSI = ta.lowest(rsi, stochLength)
highestRSI = ta.highest(rsi, stochLength)
stochRSI = (rsi - lowestRSI) / (highestRSI - lowestRSI) * 100
k = ta.sma(stochRSI, smoothK)
d = ta.sma(k, smoothD)
// Trading Conditions
stochUp = k > d
priceAboveUpper = ta.crossover(close, upperChannel)
priceBelowUpper = ta.crossunder(close, upperChannel)
strategy.entry("Long", strategy.long, when=priceAboveUpper and stochUp)
strategy.close("Long", when=priceBelowUpper)