Center of Gravity of the MACD

Center of Gravity of the MACD

1. Introduction

The “Center of Gravity of the MACD” is an advanced indicator that combines the popular MACD (Moving Average Convergence Divergence) with the concept of Center of Gravity, providing a more accurate tool for identifying trends and potential turning points. The MACD is one of the most widely used indicators in technical analysis, as it helps to evaluate the direction and strength of a trend, as well as the divergences between price and market momentum. The Center of Gravity of the MACD takes this tool a step further by applying an advanced smoothing method and adding standard deviation bands, which helps identify key overbought and oversold areas.

2. How the Indicator Works

The indicator is built using the classic components of the MACD along with a polynomial adjustment that calculates the center of gravity and bands based on standard deviation and Fibonacci levels. Here’s a breakdown of its main elements:

  • MACD and Signal Line: These are calculated in the traditional way, using two exponential moving averages of different periods. The difference between the fast moving average (default 12 periods) and the slow moving average (26 periods) forms the MACD, while a third moving average (default 9 periods) is used to smooth the Signal Line. This difference between the MACD and its Signal Line is used as the core of the indicator to identify trends.
  • Center of Gravity (COG): The Center of Gravity is the result of applying a polynomial adjustment to the MACD values, generating a median line that acts as a balance point. This provides a smoother view of the MACD’s movement over time and helps identify more clearly the inflection points where market trends may change.
  • Standard Deviation Bands: These are added to the COG to create a channel that delimits the areas where the MACD deviates significantly from its center of gravity. These bands are calculated using the standard deviation of the differences between the MACD and the COG and are multiplied by an adjustable factor (kstd) to determine their width.
  • Fibonacci Bands: The Fibonacci bands are added as another layer of information and are based on the multiplication of the standard deviation by a Fibonacci factor (fibband). These additional bands act as potential dynamic support and resistance levels.

3. Interpreting the Indicator

The “Center of Gravity of the MACD” provides detailed information about trend direction and strength, as well as potential reversal points:

  • MACD and COG: When the MACD is above the COG, it indicates an uptrend; when it is below, it suggests a downtrend. Crosses between the MACD and the COG can serve as early signals of a possible trend change.
  • MACD Histogram: The histogram, which reflects the difference between the MACD and its Signal Line, changes color to indicate the direction and momentum of the trend:
    • Dark Green: Indicates a strengthening bullish momentum.
    • Light Green: Suggests a weakening bullish momentum.
    • Dark Red: Shows a strengthening bearish momentum.
    • Light Red: Indicates a weakening bearish momentum.
  • Standard Deviation and Fibonacci Bands: The bands act as overbought and oversold zones. When the MACD approaches or crosses the upper band, the market might be overbought, and when it nears or crosses the lower band, it could be oversold. The Fibonacci bands provide additional levels that help identify possible reversal areas.

The “Center of Gravity of the MACD” is, therefore, a comprehensive tool that offers a clear view of trends and potential turning points in the market.

4. Configuring the Indicator in ProRealTime

The “Center of Gravity of the MACD” is a flexible and customizable indicator that can adapt to different trading styles thanks to its configurable parameters. Below are the main parameters that can be adjusted in ProRealTime:

  • fma (Fast Moving Average): Number of periods for the fast moving average used to calculate the MACD. The default value is 12.
  • sma (Slow Moving Average): Number of periods for the slow moving average used to calculate the MACD. The default value is 26.
  • sigma: Number of periods for the moving average that smooths the MACD Signal Line. The default value is 9.
  • m: Controls the degree of the polynomial used to calculate the Center of Gravity. A higher value makes the adjustment more sensitive to variations in the MACD.
  • p: Defines the number of historical bars used to calculate the Center of Gravity. A higher value generates a smoother center, less sensitive to recent fluctuations.
  • kstd: Multiplication factor applied to the standard deviation to calculate the upper and lower bands. A higher value will generate wider bands, reducing overbought or oversold signals.
  • fibband: Fibonacci-based factor used to calculate the additional bands. The default value is 0.618, representing the golden ratio.

These parameters can be adjusted according to the nature of the asset you are analyzing and your investment horizon. For example, in a more volatile market, you might want to increase the “kstd” value to get more precise signals.

5. Advantages and Limitations

Advantages:

  • Combination of Multiple Tools: The Center of Gravity of the MACD combines MACD analysis with smoothing concepts and standard deviation bands, making it a very complete indicator.
  • Identification of Trends and Extreme Zones: The bands provide an effective way to identify potential overbought and oversold zones, while the COG helps identify trend direction.
  • Flexibility: The adjustable parameters allow the indicator to adapt to different financial instruments and trading styles, from intraday trading to swing trading.

Limitations:

  • Complexity: The amount of information provided can be overwhelming for beginner traders, especially if they are not familiar with using the MACD and standard deviation concepts.
  • Parameter Dependence: As with many technical indicators, the results can vary significantly depending on the parameter values. This means users need to carefully adjust these values to obtain accurate signals.
  • Signal Lag: Like other moving average-based indicators, the COG and standard deviation bands can show a certain lag relative to price action.

6. Conclusion

The “Center of Gravity of the MACD” is a powerful and versatile indicator that combines the effectiveness of the MACD with a more advanced approach to smoothing and standard deviation bands. By adding the concept of center of gravity and Fibonacci bands, it provides traders with a clearer and more detailed view of market trends and momentum, as well as potential reversal areas.

