Relative Index Comparison Script


I am new to scripting. Within the watchlist, I would like to have a column which shows me whether the current RIC level is above or below its 26 moving average. True or False column. For example below is the chart of Genting Singapore (G13). It is one of the 30 index component stock of Straits Times Industrial Index. On the left it is weekly chart. Its current RIC is 75 which is below its 26 moving average RIC of 89


Hi Ivor,

Watchlists by default use daily data, so if you are wanting to check weekly indicator values you need to use a time frame override in the script:

V2 = MA(V1, BARS=26);
V1 > V2

If you were applying the script to a weekly chart, you wouldn’t need the time frame override on the first line.