Nitin Ranjan

March 16, 2023

MARS - Moving Average Relative Strength

Tough times call for tougher measures.

Here's my take on relative strength using a simple moving average, some cricketing analogies & a Tradingview script.

1.png



What is MARS?


MARS stands for Moving Average Relative Strength.

We compare the distance from 50-day moving average of the stock vs that of the index. Whomsoever of the 2 has a greater value is stronger.

The length of the moving average is customisable as per your time-horizon.

2.png


The basic structure of the script


Background color indicates the index being above or below its moving average.
- Blue: index above its MA
- Pink: index below its MA

Histogram indicates whether the stock is under-performing or out-performing the index.

- Up-bars: out-performing
- Down-bars: under-performing

3.png


Outperformance


When, between the stock & the index,  the difference between the distance to/from the 50-day moving average is positive, the stock is out-performing.

This outperformance can be of 3 types:
⦿ Relative
⦿ Absolute
⦿ Gross

4.png


Absolute Outperformance


⦿ Batting conditions are tough. Sachin has made just 25 runs (bearish), but Kohli has easily made 60 runs (bullish).
⦿ The index is bearish, but the stock is bullish.
⦿ The script prints blue up-bars on a pink background.

5.png


Gross Outperformance


⦿ Batting conditions are easy. Sachin has made 55 runs (bullish), but Kohli has made 65 runs (bullish).
⦿ Both index & stock are bullish, but stock is more bullish
⦿ The script prints green up-bars on a blue background.

6.png


Relative Outperformance


⦿ Batting conditions are tough. Sachin has made 20 runs (bearish), but Kohli has made 35 runs (less bearish).
⦿ Both index & stock are bearish, but stock is less bearish
⦿ The script prints light green up-bars on a pink background.

7.png


Underperformance


When, between the stock & the index,  the difference between the distance to/from the 50-day moving average is negative, the stock is under-performing.

This underperformance can be of 3 types:
⦿ Relative
⦿ Absolute
⦿ Gross

8.png


Absolute Underperformance


⦿ Batting conditions are easy. Sachin has already made 70 runs (bullish), but Kohli has only made 25 runs (bearish).
⦿ The index is bullish, but the stock is bearish.
⦿ The script prints black down-bars on a blue background.


9.png


Gross Underperformance


⦿ Batting conditions are tough. Sachin has made 35 runs (bearish), but Kohli has made only 20 runs (more bearish).
⦿ Both index & stock are bearish, but stock is more bearish
⦿ The script prints dark red down-bars on a pink background.

10.png


Relative Underperformance


⦿ Batting conditions are easy. Sachin has made 80 runs (bullish), but Kohli has made 55 runs (less bullish).
⦿ Both index & stock are bullish, but stock is less bullish
⦿ The script prints light red down-bars on a blue background.

11.png


Additional customisation options:

  • Paint bars option changes the bar colors to mirror the histogram colors.
  • Easy colors option just changes the histogram colors to either blue or pink, indicating out-performance or under-performance, respectively. This is when the trader does not wish to demarcate between the above-mentioned 6 conditions.


Conclusion

In a nutshell, we would love Absolute Outperformance, & totally stay away from Absolute Underperformance.

Resources


Tradingview script of MARS

Source-code

Hope you find this useful. If you'd wish to know when I publish something new, just subscribe to my newsletter and you'll get the latest sent direct to you. 🙂 








About Nitin Ranjan

Swing Trader | Growth Investor | Pine Coder