TradingView
kirilov
17 กุมภา 2021 เวลา 19 นาฬิกา 18 นาที

EMA Cross Strategy 

Bitcoin / TetherUS PERPETUAL CONTRACTBinance

คำอธิบาย

This double EMA crossover strategy aims to illustrate a good strategy design.

It is currently the only published script that:
  • supports a proper date picker for the backtest period
  • is able to test in short and long mode only
ความคิดเห็น
mezmerise9
Hi @kirilov
Thank you very much for this script.
Could you please add these two condition if possible?
Ema1 =10 Ema
Ema2 = 20 Ema
Ema3 = 50 Ema
SMA1= 200SMA
If EMA 3(50) is above SMA1 (200) and EMA1 (10) cross EMA2 (20) then BUY
If EMA 3(50) is below SMA1 (200) and EMA2 (20) cross EMA1 (10) then SELL.

Thank you very much in advance!!
Keep up the great work! GOD BLESS
jitu_delhi
If crossover and crossunder occurs in same bar/ candle. please code to avoid such occurrences.
stephenbologa
@jitu_delhi, this is why u should wait for the candle close. Set the alert "once per candle close".
SergMtnk
what does +2 or -2 on candles mean ?
jayk786
How I use this to back test on XAUUSD please?
kirilov
@jayk786, Just add it to your favorites and then to your chart from the indicators menu.
azah3l
he EMA crossover strategy is a trend trading strategy that utilizes two or more different EMA lines crossing each other. The crossover doesn’t predict future trends but rather shows the ongoing direction of a trend. The EMA crossover is an effective strategy that works extremely well when a change in trend occurs and provides users with a customized way to designate that a trend is beginning. However, what is important to understand about the EMA is that it does not work all the time. Asset prices trend only 30% of the time1.

In the code you provided, the strategy uses two Exponential Moving Average (EMA) lines with different periods (fast and slow) to determine when to enter or exit trades. The fast EMA line is calculated using the close price of the asset over a shorter period of time while the slow EMA line is calculated using the close price over a longer period of time. When the fast EMA line crosses above the slow EMA line, it generates a buy signal and when it crosses below the slow EMA line, it generates a sell signal2.

I hope this helps!
dushsara
@azah3l, Thanks for detailed explanation. ......where to put SL in such a case ?
Bull_Bear56
Thank you, this was helpful
jorgegabrielvm
YOU THE BEST!!!
เพิ่มเติม