I was wondering if someone could take a look at my adjustments to higgsja's Slow Stochastic Multi FIFO.  I have a 12 bar timeout, but I'm getting some trades that stay open for 500+ bars.  What am I missing?
    
    
        
    
    
        
    
    
        Size:  
    
        Color:  
    
    
 
    
        
     
    
        
    
 
    
    
    
        CODE:
Please log in to see this code.
     
    
        
    
    
        
    
    
        Size:  
    
        Color:  
    
    
 
    
        
     
    
        
    
 
    
    
    
        QUOTE:
I have a 12 bar timeout, but I'm getting some trades that stay open for 500+ bars. What am I missing? 
You're missing that it's a multi-position system and your exit is closing only the LastPosition. To add a time-based exit, I'd rewrite the original system's code as follows:
CODE:
Please log in to see this code.
     
    
        
    
    
        
    
    
        Size:  
    
        Color:  
    
    
 
    
        
     
    
        
    
 
    
    
    
        Thank you Eugene.  That is what I missed!
    
    
        
    
    
        
    
    
        Size:  
    
        Color:  
    
    
 
    
        
     
    
        
    
 
    
    
    
        for the Stochastic Multi FIFO strategy is it possible so you can scan a dataset for the last 30 days to see which symbols have  a stochastic crossover when moved from below 20 upward for entry and which symbols have a stochastic crossover when moved from above 80 downward
    
    
        
    
    
        
    
    
        Size:  
    
        Color:  
    
    
 
    
        
     
    
        
    
 
    
    
    
        If the question is "how to see which symbols had an entry signal in the last N days", then it should be possible in general in WLP (one way or another).
    
    
        
    
    
        
    
    
        Size:  
    
        Color:  
    
    
 
    
        
     
    
        
    
 
    
    
    
        how to code for the entry signal in the last N days for a data set when there is a cross over of the stochastic when moved fro below 20 upward in the above code
    
    
        
    
    
        
    
    
        Size:  
    
        Color:  
    
    
 
    
        
     
    
        
    
 
    
    
    
    
        
    
    
        
    
    
        Size:  
    
        Color:  
    
    
 
    
        
     
    
        
    
 
    
    
    
        ok i can do this for a symbol but how do i scan a data set for the crossover
    
    
        
    
    
        
    
    
        Size:  
    
        Color:  
    
    
 
    
        
     
    
        
    
 
    
    
    
        This general question is outside the scope of the strategy being discussed.
    
    
        
    
    
        
    
    
        Size:  
    
        Color: