The problem is being caused by your OR condition. MetaStock does all ANDs, then it calculates the ORs. This is causing MetaStock to evaluate your signal as:
If(
(
Alert(C>Ref(HHV(H,250), -1),30) AND
Alert(CLOSE - Mov(C,50,S) <= ATR(21)*.5,10)
)
OR
(
Alert(Mov(C,50,S) - CLOSE <= ATR(21)*.5,10) AND
Alert(Cross(Stoch(9,3),20),2) AND
CLOSE > Mov(C,200,S) AND
Mov(C,50,S) > Mov(C,200,S) AND
Mov(C,30,S) > Mov(C,50,S)
)
,1,0)
Since this is not the condition you are looking for, you should add parenthesis to force the correct OR calculation. Also, in this case, the IF is not needed. Your formula can be written as:
Alert(C>Ref(HHV(H,250), -1),30) AND
(Alert(CLOSE - Mov(C,50,S) <= ATR(21)*.5,10) OR
Alert(Mov(C,50,S) - CLOSE <= ATR(21)*.5,10)) AND
Alert(Cross(Stoch(9,3),20),2) AND
CLOSE > Mov(C,200,S) AND
Mov(C,50,S) > Mov(C,200,S) AND
Mov(C,30,S) > Mov(C,50,S)
This should give you the result you are wanting