Ronald_Ryninger

MACD Modified

In an attempt to improve the MACD for trading, I have added an alternative way to calculate the MACD Line and Overbought/Oversold (OB/OS) lines to filter signals.

The alternate calculation I named "Modified" and put the option to select it under "MACD Calculation" in the input menu. Traditionally the MACD is calculated as fastEMA - slowEMA, for "Modified" I changed the calculation to ((fastEMA - slowEMA) / slowEMA * 100). The goal of this change is to view the difference in MA as a percent of the slow. The hope is that this will compensate for securities that have had major gains or losses in their history.

For the OB/OS lines, I coded in three different ways to calculate them. Users can select which method they prefer in the input menu. The first is through pivot points. The script records the pivot points into an array and takes the average of the array. There are two arrays, one for the OB line and one for the OS line. I also added filters so it will only record pivots above/below a specific value. The crosses on the indicator are for debugging purposes only. They mark the pivots that were recorded into the arrays. The crosses are offset by the pivot strength and do not provide timely indications. All inputs are adjustable for the pivots in the "Pivots" section of the input menu. The second method for the OB/OS lines I added is Bollinger Bands. The user can choose to put it around the Signal or MACD line. The final method added is simply using the previous high/low pivot of the MACD line.

Checkout my free weekly market updates on substack!
ronaldryninger.substack.com
开源脚本

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

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?