if SwingHigh(1,high,2,3)<>-1 then value1=SwingHigh(1,high,2,3);if SwingLow(1,low,2,3)<>-1 then value2=SwingLow(1,low,2,3);
if h cross over value1 then buy next bar market;if l cross under value2 then sellshort next bar market;