TradingView
gregoirejohnb
Jan 16, 2021 10:25 PM

EMA Crossover Strategy 

Ethereum / TetherUSBinance

Description

Moving average crossover systems measure drift in the market. They are great strategies for time-limited people.
So, why don't more people use them?

I think it's due to poor choice in choosing EMA lengths: Market Wizard Ed Seykota has a guideline for moving average crossovers: the slow line should be at least 3x the fast line. This removes a lot of the whipsaws inherent in moving average systems, which means greater profitability. His other piece of advice: long-only strategies are best in stock markets where there's a lot more upside potential.

Using these simple rules, we can reduce a lot of the whipsaws and low profitability trades! This strategy was made so you can see for yourself before trading.

=== HOW TO USE THIS INDICATOR ===
1) Choose your market and timeframe.
2) Choose the length.
3) Choose the multiplier.
4) Choose if the strategy is long-only or bidirectional.

Don't overthink the above! We don't know the best answers, that's why this strategy exists! We're going to test and find out.
After you find a good combination, set up an alert system with the default Exponential Moving Average indicators provided by TradingView.

=== TIPS ===
Increase the multiplier to reduce whipsaws (back and forth trades).
Increase the length to take fewer trades, decrease the length to take more trades.
Try a Long-Only strategy to see if that performs better.
Comments
Pinguiino
Great job on this script. Ive been doing a lot of backtesting with it, it offers pretty good results!
Have you noticed the significant differences between using regular candles vs Heikin Ashi candles?
I.e. BTCUSDT Binance 4H for 2020, EMA 7, Multiplier is 3, Long only, 100k initial capital, 100% of equity, 0.1% fee
- regular candles: ~240k net profit on 49 closed trades
- heikin Ashi candles: ~780k net profit on 49 closed trades
Ive been reviewing the list of trades for 2020 to compare the two scenarios, and would love your input on it.

Thank you,

David
Pinguiino
@gregoirejohnb Another example with much less trades for the year.
I.e. BTCUSDT Binance 4H for 2020, EMA 15, Multiplier is 7, Long only, 100k initial capital, 100% of equity, 0.1% fee
- regular candles: ~293k net profit on 18 closed trades
- heikin Ashi candles: ~395k net profit on 15 closed trades
gregoirejohnb
@zboobi123, Interesting! I normally only work with bars so I don't have much experience trading Heiken Ashi. TradingView gives a little warning about strategy results being inconsistent with Renko/Ashi charting because you can't get the fills at listed prices, which makes sense. However, Heiken Ashi also cuts out noise which reduces whipsaws and/or doesn't get taken out by chop. The equity curve between a standard chart strategy and a Heiken Ashi strategy look similar in shape, so I don't think anything weird is happening. I think this something I'd have to trade to figure out to see if it's legit. The problem for fills might be real, but it also might be a great upgrade. I'll try trading this strategy on the side for a few months and see what happens. Thanks for bringing this up!
CryptoDexHead
@gregoirejohnb, Imo the problem is super big with fills, as in order to calculate the fill, the strat-tester uses close and open prices, I tried it with my setup and somehow got a 10x with bars but a 400x with heljkin ashi candles, and did some observation and it seems like the limit orders aren't much apart from eachother (at least not enough to account for such a huge diference IMO)
So yeah, great work dude, but I think using ashi will give unrealistic results as you stated
gregoirejohnb
I made a video about creating an EMA crossover system here:
crypt0j4ck
Hi, thanks for sharing this script. Is it possible to have individual alerts for buy and sell signals? I'd like to trigger my bot in 3commas using this script. Thanks
gregoirejohnb
@crypt0j4ck, Yes, it's possible to set up with separate buy/sell signals. Watch the associated video (you can find it in the comments here or in my profile) starting at 14:50 to do it yourself. Or, I can program a custom indicator with a 3comma integration for you (check my profile and/or signature for link).
rinzinlama365
hello sir
can you please tell me what is my long entry id with those values means please? it will help me alot thank you.
gregoirejohnb
@rinzinlama365, Ignore the "long entry id" and those values. All you need to know: green arrow = go long, red arrow = exit.
rinzinlama365
@gregoirejohnb, thank you sir.
More