Easy to Use MACD+RSI Strategy


Easy to use strategy test using MACD with RSI as a confirming indicator. The code is structured to make it easy to manipulate the variables to your choosing.

LINE 2 = Change the amount you invest every trade and the currency
LINE 8/9/10 = Change the defval of each of these lines to backtest from a certain date
LINE 16/17/18 = Change the MACD sensitivity by changing the defval on each line
LINE 21 = Change the value after close toadjust the sensitivity of the RSI
LINE 37/39 = Change/remove the < and > variables for macdLine and rsivalue after the crossover/crossunder to adjust your buying point further.

As a beginner you may not feel comfortable with shorting stocks, therefore LINE 5 was added to only allows long positions.

Funny how a simple indicator can return such a high profitability. Couple this with some trend/exit strategies and you'll have something really special!

Skrip open-source

Sejalan dengan semangat TradingView, penulis skrip ini telah mempublikasikannya secara open-source, sehingga para trader dapat memahami dan memverifikasinya. Salut untuk sang penulis! Anda dapat menggunakannya secara gratis, tetapi penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk dapat menggunakannya didalam sebuah chart.

Inggin menggunakan skrip ini pada chart?


Thanks for posting this! For anyone playing around, I was having significantly less luck than the above performance, so adjusted to also sell if rsivalue > 70. Profits jumped significantly in backdating testing. Just food for though.
+3 Jawab
kjbint swmacint
@swmacint, Hey, mind sharing your updated script with me? I have been trying to rewrite the above using pine version 4 vs the 2 it was written in but havent had much luck.
JustInNovel swmacint
@swmacint, good idea. Thanks!
Is this a script to set an alert or something else?
+2 Jawab
@mac_dick, it's most useful as a back-testing strategy, a way to see how profitable a security is based on the MACD/RSI variables you put in place. It does show you when to buy/sell, but it won't actually send you an alert.
Hi! How could we adjust the RSI levels (eg instead of 30/70, make it 20/80)? Thanks =)
+1 Jawab
TrendsAreSexy MadMoto29
@MadMoto29, Within LINE 37 and 39 you can adjust your buying parameters by changing the value after rsivalue. You'll see in the code above that the buy order uses an RSI value of less than 50. You can adjust this and add this portion to your sell order code to tweak your numbers further.
+1 Jawab
Hi, I was wondering if someone has updated this script to version 4?
No, this is not working properly. You miss most of good trades with this. You should remove the RSI or have an option for it. But thanks for the work tho. But i manually bactest and also did real trades in 2020, your indicator shows a complelely opposite result.
Hi thanks for sharing this. Would you be willing to fork a version suitable for binary options testing, or share a line or two of code for what to add? I'm sure the only thing missing is the ability to set the expiry time (eg in candles). Thanks for considering!
Beranda Penyaring Saham Penyaring Forex Penyaring Crypto Kalender Ekonomi Tentang Fitur-Fitur Chart Harga Akun Refer seorang teman Tata Tertib Pusat Bantuan Solusi Website & Broker Widget-Widget Solusi Charting Perpustakaan Charting Ringan Blog & Berita Twitter