Here is another example of me trying to work around the limitations of StrategyDesk. I wanted to look at the percent advancing indicators like the $NYAD but they don’t work in StrategyDesk. So I made my own. I initially created one for the S&P 500 by putting a line in a custom strategy for each S&P symbol like this
(Bar[Close,D,0,ABT] > Bar[Open,D,0,ABT]) +
and wrapped them all in a set of parenthesis, divided by 500, and then multiplied by 100 to convert it to a percentage.
But unfortunately it was just too much information for StrategyDesk to be pulling the quotes for all 500 stocks for each bar so it would never update the chart. Instead, I created a smaller one of just the Dow Jones Industrials.
{ DOW Percent Advancing Stocks v1 }
{ (c)2009 by David Smith - dsmith at jetpad dot com }
((
(Bar[Close,D,0,BAC] > Bar[Open,D,0,BAC]) +
(Bar[Close,D,0,GE] > Bar[Open,D,0,GE]) +
(Bar[Close,D,0,PFE] > Bar[Open,D,0,PFE]) +
(Bar[Close,D,0,DD] > Bar[Open,D,0,DD]) +
(Bar[Close,D,0,AA] > Bar[Open,D,0,AA]) +
(Bar[Close,D,0,T] > Bar[Open,D,0,T]) +
(Bar[Close,D,0,VZ] > Bar[Open,D,0,VZ]) +
(Bar[Close,D,0,MRK] > Bar[Open,D,0,MRK]) +
(Bar[Close,D,0,JPM] > Bar[Open,D,0,JPM]) +
(Bar[Close,D,0,KFT] > Bar[Open,D,0,KFT]) +
(Bar[Close,D,0,BA] > Bar[Open,D,0,BA]) +
(Bar[Close,D,0,HD] > Bar[Open,D,0,HD]) +
(Bar[Close,D,0,AXP] > Bar[Open,D,0,AXP]) +
(Bar[Close,D,0,INTC] > Bar[Open,D,0,INTC]) +
(Bar[Close,D,0,CAT] > Bar[Open,D,0,CAT]) +
(Bar[Close,D,0,CVX] > Bar[Open,D,0,CVX]) +
(Bar[Close,D,0,MMM] > Bar[Open,D,0,MMM]) +
(Bar[Close,D,0,KO] > Bar[Open,D,0,KO]) +
(Bar[Close,D,0,MCD] > Bar[Open,D,0,MCD]) +
(Bar[Close,D,0,JNJ] > Bar[Open,D,0,JNJ]) +
(Bar[Close,D,0,UTX] > Bar[Open,D,0,UTX]) +
(Bar[Close,D,0,MSFT] > Bar[Open,D,0,MSFT]) +
(Bar[Close,D,0,PG] > Bar[Open,D,0,PG]) +
(Bar[Close,D,0,IBM] > Bar[Open,D,0,IBM]) +
(Bar[Close,D,0,XOM] > Bar[Open,D,0,XOM]) +
(Bar[Close,D,0,WMT] > Bar[Open,D,0,WMT]) +
(Bar[Close,D,0,DIS] > Bar[Open,D,0,DIS]) +
(Bar[Close,D,0,HPQ] > Bar[Open,D,0,HPQ]) +
(Bar[Close,D,0,C] > Bar[Open,D,0,C]) +
(Bar[Close,D,0,GM] > Bar[Open,D,0,GM])
)
/ 30) * 100
One nice thing about this one is that it’ll work over any interval in StrategyDesk. You can look at the advancing stock percentage on a daily or even down to the minute basis. Here is an example of it being used with hour bars.
