以下是通达信qsx线公式源码和截图
通达信qsx趋势线公式源码:
B:=EMA(100+WINNER(C)*100-HHV(WINNER(C)*100,20),3);
趋势线:B;
50;
DRAWTEXT_FIX(ISLASTBAR,0,0,0,HYBLOCK),COLORGREEN;
实体:=(C-O)/REF(C,1)*100,COLORGREEN,NODRAW;
涨幅:=(C/REF(C,1)-1)*100,COLORRED,NODRAW;
SRQ:=CURRBARSCOUNT;
GZ1:=CONST(TROUGH(2,P/100,G1));
GZ2:=CONST(TROUGH(2,P/100,G2));
GCZ:=GZ1-GZ2;
GN1:=CONST(TROUGHBARS(2,P/100,G1));
GN2:=CONST(TROUGHBARS(2,P/100,G2));
GNC:=CONST(GN2-GN1);
Q1:=GN2-SRQ+1;
DWDS:=GCZ/GNC;
QSX:=DWDS*Q1+GZ2;
上升趋势线:IF(Q1 0,QSX,GZ2),COLORGREEN;
FZ1:=CONST(PEAK(1,P/100,F1));
FZ2:=CONST(PEAK(1,P/100,F2));
FCZ:=FZ2-FZ1;
FN1:=CONST(PEAKBARS(1,P/100,F1));
FN2:=CONST(PEAKBARS(1,P/100,F2));
FNC:=CONST(FN1-FN2);
F1:=FN2-SRQ+1;
FGWDS:=FCZ/FNC;
QSX1:=FGWDS*F1+FZ2;
下降趋势线:IF(F1 0,QSX1,FZ2),COLORMAGENTA;
STICKLINE(CROSS(上升趋势线,C),O,C,2,0),COLORGREEN;
STICKLINE(CROSS(C,下降趋势线),O,C,2,0),COLORRED;
DRAWICON(CROSS(上升趋势线,C),H*1.02,2);
DRAWICON(CROSS(C,下降趋势线),L*0.98,1);
VAR1:=C-REF(C,1);
VAR2:=O-REF(O,1);
VAR3:=H-REF(H,1);
VAR4:=L-REF(L,1);
VAR5:=(VAR1+VAR2+VAR3+VAR4)/4;
BUYHAOGU:MA(VAR5*VOL,14),LINETHICK0;
STICKLINE(BUYHAOGU 0,BUYHAOGU,0,6,0),COLORRED;
STICKLINE(BUYHAOGU 0,BUYHAOGU,0,6,0),COLORGREEN;
通达信qsx趋势线公式截图