Hi All,
I have a long term strategy, where I am interesting in using some monthly data to influence my trading signals. However, when I inspect the close values of the monthly bars, I am seeing 0's for the first twenty [0 - 19] closes. Here is the code I used to get the monthly data:
CODE:
Please log in to see this code.
Here's some additional information. I'm running on the daily time scale testing from 1/1/2008 to 12/31/2012. I have seen this behavior with several symbols: [A, AABA, AAP, ABB]. Each of these symbols has data starting at 1/1/2008. I'm really stuck and I would appreciate any help.
Thanks,
Jec
    
 
    
        
    
    
        
    
    
        Size:  
    
        Color:  
    
    
 
    
        
     
    
        
    
 
    
    
    
        You can't get values for the end of the month before the end of the month.. that's peeking ;)  Consequently, the first month is invalid due to synchronization.  More info in the WealthScript Programming Guide: 
DataSeries > Accessing Secondary Symbols > Secondary Series Synchronization
To visualize the synchronization in your script, add this statement at the end: 
CODE:
Please log in to see this code.
You'll see that the monthlyBars Closing price snaps to the last closing price in a calendar month.
    
 
    
        
    
    
        
    
    
        Size:  
    
        Color:  
    
    
 
    
        
     
    
        
    
 
    
    
    
        Ah that makes perfect sense. Thanks Cone!
    
    
        
    
    
        
    
    
        Size:  
    
        Color: