以下是通达信钻石坑选股源码附图
VAR36:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;
VAR38:=SMA(VAR36,3,1);
散户:=SMA(VAR38,3,1) ;
新庄:=SMA(散户,3,1);
GHYX:=FILTER(CROSS(散户,新庄) AND 散户<20,25)=1;
{------------------------------------------------}
操盘底线:=0.812*MA(FORCAST(CLOSE,2),34)*1.05;
触及底线:=(LOW<操盘底线 OR LOW=操盘底线);
建仓区间:=(CLOSE<操盘底线 OR CLOSE=操盘底线);
最佳买点:=CROSS(CLOSE,操盘底线);
千年:=触及底线&&GHYX OR 建仓区间&&GHYX OR 最佳买点&&GHYX;
钻石坑:千年;