The system is not suspose to open a new position in an equity which already is in a open trade status.  I am using a group of equities, 10 min time scale and when the 'buynow' boolean is true, a buy occurs regardless of whether a trade is already on with that equity.  Below is the coding that is use to buy
				if ((buynow && ( ! IsLastPositionActive))) {
					BuyAtMarket((bar + 1), "HitZero%");
					p = (int)LastPosition;
				}			
    
    
        
    
    
        
    
    
        Size:  
    
        Color:  
    
    
 
    
        
     
    
        
    
 
    
    
    
        Not enough information.  There's no way to tell if your script is correctly coded by showing us a very small fragment of it. Please use CODE tags when you post more code.
    
    
        
    
    
        
    
    
        Size:  
    
        Color: