『壹』 知道通達信指標源碼,怎樣編出這個的選股公式如能把主圖公式指標也給改一下讓它顯示的更直觀更好。
選股公式:
JJ1:=MA(C,30);
JJ2:=MA(C,60);
入1:=IF(JJ1>REF(JJ1,1),JJ1,DRAWNULL),COLORRED,LINETHICK2;
入2:=IF(JJ1<REF(JJ1,1),JJ1,DRAWNULL),COLOR00FF00,LINETHICK2;
JJ:=(HIGH+LOW+CLOSE)/3;
QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));
QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*IF(HIGH=LOW,1,(JJ-MIN(CLOSE,OPEN))));
QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));
QJ4:=IF(CAPITAL=0,QJ0*(MAX(CLOSE,OPEN)-JJ),QJ0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-JJ)));
DDX:=((QJ1+QJ2)-(QJ3+QJ4))/IF(CAPITAL=0,10000,10000),COLOR00AAAA,LINETHICK;
V2:=SMA(IF(C>=REF(C,1),DDX,-DDX/100),2,1);
V5:=SMA(V2*120/FROMOPEN*5,2,1);
V10:=SMA(V5,5,1);
V20:=SMA(V10,5,1);
DY:=CURRBARSCOUNT=1 AND C<REF(C,1);
DY2:=REF(V2,1)-DY;
TT:=(V2*1.01-REF(V2,1));
TT2:=(REF(V2*1.01,1)-REF(V2,2));
YY:=TT>3*ABS(TT2);
TT1:=EMA(V2,15);
A:TT>0 AND CROSS(TT,TT1) AND YY;
主圖公式修改如下:
DRAWKLINE(H,O,L,C);
JJ:=(HIGH+LOW+CLOSE)/3;
QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));
QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*IF(HIGH=LOW,1,(JJ-MIN(CLOSE,OPEN))));
QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));
QJ4:=IF(CAPITAL=0,QJ0*(MAX(CLOSE,OPEN)-JJ),QJ0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-JJ)));
DDX:=((QJ1+QJ2)-(QJ3+QJ4))/IF(CAPITAL=0,10000,10000),COLOR00AAAA,LINETHICK;
V2:=SMA(IF(C>=REF(C,1),DDX,-DDX/100),2,1);
V5:=SMA(V2*120/FROMOPEN*5,2,1);
V10:=SMA(V5,5,1);
V20:=SMA(V10,5,1);
DY:=CURRBARSCOUNT=1 AND C<REF(C,1);
DY2:=REF(V2,1)-DY;
TT:=(V2*1.01-REF(V2,1));
TT2:=(REF(V2*1.01,1)-REF(V2,2));
YY:=TT>3*ABS(TT2);
TT1:=EMA(V2,15);
DRAWTEXT(TT>0 AND CROSS(TT,TT1) AND YY,LOW,'━買入'),COLORYELLOW;
A111:=COST(85);
A222:=COST(15);
A333:=A111-A222;
A444:=(A111+A222)/2;
單峰密集:=A333/A444*100<30,LINETHICK0;
BU1:=HHV(HIGH,250);
BU2:=LLV(LOW,250);
BU3:=BU1-BU2;
BU4:=(A444-BU2);
低位:=A444<(BU3*04+BU2),LINETHICK0;
低位單峰密集:=單峰密集 AND 低位;
BU5:=C/REF(C,1)>1.04; {AND V/REF(V,1)>2;{ AND H=C;}
主力持倉%:=EMA(100*(CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30)),3);
主力持倉:=主力持倉%>=75 {AND 主力持倉%<=91} AND C>0 AND CLOSE>OPEN;
強突:=主力持倉 AND 低位單峰密集 AND BU4 AND WINNER(C)>=0.90 AND BU5;
集買:=低位單峰密集 AND TT>0 AND CROSS(TT,TT1) AND YY AND WINNER(C)>=0.90;
DRAWICON(集買,HIGH,6);
『貳』 閫氳揪淇℃寚鏍囧叕寮忔簮鐮
閫氳揪淇℃寚鏍囧叕寮忔簮鐮侊細
A:=(3*C+H+L+O)/6;
XJ:=(A+0.618*REF(A,1)+0.382*REF(A,2)+0.236*REF(A,3)+0.146*REF(A,4))/2.382;
YCZXH:=(MA(HHV(A,2),5)+MA(HHV(A,2),13)+MA(HHV(A,2),21)+MA(HHV(A,2),32))/4;
YCZXL:=(MA(LLV(A,2),5)+MA(LLV(A,2),13)+MA(LLV(A,2),21)+MA(LLV(A,2),32))/4;
SMH:EMA(YCZXH,21),COLOR004000;
SML:EMA(YCZXL,21),COLOR004000;
SMJ:(SML+SMH)/2,COLOR004000;
PJ:=(10*A+9*REF(A,1)+8*REF(A,2)+7*REF(A,3)+6*REF(A,4)+5*REF(A,5)+4*REF(A,6)+3*REF(A,7)+2*REF(A,8)+REF(A,9))/55;
A1:=EMA(PJ,3),COLOR004000;
A2:=EMA(PJ,5),COLOR004000;
A3:=EMA(PJ,7),COLOR004000;
A4:=EMA(PJ,9),COLOR004000;
A5:=EMA(PJ,11),COLOR004000;LX:=REF(XJ,1);
ZD:=(SMA(MAX(XJ-LX,0),5,1)/SMA(ABS(XJ-LX),5,1))*100;
KX1:=(CLOSE>=OPEN)ANDZD>=50;
KX2:=(CLOSE
KX3:=(CLOSE>=OPEN)ANDZD<50;
KX4:=(CLOSE IF(A5 IF(A5>REF(A5,1),A5,DRAWNULL),COLOR00005B,LINETHICK2; IF(A4 IF(A4>REF(A4,1),A4,DRAWNULL),COLOR000055,LINETHICK1; IF(A3 IF(A3>REF(A3,1),A3,DRAWNULL),COLOR00006C,LINETHICK1;