I am looking for some guidance on how to start a "count", positive or negative, based on when an indicator occurred and would like to be able to show this in radar screen. I am using the 50/200d ma crossover and would like to show how many days back this occurred for each of the symbols on the radar screen. For bullish crossovers looking to show on radarscreen "L1" if the crossover occurred today, "L2" if yesterday, etc. And then S1, S2, S3, etc for days back the bearish crossover occured. Would like to be able to do this for multiple indicators eventually, MACD, SMA, etc but cannot seem to find any good resources online to read about how to start "the" counting....
Can you help answer these questions from other members on futures io?
one idea would be to count the days the study is running and then store the day count when a cross happens. Based on this I created this simple indicator for you. With every new day you can calculate how many days back a cross occurred.
When you load this indicator make sure to load enough "additional data for accumulative calculations". As you are using a Moving Average with 200 bars length I would suggest to load something around 1000 bars to give the indicator the chance to produce a cross over.
Regards,
ABCTG
The following user says Thank You to ABCTG for this post:
Thanks. Seems to be working well. I do have a question however...is there a way to count 01, 02, 03....10,11,12 so that when sorting in RadarScreen the crosses from 1 day ago are not followed by the crosses 11 days ago, and then the 2s and 21s, etc etc
I think if you just remove the "L" and "S" and plot as a number then it will sort numerically. You already have column headers, I think, that identify the direction.
It is because it is a text sort that "L11" sorts before "L2".