Pine Code TradingView -- 2

Job ID: 31307151

Budget: ₹600 – ₹1,500 INR

RBR = rally[0] and base[1] and base[2] and base[3] and base[4] and base[5] and base[6] and rally[7]

Need Pine Code for above condition to avoid mutiple same repeated condition. In above Base are repeating multipls times. Need single code for to avoid the same.
Related categories: Pine Script