
Chiến lược này là một hệ thống giao dịch phân tích kỹ thuật kết hợp Gaussian Channel và Stochastic RSI. Gaussian Channel tạo ra một kênh lên xuống bằng cách nhân EMA và chênh lệch tiêu chuẩn, cung cấp hỗ trợ động và điểm kháng cự cho biến động giá. RSI ngẫu nhiên xác nhận tín hiệu đảo ngược tiềm năng bằng cách làm mịn giá trị RSI, tạo ra đường %K và %D. Chiến lược này có thể áp dụng cho bất kỳ chu kỳ thời gian nào và cung cấp cho nhà giao dịch một phương pháp giao dịch có hệ thống.
Logic cốt lõi của chiến lược này dựa trên các yếu tố chính sau:
Chiến lược này được thiết kế để xem xét nhiều chiều phân tích kỹ thuật, có nền tảng lý thuyết tốt và khả năng thực hành. Với sự tối ưu hóa tham số hợp lý và quản lý rủi ro, chiến lược này có thể đạt được hiệu suất ổn định trong nhiều môi trường thị trường. Tuy nhiên, người dùng cần hiểu đầy đủ về lợi thế và hạn chế của chiến lược và điều chỉnh phù hợp với môi trường giao dịch thực tế.
/*backtest
start: 2024-02-18 00:00:00
end: 2025-02-16 08:00:00
period: 3h
basePeriod: 3h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © fgkkaraca
//@version=5
strategy("Alienseeker GC and 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=200, 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, lowerChannel)
// Date Range Filter
startDate = input(timestamp("2018-01-01"), "Start Date")
endDate = input(timestamp("2069-01-01"), "End Date")
timeInRange = true
// Strategy Execution
if timeInRange
strategy.entry("Long", strategy.long, when=priceBelowUpper and stochUp)
strategy.close("Long", when=priceAboveUpper )