MA1:MA(CLOSE,5),LINETHICK2;
AA:=5+BARSLAST(MA1<REF(MA1,1));
BB:=IF(AA=0,5,AA);
A1:MA(C,BB),LINETHICK2;
AA1:=5+BARSLAST(MA1>REF(MA1,1));
BB1:=IF(AA1=0,5,AA1);
A11:=MA(C,BB1);
MA1:MA(CLOSE,5),LINETHICK2;
AA:=5+BARSLAST(MA1<REF(MA1,1));
BB:=IF(AA=0,5,AA);
A1:MA(C,BB),LINETHICK2;
AA1:=5+BARSLAST(MA1>REF(MA1,1));
BB1:=IF(AA1=0,5,AA1);
A11:=MA(C,BB1);