// Downloaded From https://www.WiseStockTrader.com
BullishOutsideBar = Low < Ref(Low,-1) 		
	AND	Close > (Ref(High,-1));			
Plot (BullishOutsideBar, "Bullish Outside Bar", colorAqua);
Buy = BullishOutsideBar;					
Sell = 0;					
period = 20; // number of averaging periods 
m = MA( Close, period ); // simple moving average
Buy = Cross( Close, m ); // buy when close crosses ABOVE moving average
Sell = Cross( m, Close ); // sell when closes crosses BELOW moving average