九毛八公式指标
这是大智慧主图公式求老师改成通达信板本,然后再帮我做个通达信版预警公式(图中的两个信号:笑脸见底和短进合并成一个预警公式) 谢谢老师! MA5:MA(CLOSE,5); MA10:MA(CLOSE,20); MA20:MA(CLOSE,30); MA30:MA(CLOSE,60); VAR1:=IF(DATE<1500830 and date>900101,1,0); VAR2:=LLV(LOW,10); VAR3:=HHV(HIGH,25); K1:=(28/10)*VAR1*100; K2:=(32/10)*VAR1*100; K3:=(35/10)*VAR1*100; RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100; K:=SMA(RSV,3,1); D:=SMA(K,3,1); J:=3*K-2*D; X:=LLV(J,2)=LLV(J,8); Y:=IF(CROSS(J,REF(J+0.01,1)) AND X AND J<20,30,0); 主力:=EMA( (CLOSE-MA(CLOSE,3))/MA(CLOSE,3)*4800,2); 散户:=EMA( (CLOSE-MA(CLOSE,20))/MA(CLOSE,20)*4800,7); 动能趋势线:=100*EMA((CLOSE-VAR2)/(VAR3-VAR2)*4,4)*VAR1; DRAWTEXT(CROSS(J,REF(J+0.01,1)) AND X AND J<20,LOW,'短进'),COLORFF00FF; DRAWTEXT(CROSS(主力,散户) AND 主力<0 and 散户<0,low,'见 底'),colorred; drawicon(cross(主力,散户) 主力<0 散户<0,low,1); 见底选股:if(cross(主力,散户) 散户<0,1,0),colorred,linethick0; 短进选股:if(cross(j,ref(j+0.01,1)) x j<20,1,0),colorff00ff,linethick0;
编写方法:
{通达信使用}
MA5:MA(CLOSE,5); MA10:MA(CLOSE,20); MA20:MA(CLOSE,30); MA30:MA(CLOSE,60); VAR2:=LLV(LOW,10); VAR3:=HHV(HIGH,25); K1:=(28/10)*100; K2:=(32/10)*100; K3:=(35/10)*100; RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100; K:=SMA(RSV,3,1); D:=SMA(K,3,1); J:=3*K-2*D; X:=LLV(J,2)=LLV(J,8); Y:=IF(crOSS(J,REF(J+0.01,1)) AND X AND J<20,30,0); 主力:=EMA( (CLOSE-MA(CLOSE,3))/MA(CLOSE,3)*4800,2); 散户:=EMA( (CLOSE-MA(CLOSE,20))/MA(CLOSE,20)*4800,7); 动能趋势线:=100*EMA((CLOSE-VAR2)/(VAR3-VAR2)*4,4); DRAWTEXT(CROSS(J,REF(J+0.01,1)) AND X AND J<20,LOW,'短进'),COLORFF00FF; DRAWTEXT(CROSS(主力,散户) AND 主力<0 AND 散户<0,LOW,'见底'),COLORRED; DRAWICON(CROSS(主力,散户) AND 主力<0 AND 散户<0,LOW,5); 见底选股:IF(CROSS(主力,散户) AND 主力<0 AND 散户<0,1,0),COLORRED,NODRAW; 短进选股:IF(CROSS(J,REF(J+0.01,1)) AND X AND J<20,1,0),COLORFF00FF,NODRAW; {预警} RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100; K:=SMA(RSV,3,1); D:=SMA(K,3,1); J:=3*K-2*D; X:=LLV(J,2)=LLV(J,8); Y:=IF(CROSS(J,REF(J+0.01,1)) AND X AND J<20,30,0); 主力:=EMA( (CLOSE-MA(CLOSE,3))/MA(CLOSE,3)*4800,2); 散户:=EMA( (CLOSE-MA(CLOSE,20))/MA(CLOSE,20)*4800,7); 见底:=CROSS(主力,散户) AND 主力<0 AND 散户<0; 短进:=CROSS(J,REF(J+0.01,1)) AND X AND J<20; XG:见底 OR 短进;
0>