TradingView
Ronald_Ryninger
29 สิงหา 2022 เวลา 18 นาฬิกา 57 นาที

MACD Modified 

Cboe Global Markets, Inc.Arca

คำอธิบาย

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.
ความคิดเห็น
Indicator-Jones
interesting concept 👍
Ronald_Ryninger
@Indicator-Jones, Thank you!
Rehman288
I backtest it and bro the plus "+" sign appear when the crossover happened, so i think the script is useless. any opinion?
Ronald_Ryninger
@Rehman288, thank you for your comment. As I have stated, the "+" signs are not there for signal generation, nor do they provide any timely indication. They allow the user to see which values are added to the array to determine the overbought/oversold lines. Feel free to consult code lines 77-104 for more information. The goal of the script its generate overbought/oversold lines to help visualize when a security is possibly overbought/oversold. I suggest turning the crosses off during regular use and only using them when adjusting pivot parameters.
m00ntrader
does it repaint?
Ronald_Ryninger
@m00ntrader, I'm not sure I understand the question; which part of the indicator are you referring to?
m00ntrader
@Ronald_Ryninger, oh i mean the + symbol on the macd...
Ronald_Ryninger
@m00ntrader, the crosses are there for the user to visualize which pivots are being recorded to the array based on the parameters of pivot strength and upper/lower limits. The hope is that by visualizing it on the chart, the user can more accurately adjust their parameters. They are only added to the chart after all parameters have been met, so how long it takes them to appear is based on pivot strength. I believe this is what you mean by repainting. Using default pivot strength, pivots must be confirmed by 5 periods on either side. I hope this helps!
lukricky
Ron, u think yr new MACD way is also working fine with lower time frame such as 3, 5 mins, 15 mins for short term intraday ?
Ronald_Ryninger
@lukricky, I do not trade on the intraday with moving averages due to the noise. Still, the indicator's calculations should work the same, no matter the timeframe. If using it on an intraday timeframe, it would be worth increasing the array size since there will be more pivots.
เพิ่มเติม