ikoskela

EMA Mega Cross Strategy

ikoskela تم تحديثه   
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. :/
ملاحظات الأخبار:
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.
ملاحظات الأخبار:
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")
ملاحظات الأخبار:
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.
ملاحظات الأخبار:
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.
نص برمجي للمستخدمين المدعوين فقط

الوصول إلى هذا النص مقيد للمستخدمين المصرح لهم من قبل المؤلف وعادة ما يكون الدفع مطلوباً. يمكنك إضافته إلى مفضلاتك، لكن لن تتمكن من استخدامه إلا بعد طلب الإذن والحصول عليه من مؤلفه. تواصل مع ikoskela للحصول على مزيد من المعلومات، أو اتبع إرشادات المؤلف أدناه.

لا تقترح TradingView الدفع مقابل النصوص البرمجية واستخدامها حتى تثق بنسبة 100٪ في مؤلفها وتفهم كيفية عملها. في كثير من الحالات، يمكنك العثور على بديل جيد مفتوح المصدر مجانًا في المكتبة العامة.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟

تحذير: يرجى القراءة قبل طلب الوصول.