I am trying to create a fairly simple breadth output, but keep running into issues with how the breadth module works.
I am seeking to take that historical S&P 500 and take a count of the number of stocks up ( then summed over 5 days) as a ratio of the count of the number of stocks down (summed over 5 days).
Rather than building your own breadth you can use our breadth data (SPX-A for daily advances and SPX-D for declines).
To calculate the 5 day ratio use the following:
//Get the daily advance and decline values;
Adv1=GETDATA(CODE=SPX-A.OB:BD);
Dec1=GETDATA(CODE=SPX-D.OB:BD);
//Calculate 5 day ratio;
ACC(Adv1, RANGE=Look Back Period, BARS=5) / ACC(Dec1, RANGE=Look Back Period, BARS=5)
So the current ratio is 0.49 ie over the last 5 days there have been half as many advancing stocks as declining:
It looks like the underlying Breadth Data hasn’t been downloaded to your system. If you open a chart of SPX-A or SPX-D how much data do you have? It should go back to 1998 for SPX and 2017 for R3K.
To make sure you have all the data, click on Data > Exchanges > Breadth Data and select Import EOD Data History. Once complete, reopen your chart and the historical ratio should be calculated.
Was looking at this and trying to reproduce it but I don’t see Data/Exchanges/Breadth Data as an option. Is this not a standard feature in the Enterprise Edition? Thanks.