编写要求:
求老师将指标中的买入红柱做个选股指标公式或者根据买入红柱,卖出绿柱做个预警公式。在此先谢谢各位高手老师啦 源码:N1:=5;N2:=10;N3:=600; LC:=REF(CLOSE,1); A0:=(2*C+H+L)/4; A1:=(CLOSE-LLV(LOW,7))/(HHV(HIGH,7)-LLV(LOW,7))*10; VAR1:=C-REF(C,1); VAR2:=100*EMA(EMA(VAR1,6),6)/EMA(EMA(ABS(VAR1),6),6); MA5:=EMA(C,5); MA13:=EMA(C,13); UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS (MA13,MA5))+1),H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS (MA5,MA13))+1),0),COLOR0000FF; DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS (MA5,MA13))+1),L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS (MA13,MA5))+1),0),COLOR00FF00; BT:=(LLV(VAR2,2)=LLV(VAR2,7) AND COUNT(VAR2<0,2) AND CROSS(VAR2,MA(VAR2,2))) AND REF(DOWN,1)REF(DOWN,1); N:=10; DIFF:(EMA(DCLOSE,10)-EMA(DCLOSE,21))*N3,COLORCYAN,LINETHICK2; DEA:EMA(DIFF,8),COLOR1474FF,LINETHICK3; TJ1:EMA(DEA,3),COLORWHITE,LINETHICK3; TJ2:EMA(DEA,10),COLORMAGENTA; F:=CROSS(DIFF,DEA); G:=CROSS(DEA,DIFF); DRAWICON(F,DEA-2.6,13); DRAWICON(G,DEA+1.1,6); DIFFA := EMA(OSC,12) - EMA(OSC,25); DEAA := EMA(DIFFA,8); MACD := 2*(DIFFA-DEAA); D1:=EMA(DIFF,3)-EMA(DIFF,8); D2:=EMA(O,3)-EMA(O,8); D3:=EMA(H,3)-EMA(H,8); D4:=EMA(L,3)-EMA(L,8); STICKLINE(DIFF>=DEA,DIFF,DEA,1,0),COLOR0055AA; STICKLINE(DIFF<=DEA,DIFF,DEA,0.8,0),COLOR006600; STICKLINE(DIFF>=DEA,DIFF,DEA,0.6,0),COLOR0077CC; STICKLINE(DIFF>=DEA,DIFF,DEA,0.3,0),COLOR0099DD; STICKLINE(DIFF>=DEA,D3,D4,0.1,0),COLOR00BBFF; STICKLINE(DIFF<=DEA,DIFF,DEA,0.8,0),COLOR009900; STICKLINE(DIFF<=DEA,DIFF,DEA,0.5,0),COLOR00BB00; STICKLINE(DIFF<=DEA,DIFF,DEA,0.2,0),COLOR00EE00; Z_F:=IF(C>REF(H,1),EMA(L,5),IF(C0,0,MACD*4,0,0),COLORYELLOW; STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD*4,0,0),COLORMAGENTA; STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD*4,0,0),COLORRED; AA2:=REF(L,8)=LLV(L,2*8+1); BB2:=BACKSET(AA2,8+1); CC2:=FILTER(BB2,8) AND L=LLV(L,8+1); STICKLINE(CC2,D1,D2,2.6,0),COLORMAGENTA; STICKLINE(CC2,D3,D4,0,0),COLORMAGENTA; AA3:=REF(H,8)=HHV(H,2*8+1),LINETHICK0; BB3:=BACKSET(AA3,8+1),LINETHICK0; CC3:=(FILTER(BB3,8) AND H=HHV(H,8+1)); STICKLINE(CC3,D1,D2,2.6,0),COLORGREEN; STICKLINE(CC3,D3,D4,0,0),COLORGREEN; DRAWTEXT(CC3,D2*1.03,'⊙←卖 '),COLOR00FF00; DRAWTEXT(CC2,D4-D4*0.02,'⊙←买 '),COLORMAGENTA; 0,COLORGRAY,LINETHICK1; BB:=EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3),COLORRED; 底部:STICKLINE(CROSS(BB,9),0,500,1.7,0),COLORRED; DRAWTEXT(底部,510,' 底部关注!'), , COLORYELLOW; DIFF2:=(EMA(CLOSE,2) - EMA(OPEN,5)); 下:=EMA((MA(LOW,3) * 0.96),30); 操盘手:=DIFF2; 短线5%:(0.4 * ((CROSS(操盘手,MACD) AND (MACD <= (0 - 0.11))) AND (LOW <= 下))),LINETHICK2,COLORFFFFFF; DRAWTEXT(((CROSS(操盘手,MACD) AND (LOW <= 下)) AND (MACD <= (0 - 0.11))),0.6,'短线5%'),COLORB7D16F;
解答:
?选股源码:
?
Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号
免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!