M:=8; n:=23; DTM:=IF(O<=REF(O,1),0,MAX((H-O),(O-REF(O,1)))); DBM:=IF(O>=REF(O,1),0,MAX((O-L),abs(O-REF(O,1)))); STM:=SUM(DTM,N); SBM:=SUM(DBM,N); ADTM:=IF(STM>SBM,(STM-SBM)/STM,IF(STM=SBM,0,(STM-SBM)/SBM)); ma1:MA(ADTM,M); ma2:ma(ma1,m); macd:=2*(ma1-ma2); STICKLINE(MACD>0,0,MACD,4,1),COLORyellow; STICKLINE(MACD<0,0,MACD,4,1),COLORgreen; 0,colorwhite; |
