OPEN-SOURCE SCRIPT

MACD + RSI with Trade Signals

已更新
This indicator by default comes with the MACD shown but can be switched to show the RSI instead. Settings for each indicator can also be customized as well as Buy/Sell signals given based on pull back crossovers that follow the 200 EMA of the price Chart. There's an above/below middle fill option you can use but I tend not to but I know some traders like to see when an oscillator is above/below the middle and use it as a trend diretion. By the way, the fourth setting for the MACD (which is 2 by default) is the size of the histogram.

Buy Signal = Price is above the 200 EMA. Current or previous MACD or RSI line is/was below middle line and now crossed above the signal line.
Sell Signal = Price is below the 200 EMA. Current or previous MACD or RSI line is/was above middle line and now crossed below the signal line.

There are alerts for each signal as well (MACD and RSI, both buy and sell).
Feel free to leave a comment regarding issues or suggestions for this indicator or ideas for the next one I should do :)
版本注释
- Took out a line an option that wasn't being utilized
- Updated the picture to show some 2:1 Risk to Reward ration trades that did very well with this strategy. Today is Saturday, July 23, 2022. These were taken from pre-market Friday, July 22, 2022 on the S&P 500 Mini Futures (same chart as micros as well)
版本注释
Updated some small things, most notable TradingView decided invisible plots now need to be shown so it made the indicators zoom way out. I've fixed that mostly by plotting much closer to the graph.
版本注释
Minor Changes:
- Signals can now be shown on both MACD and RSI
- Took out Signal Bars as it disrupts other indicators on the chart from changing the color of bars. Namely as it doesn't work with my "Ultimate Indicator"
版本注释
Minor Update:
- Fixed the indicator from drawing stupidly zoomed out by limiting the top and bottom to 95 and 5 instead of +- 1000
版本注释
Updated the script quite a bit:
- Added the Stochastic Oscillator as an option (There's a checkbox for Stochastic RSI if you'd rather use that, simply select Stochastic from the drop down menu then check the checkbox for Stochastic RSI)
- Added color changing option for the oscillator and signal lines directly on the Inputs page
- Added option to fill between the oscillator and signal line (These color options will remain on the Style tab)
- Changed the names of some variables and added a few to get the above functions working
buyMoving Average Convergence / Divergence (MACD)macdivergenceRelative Strength Index (RSI)rsi-emaSELLsignalStochastic Oscillatorstochasticoscillatortrend

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明