  | 
		Dave W. 
      2013-11-07 19:31:38
	  	   	
	   
	  
	  
	  	   
	  	  
	  	  
	   	  	  
 | 	  
	  
 | 
    
 
	 
  Hi. In evaluating some trading systems, I'd like to be able to show realistic buy and sell conditions on a chart. For example, please look at the following script I'm currently using on a chart: 
 
// Buy 
Rule1 = Cross(RSI_Threshold, RSI(2)); 
Rule2 = (close) >= (sma(SMA_Length)); 
buy = (Rule1) && (Rule2); 
 
// Sell 
Rule4 = cross( (RSI(2)) , (RSI_Exit_Level) ); 
sell = (Rule4); 
 
// Plot Arrows 
PlotArrow(Buy, "", BelowLow, colorGreen); 
PlotArrow(Sell, "", AboveHigh, colorRed); 
 
The issue is, the code above plots too many buy and sell arrows. I want the ability to only plot a buy arrow when I wouldn't already be in a position, and only a single sell arrow when I am in a position and exiting. Is there a way to achieve that on a chart using a script? 
 
Let me know if you'd like to see a screen shot to get a better sense of what I mean and I can post one somewhere. 
 
Thank you. 
 
 
       
       
 
 
 | 
 |