Greetings!
 I'm the beginner in  C# and I've already experienced some problems.
I have constructed a simple script which exit the positions on: Stop loss, MFEAsOfBarPercent and Close < SMA (14)
I'd like to enter a long position after a Close is greater than SMA(14) or to reenter a position if an exit order had a Signal name "Level1".
Unfortunately, after an ExitSignal name "Level1" the reenter algorithm opens a new position on each bar. How to avoid that? 
Thanks in advance 
CODE:
Please log in to see this code.
     
    
        
    
    
        
    
    
        Size:  
    
        Color:  
    
    
 
    
        
     
    
        
    
 
    
    
    
        Calarnic, or may we call you Trefl, or even Galadriel? It comes out that Calarnic's 30-day free trial has been taken in November, are you still using it? ;)
    
    
        
    
    
        
    
    
        Size:  
    
        Color:  
    
    
 
    
        
     
    
        
    
 
    
    
    
        What do you mean Eugene?
    
    
        
    
    
        
    
    
        Size:  
    
        Color:  
    
    
 
    
        
     
    
        
    
 
    
    
    
        Guys, I've found the solution.
The problem was in "text" variable. After each Buy condition I must reset it.
Here it is
CODE:
Please log in to see this code.
Best regards. Hope this would be helpful for newbie
    
 
    
        
    
    
        
    
    
        Size:  
    
        Color: