A simple script that can be used to determine if the scrip is outperforming or underperforming the benchmark (selectable by input) with respect to the phase/lifecycle it is in.
The script works on the basis of comparing the phase of the benchmark and the phase of the symbol that it is in. Phase of a stock is defined and explained in many books and can easily be checked out on the internet. The comparison is made on multiple timeframes, and a deduction is made algorithmically to arrive where the chosen symbol in its lifecycle is vis-a-vis the benchmark selected.
The output is color coded bars of varying intensity.
The details are as follows:
Green Shades: Outperformance. Lighter the color stronger the outperformance
Red Shades: Underperformance. Darker the color stronger the outperformance
White: No clear signal
This script can work on any timeframe. For longer duration, use Weekly charts (preferred) for shorter use 60 minute charts (or whatever is normalised value as per session open times. For eg. for Indian markets open from 9:15 AM to 3:30 PM, use 75 minute instead of 60 minute charts).