10/20 MA Cross-Over with Heikin-Ashi Signals by Schobbejak

The 10/20 MA Heikin-Ashi Strategy is the best I know. It's easy, it's elegant, it's effective.

It's particularly effective in markets that trend on the daily. You may lose some money when markets are choppy, but your loss will be more than compensated when you're aboard during the big moves at the beginning of a trend or after retraces. There's that, and you nearly eliminate the risk of losing your profit in the long run.

The results are good throughout most assets, and at their best when an asset is making new all-time highs.

It uses two simple moving averages: the 10 MA (blue), and the 20 MA (red), together with heikin-ashi candles. Now here's the great thing. This script does not change your regular candles into heikin-ashi ones, which would have been annoying; instead, it subtly prints either a blue dot or a red square around your normal candles, indicating a heikin-ashi change from red to green, or from green to red, respectively. This way, you get both regular and heikin ashi "candles" on your chart.

Here's how to use it.

Go LONG in case of ALL of the below:

1) A blue dot appeared under the last daily candle (meaning the heikin-ashi is now "green").
2) The blue MA-line is above the red MA-line.
3) Price has recently breached the blue MA-line upwards, and is now above.

COVER when one or more of the above is no longer the case. This is very important. You want to keep your profit.

Go SHORT in case of ALL of the below:

1) A red square appeared above the last daily candle (meaning the heikin-ashi is now "red").
2) The red MA-line is above the blue MA-line.
3) Price has recently breached the blue MA-line downwards, and is now below.

Again, COVER when one or more of the above is no longer the case. This is what gives you your edge.

It's that easy.

Now, why did I make the signal blue, and not green? Because blue looks much better with red than green does. It's my firm believe one does not become rich using ugly charts.

Good luck trading.

--You may tip me using bitcoin: bc1q9pc95v4kxh6rdxl737jg0j02dcxu23n5z78hq9 . Much appreciated!--
Script de código aberto

No verdadeiro espírito TradingView, o autor deste script o publicou com código aberto, para que os traders possam compreendê-lo e verificá-lo. Um brinde ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para utilizá-lo em um gráfico.

Quer usar esse script no gráfico?


Hi! How do you decide where to put the stop loss before you enter the trade on this strategy? And if you on profit, do you trail your stop?
+9 Resposta
crypto430 chrisbows710
@chrisbows710, I was just going to ask that question LOL
chrisbows710 crypto430
@crypto430, Yeah, I think without proper stop loss placement and position sizing, any great strategy will be useless.
Hi, Could you explain why there are two haopens in the beginning of the code. The first is haopen=0.0 and the second is haopen=:= na(haopen) ? (open + close)/2 : (haopen + haclose) / 2. Also, why is the first haopen equal to 0.0. Any explanation would be greatly appreciated.
+1 Resposta
for all of you asking about stoploss, I set the stoploss right below the previous bar's bottom (or use ATR to calculate it) and it works just fine
@schobbejak - Thanks for the code. Can you pls advise when to cover a long position? Would you recommend putting a stop-loss and if yes, where? Thanks again!
any chance of adding an option and adding "+" on the chart where 10 and 10 Ma cross in Settings under Style? like MA Cross indicator here:
Still works great. I was just about to write up my own when I found yours. Thanks bro
really great script! ... i was told from the beginning that moving average trading is a losing battle and you're going to be out of the game sooner than you think ,, BUT! every time you put 2 or 3 ma be it the 10/20 like in your script or 21/55 or whatever you see massive moves that you lost out on ,, yes you can play the high leverage game with macd/bb/rsi coupled with trading only with the trend but that is always high risk ... I went back to messing around with ma trades and at first was doing lower time frames 15min/1hr and it was decent but like you said those whipsaws and low volume sideways markets were brutal sometimes losing 5 - 7 trades in a row before finally catching a decent one ... moving up to the 12hr & 1 day chart is what changed it all , like you said it really does well catching big moves and your losses are more in the line of break evens or small 2% - 3% losses ... I really like your script here and hope it makes my ma trading just that much better

(p.s. there's nothing like catching a big short , saving all your gains and if using small leverage 1.5x - 2x while the market bombs actually profiting is such a great feeling (i usually trade with a big portion of my whole wallet) , again nothing like it)