Below is snapshot what I have created :
Timerange = TimeNum() > 091500 AND TimeNum() < 094500 ;
Timerange1 = TimeNum() > 133000 AND TimeNum() < 143000 ;
Timeout = TimeNum() > 151500;
Range = LLV(L,5) ;
Range2 = HHV(H,5) ;
X = one of the resistance level
Y = one of the support level
Trend = Timerange AND Ref(Range,-1) > X ;
Trend2 = (Timerange AND Ref(Range,-1) > X) and (Timerange1 and Ref(Range2,-1) < Y) ;
Buy = Trend ;
Sell = Timeout OR Trend2;
Short = Trend2 ;
Cover = Timeout ;
Buy = ExRem(Buy,Sell) ;
Short = ExRem(short,Cover) ;
Sell = ExRem(Sell,Buy) ;
Cover = ExRem(Cover,Short) ;
The issue is that Trend 2 is only reading "Timerange" array and is not reading "Timerange1" array.
Timerange = TimeNum() > 091500 AND TimeNum() < 094500 ;
Timerange1 = TimeNum() > 133000 AND TimeNum() < 143000 ;
Timeout = TimeNum() > 151500;
Range = LLV(L,5) ;
Range2 = HHV(H,5) ;
X = one of the resistance level
Y = one of the support level
Trend = Timerange AND Ref(Range,-1) > X ;
Trend2 = (Timerange AND Ref(Range,-1) > X) and (Timerange1 and Ref(Range2,-1) < Y) ;
Buy = Trend ;
Sell = Timeout OR Trend2;
Short = Trend2 ;
Cover = Timeout ;
Buy = ExRem(Buy,Sell) ;
Short = ExRem(short,Cover) ;
Sell = ExRem(Sell,Buy) ;
Cover = ExRem(Cover,Short) ;
The issue is that Trend 2 is only reading "Timerange" array and is not reading "Timerange1" array.