ikoskela

EMA Mega Cross Strategy

ikoskela Aggiornato   
Based on Anvamsi's script which uses 12/26 EMA crosses for entry/exit signals. I also add the following features:
* Optimized default parameters for ETH 4hr chart
* Use EMA 55/200 relationship to filter out signals
* Use RSI vs EMA of RSI to filter out signals
* Use 26/55 EMA relationship to filter out signals
* Use volume climax technique as an additional exit strategy
* Uses bull/bear RSI divs as an additional exit strategy
* Adds bull RSI div quick flip plays when nothing else is going on for extra $$

This very experimental and my first major script. I've kept it invite only because the only people using this should have a direct line of communication open with me at this point.

NOTE #1:
You can get 2018 ETH trade profitability to reach 100% if you change line 97 from:
if (shortEMA and (rsi1 <= ema(rsi1,RSIEMALength)) and shorttrend and (ema(close,26) < ema(close,55)))
to:
if (shortEMA and (rsi1 <= ema(rsi1,RSIEMALength)) and shorttrend)

Basically, you remove an extra filter from the short strategy. It's novel to see profitability hit 100% but if you look at performance from 2017, it increases the max draw down by a lot!

NOTE #2:
I couldn't get RSI bear div quick flips to work so they are disabled. The remaining short strategy is in effect.

NOTE #3:
The profitability is good for long-only, if you check Strategy Tester->Performance Summary.

NOTE #4:
I am not an expert trader (mainly due to psychological factors i think) but i can program and have a good understanding of signal processing from working with analog synthesizers. Use this at your own risk. I am not liable if you lose all of your money!

NOTE #5:
Code is really messy. Old code commented out everywhere. :/
Note di rilascio:
THIS IS A MORE CONSERVATIVE VERSION.

I removed the RSI div parts of the code because I am not confident in them yet. They backtest OK but what happens in real-life is that the RSI get pulled to the extreme in real-time and then subsequent candles mellow it out as the trend reverses. This means that, in practice, you may get buy/sell signals that then disappear later on!

I've left some RSI-based elements in the code to filter out EMA crosses that shouldn't be taken on at the RSI extremes. I'm more comfortable using RSI to prevent a trade.

I've also left in the climax oversold/overbought alerts, which do use RSI since I do know historically that they work well.

I am going to further refine the RSI div part of the code later on so it will return. In the meantime, I would just use this script in conjunction with an RSI div script so you can use it with your own judgement manually.
Note di rilascio:
Added the following checkboxes to the settings menu:

UseShorting = input(true,"Enable Shorting")
UseStopEntry = input(true,"After Entry Signal, Use Stop to Enter on HH(LL)")
UseStopExit = input(false,"After Exit Signal, Use Stop to Exit on LL(HH)")
UseVolumeClimax = input(false,"Immediately exit when Volume Climax is detected")
Note di rilascio:
I couldn't get the stop entries to work correctly so I switched the option to choose whether HH(LL) should accompany the entry and exit signal when triggering a market order.
Note di rilascio:
I've added an exception to the EMA26/55 rule that allows long entries if the daily RSI has gone below a certain threshold and certain number of candles back, AND the 26/55 MACD is above a certain threshold. I have it set at -23. You should experiment with this to catch long entries after bottoms and whether or not loosening the criteria to catch them positively or negatively impacts the trade strategy.

I've also cleaned up the code and commented it.
Script su invito

L'accesso a questo script è riservato agli utenti autorizzati dall'autore, solitamente dietro pagamento di una commissione. Puoi aggiungerlo ai preferiti, ma sarai in grado di utilizzarlo solo una volta ricevuto il via libera da parte dell'autore. Per maggiori informazioni, puoi controllare le istruzioni qui sotto o contattare direttamente ikoskela.

TradingView sconsiglia di acquistare la licenza per usare uno script fino a che non si ha fiducia al 100% nei confronti del venditore. In molti casi, esistono alternative gratuite ed open-source nella nostra Libreria pubblica.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?

Avvertenza: leggi prima di richiedere l'accesso.