The Gold Fast Breakthrough EMA Trading Strategy is a gold scalping strategy based on the EMA indicator. This strategy uses the crossover of the fast EMA and slow EMA to generate trading signals, combined with ATR indicators to set stop loss and take profit points to implement gold scalping trading.
This strategy mainly relies on the crossover of the 9-day fast EMA and 21-day slow EMA, as well as the relationship between price and EMA to determine entry. Specifically, when the fast EMA crosses above the slow EMA and the close price is higher than the slow EMA, go long; when the fast EMA crosses below the slow EMA and the close price is lower than the slow EMA, go short.
In addition, this strategy also uses the ATR indicator to calculate the average range of fluctuations in the most recent 2 days. After entry, the stop loss point is set at the lowest (atrLength) minus atr multiplied by atrMultiplier; the take profit point is set at the highest (atrLength) plus atr multiplied by atrMultiplier. This is a volatility trailing stop mechanism based on the ATR indicator.
This is a relatively simple gold scalping strategy with the following advantages:
This strategy also has some risks:
In response to the above risks, we can consider appropriately reducing the position size, combining with other indicators to filter signals, or testing different parameters to optimize the setting of stop loss and take profit.
This strategy can also be optimized in the following directions:
The Gold Fast Breakthrough EMA Trading Strategy is a simple and practical gold scalping strategy. It uses EMA crossover to determine the trend and sets stop loss and take profit based on the ATR indicator, which can effectively lock in small profits. This strategy can be improved through multiple indicator filtering, position sizing adjustment, parameter optimization, etc., making it more adaptable to market conditions.
/*backtest start: 2023-12-18 00:00:00 end: 2024-01-17 00:00:00 period: 1h basePeriod: 15m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=4 strategy("XAUUSD Trading Strategy", shorttitle="XAUUSD Strategy", overlay=true) // Inputs fastLength = input(9, title="Fast EMA Length") slowLength = input(21, title="Slow EMA Length") atrLength = input(2, title="ATR Length") atrMultiplier = input(2, title="ATR Multiplier") profitTarget = input(0.7, title="Profit Target") * 100 // in percentage commission = input(0.001, title="Commission") // 0.1% per trade // Calculations fastEMA = ema(close, fastLength) slowEMA = ema(close, slowLength) atr = atr(atrLength) // Entry rules longCondition = crossover(fastEMA, slowEMA) and close > slowEMA if (longCondition) strategy.entry("Long", strategy.long) shortCondition = crossunder(fastEMA, slowEMA) and close < slowEMA if (shortCondition) strategy.entry("Short", strategy.short) // Stop loss and take profit longStop = lowest(atrLength) - atr * atrMultiplier longTakeProfit = highest(atrLength) + atr * atrMultiplier shortStop = highest(atrLength) + atr * atrMultiplier shortTakeProfit = lowest(atrLength) - atr * atrMultiplier strategy.exit("Exit Long", "Long", stop=longStop, limit=longTakeProfit) strategy.exit("Exit Short", "Short", stop=shortStop, limit=shortTakeProfit) // Plot EMAs plot(fastEMA, title="Fast EMA", color=color.blue) plot(slowEMA, title="Slow EMA", color=color.red)