通达信风险预警源码
VAR1:=EMA((CLOSE-LLV(LOW,10))/(HHV(HIGH,25)-LLV(LOW,10))*4,4);
高: DMI.PDI (14,6) 33 AND DMI.MDI (14,6) 10 AND DMI.ADX (14,6) 40 AND DMI.ADXR (14,6) 45, STICK;
危险: HHV(VAR1,4) 3.2 OR VAR1 2.5 AND 高, STICK;
可买: IF(高=1 AND HIGH-CLOSE CLOSE-LOW AND VOL HHV(VOL,13)*0.4 AND (CLOSE-REF(CLOSE,1))/REF(CLOSE,1) -0.03,-50,0), STICK;
调整: IF(高=0 AND HHV(高,5) 0,-50,0), STICK;
可卖: IF(危险=1 AND HIGH-CLOSE CLOSE-LOW AND VOL HHV(VOL,20)/2 AND CLOSE OPEN*1.01,-75,0), STICK;
卖出: IF(危险=0 AND HHV(危险,3) 0,-100,0), STICK;
排队: IF(可卖=-75,-75,IF(卖出 0,-100,IF(危险 0,100,IF(调整 0,-50,高)))), COLORSTICK;
排队;