Hi,
I would like to include the daily $SPXA50R index (S&P Percent of stocks above 50 MA) in my system.
Do you know how this index historical data can be downloaded?
Any help would be appreciated.
Thanks!
    
    
        
    
    
        
    
    
        Size:  
    
        Color:  
    
    
 
    
        
     
    
        
    
 
    
    
    
        Hi,
There are two ways to accomplish this:
1) One is to create an index in the Index-Lab tool: 
Create an index: number of stocks above SMAIn your case, take the "Above SMA" IndexDefinition. 
2) And the other is to achieve this in pure WealthScript: 
Number of stocks above their moving average for N periodsYou'll find similar code example in the QuickRef tool > Data access > 
DataSetSymbols Property.
Both solutions require that you create a S&P DataSet and keep it up to date in order to calculate your daily index.
    
 
    
        
    
    
        
    
    
        Size:  
    
        Color: