This strategy uses the crossover of two triple exponential moving averages (TEMA) with different parameters to generate buy and sell signals. The fast TEMA crossing above the slow TEMA produces buy signals, while crossing below produces sell signals. It combines the smoothness of TEMA to discover potential trend changes.
Calculate a fast TEMA with period 34.
Calculate a slow TEMA with period 13.
Fast TEMA crossing above slow TEMA generates buy signals.
Fast TEMA crossing below slow TEMA generates sell signals.
Use strategy module for automated order management.
Smoother TEMA curves reduce false signals.
Crossover captures short and long term trend changes.
Simple and clear trading signals, easy to execute.
Customizable parameters for different timeframes.
Can preset stops and limits for risk control.
Improper parameters may generate excessive false signals.
TEMA has some lag, may miss sudden events.
Some major breakouts cannot be warned earlier.
Needs combination with trend and S/R analysis.
Possibility of some retracement risks.
Test and optimize parameters for best combinations.
Add filters to ensure high quality signals.
Incorporate analysis of larger trend.
Develop exit mechanisms to prevent overholding.
Adjust fixed stops to dynamic stops.
Test performance in live markets across different instruments and timeframes.
This strategy utilizes the smoothness of TEMA and crossover logic to generate simple trading signals. With parameter optimization, strict filtering, and risk control, it can become a steady trend following strategy. Overall a practical strategy worth in-depth optimization and testing for improved returns.
/*backtest start: 2023-09-11 00:00:00 end: 2023-09-18 00:00:00 period: 30m basePeriod: 15m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=2 strategy(title="TEMA With Alert", shorttitle="ALRTEMA", overlay = true ) //Blue Length = input(34, minval=1) xPrice = close xEMA1 = ema(xPrice, Length) xEMA2 = ema(xEMA1, Length) xEMA3 = ema(xEMA2, Length) nRes = 3 * xEMA1 - 3 * xEMA2 + xEMA3 //RED Length2 = input(13, minval=1) xPrice2 = close xEMA12 = ema(xPrice2, Length2) xEMA22 = ema(xEMA12, Length2) xEMA32 = ema(xEMA22, Length2) nRes2 = 3 * xEMA12 - 3 * xEMA22 + xEMA32 buy = 1 sell = 0 x = if nRes > nRes2 buy else sell c = cross(nRes, nRes2) xy = "Do Some Thing :" + tostring(x) alertcondition(c, title="Crosing Found", message=xy) plot(nRes, color=red) plot(nRes2, color=blue) short = cross(nRes, nRes2) and nRes > nRes2 long = cross(nRes, nRes2) and nRes < nRes2 strategy.entry("long", strategy.long, when=long) strategy.entry("short", strategy.short, when=short)