ikoskela

EMA Mega Cross Strategy

ikoskela Mis à jour   
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. :/
Notes de version:
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.
Notes de version:
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")
Notes de version:
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.
Notes de version:
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 sur invitation seulement

L'accès à ce script est limité aux utilisateurs autorisés par l'auteur et nécessite généralement un paiement. Vous pouvez l'ajouter à vos favoris, mais vous ne pourrez l'utiliser qu'après avoir demandé et obtenu l'autorisation de son auteur. Contactez ikoskela pour plus d'informations, ou suivez les instructions de l'auteur ci-dessous.

TradingView ne suggère pas de payer pour un script et de l'utiliser avant d'avoir 100% confiance en son auteur et de comprendre son fonctionnement. Dans de nombreux cas, vous pouvez trouver gratuitement une bonne alternative open-source dans nos Scripts communautaires.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?

Avertissement : Veuillez lire avant de demander l'accès.