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が提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?

関連のアイデア