
Chiến lược này là một hệ thống giao dịch dựa trên các kênh xu hướng, hình thức đảo ngược giá và các chỉ số động lực. Nó kết hợp hệ thống đường thẳng ((EMA) để xác định hướng xu hướng, sử dụng chỉ số tương đối mạnh ((RSI) để xác định khoảng cách sắp xếp và tìm kiếm thời điểm nhập cảnh chính xác bằng cách nuốt hình thức. Chiến lược quản lý rủi ro bằng các chỉ số biến động động động ((ATR) để đạt được lợi nhuận nhanh chóng.
Lập luận cốt lõi của chiến lược được xây dựng dựa trên sự xác thực phối hợp của nhiều cấp chỉ số kỹ thuật:
Chiến lược này xây dựng một hệ thống giao dịch có hệ thống bằng cách sử dụng các công cụ phân tích kỹ thuật tổng hợp. Nó tập trung vào theo dõi xu hướng và chú ý đến sự đảo ngược giá, tăng tỷ lệ thành công của giao dịch thông qua xác minh nhiều chỉ số. Mặc dù có một số hạn chế, nhưng thông qua tối ưu hóa liên tục và quản lý rủi ro, nó có thể cung cấp cho các nhà giao dịch một tài liệu tham khảo đáng tin cậy.
/*backtest
start: 2019-12-23 08:00:00
end: 2024-12-09 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Gold Scalping Strategy with Precise Entries", overlay=true)
// Inputs for EMAs and ATR
ema50 = ta.ema(close, 50)
ema200 = ta.ema(close, 200)
atr = ta.atr(14)
rsi = ta.rsi(close, 14)
// Set 50 pips for gold (assuming 1 pip = 0.10 movement in XAU/USD)
pip_target = 20 * 0.10
// Bullish/Bearish Engulfing Pattern
bullish_engulfing = close > open and close[1] < open[1] and close > close[1] and open < close[1]
bearish_engulfing = close < open and close[1] > open[1] and close < close[1] and open > close[1]
// Define trend and exact entry conditions
longCondition = (ema50 > ema200) and (rsi >= 45 and rsi <= 55) and (bullish_engulfing) and (close > ema50)
shortCondition = (ema50 < ema200) and (rsi >= 45 and rsi <= 55) and (bearish_engulfing) and (close < ema50)
// ATR-based stop loss
longStopLoss = close - atr
shortStopLoss = close + atr
// Entry Conditions with precise points
if (longCondition)
strategy.entry("Long", strategy.long)
strategy.exit("Take Profit/Stop Loss", "Long", limit=close + pip_target, stop=longStopLoss)
if (shortCondition)
strategy.entry("Short", strategy.short)
strategy.exit("Take Profit/Stop Loss", "Short", limit=close - pip_target, stop=shortStopLoss)
// Plot EMAs
plot(ema50, color=color.green, title="50 EMA")
plot(ema200, color=color.red, title="200 EMA")
// Plot Buy/Sell Signals
plotshape(series=longCondition, location=location.belowbar, color=color.green, style=shape.labelup, title="Buy Signal", text="BUY")
plotshape(series=shortCondition, location=location.abovebar, color=color.red, style=shape.labeldown, title="Sell Signal", text="SELL")