I am trying to add a stop loss function to the included Gap Filler strategy. The script below doesn't seem to exit properly for any stop loss below 100, so I must have done something wrong. Any help would be greatly appreciated.
CODE:
Please log in to see this code.
    
        
    
    
        
    
    
        Size:  
    
        Color:  
    
    
 
    
        
     
    
        
    
 
    
    
    
        By the way, your stop loss coded in a way to execute on the next open after triggering the event - was that by design?
CODE:
Please log in to see this code.
    
        
    
    
        
    
    
        Size:  
    
        Color:  
    
    
 
    
        
     
    
        
    
 
    
    
    
        Thanks for the help Eugene. Selling at the next day open was not where I wanted to end up - but I'm a total newbie and so this was my first attempt at inserting a stop loss. Any ideas on how to trigger the sale immediately?
Thanks again.
    
    
        
    
    
        
    
    
        Size:  
    
        Color:  
    
    
 
    
        
     
    
        
    
 
    
    
    
        Please try this:
CODE:
Please log in to see this code.
In addition, I hope that the following KB article can be helpful -- it contains the code for a couple of gap closer systems:
System Building | Gap trading strategies
    
        
    
    
        
    
    
        Size:  
    
        Color:  
    
    
 
    
        
     
    
        
    
 
    
    
    
        Excellent - looks like that works. Thanks for the link as well.
    
    
        
    
    
        
    
    
        Size:  
    
        Color: