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
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Ý tưởng liên quan