This indicator is especially useful for traders looking for a comprehensive tool that not only helps them identify the trend direction but also offers precise entry and exit points based on overbought and oversold zones. However, as with any technical indicator, it is essential to understand its limitations and adjust the parameters according to market characteristics and the instrument being analyzed.

In summary, the Center of Gravity of the MACD is an excellent addition to any trading strategy, and its flexibility and customization make it a valuable tool for both beginner and experienced traders.

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. MaoRai54 • 278 days ago #

    dear Ivan, it seems to be very interesting but please clarify what are all the lines I see in the chart. In your description you mention only the colors red and green but i see lines with other colors and I can’t know what they are referred. Thanks !!

    • Iván • 277 days ago #

      Hi! you have the answer in the last line of code…

      MacdMiddle as “histo” style(histogram,1)coloured(r,g,b,100)
      $fx[p] as “Center of Gravity” coloured(“blue”) style(line,2)
      $sqh[p] as “Upper Band” coloured(“red”) style(line,2)
      $sql[p] as “Lower Band” coloured(“green”) style(line,2)
      $stdh[p] as “Upper Fibonacci Band” coloured(“orange”) style(dottedline,1)
      $stdl[p] as “Lower Fibonacci Band” coloured(“orange”) style(dottedline,1)
      myMacd coloured(“yellow”) style(line,2)
      0 as “zero”

  2. kats • 267 days ago #

    Le Top , a utiliser avec le nuage violet et alerte TN pour plus de précision.

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar
Related users ' posts
styrke Hello Nicolas, Nice screener, I appreciate the way you always try to condense at maximum th...
Nicolas There's no particular reason. RSI is widely use with its default period and results seems re...
Vonasi I noticed a couple of typo errors in the code. The list of variables lines 4 to 11 should be...
Genotik Thank you for your important contribution this week which is much appreciated! Happy New Yea...
Vonasi No problem. I hope they are useful to someone. Happy and hopefully prosperous New Year to y...
DarioMazza Hi Vonasi, i have a question for you, the comand "pricetype" where did you found it in the ...
Vonasi PriceType is just a variable that I use. The value decides what type of price is used in the...
Vonasi I noticed a couple of typo errors in the code. The list of variables lines 4 to 11 should be...
Nicolas
8 years ago
Trinity Impulse
Trinity Impulse
5
Indicators
ribou ah d'accord merci beaucoup
domenico nlevel1 non modifica la curva al variare del suo valore
tiger_man_no1 Very nice ; what is the best period input date for DAILY CHART ?
Nicolas Your picture is too small, but for sure the problem is about the fact you are still using v1...
Rory Dryden Thanks. This looks useful.
Edelmiro Un millón... de gracias... me gustaría más, poder ofrecer euros; pero va a ser que no puedo,...
Nicolas
8 years ago
Genotik Merci !
WarningTrading Comment peut on la comparer ? comme ceci ? cela ne me donne plus le message d'erreur manque...
sally31120 Bonjour, je n'arrive pas à créer ce screener close > supertrend extended2[1] la réponse...
Nicolas voir ce sujet pour un screener basé sur Supertrend Extended: https://www.prorealcode.com/top...
TACBOLSA
8 years ago
RB-MACD TIMING
RB-MACD TIMING
0
Screeners
Marcel For those who are interested, I post trade opportunities with this indicator on Twitter. (@M...
swapping Thank you for sharing, best regards
Tellie2015 tack ska du ha för dina delningar både här o twitter
Nicolas Better to download the file from the page and import it into your platform in order to not c...
marcov66 Hi Nicolas, thanks for sharing the VWAP Date Indicator. It is really powerful. Nevertheless,...
Nicolas Are you sure you are using the same exact date, hours, minutes, seconds for anchor?
Leo Hi all, I posted a new version of this indicator ( I just add arrows to spot the local maxi...
Trading_En_El_Ibex35 Muchas Gracias por compartir este interesante indicador. Un saludo
xavieralava hola gracias leo
Nicolas
8 years ago
Nicolas https://www.prorealcode.com/topic/ayuda-screener-indicador-perfect-trend-line/#post-51291
Manu L. Bonjour Nicolas, suite a une de mes precedentes demande dans le forum indicateur, j'ai touv...
AntoGH C'est selon moi le meilleur indicateur, que j'ai vu, si vous trouvez mieux dîtes moi car dif...
Jiacky mma = average[per,1](close) should be mma = average[per,1](close * 1000). Otherwise TDF will...
Lydia1948 Hi I really like this indicator - is it easy to change the colour of the blue dots to say g...
Nicolas Lines 23 and 24 are the Red and Blue value between 0 to 255, you can change the color of the...
bolsatrilera Hi Nicolas, I have this version of the True Balance Power ,created by eykpunter on Tradingvi...
bolsatrilera and the code : REM TRUE BALANCE OF POWER // código original de eykpunter para la plataform...
mahdi how can I import itf file into mt4? please help
Nicolas That code is not for MT4, we do not offer free assistance for this platform, but you can ask...
guinsu2000 hello could you share your copy in a pdf or where you whant please ?
Steven Bahia Hi Nicolas - great indicator - is there a way to place a alert when the Oscillator crosses ...
Nicolas Alerts can't be programmed, you have to set them yourself with the Alert tool of the platfor...
Steven Bahia just to add to this would there be a way to establish a entry price from the Oscillator
juanj And the point of violation is the close of the candle that violates the line by generating a...
juanj For the latest version of the strategy or to follow updates and developments see the thread ...
phanz i backtested it with 10K units of EURUSD 1 hour i get an equity curve that is going one way ...

Top