Matriks Indicator Builder formülü
period:=input("Period",1,500,2);
m1:=mov(H,period,s);
m2:=mov(L,period,s);
r1:=HHV(h,period);
s1:=LLV(l,period);
support:=if(s1>prev or (ref(m1,-1)<prev and ref(l,-2)>ref(c,-1)),s1,prev);
resist:=if(r1<prev or (ref(m2,-1)>prev and ref(c,-1)>ref(h,-2)),r1,prev);
halftrend:=if(support>resist and prev=ref(support,-1),support,if(support>resist and prev=ref(resist,-1),resist,if(support>prev,support,if(resist<prev,resist,prev))));
halftrend