// Downloaded From https://www.WiseStockTrader.com
// Pullback System # 1

condition1 = ref(c,-2) < ref(c,-3) and ref(c,-1) < ref(c,-2);
condition2 = h > ref(h,-1);
filter = c > ma(c,50);

buy = condition1 and condition2 and filter;
buyPrice = valuewhen( buy, open,1);
sell = c > buyPrice or l < ref(llv(l,2),-1);

buy = exRem(buy,sell);
sell = exRem(sell,buy);