{指标介绍:指标在参数调整窗设置有【显示开关】,作用是通过调整参数,选择显示不同的显示数据。
“1”是回调、反弹的预测,“2”是回调预测,“3”是反弹预测。(参考附图五、六、七)
预测计算:C1、C2、C3 按预测赢家算法;C4按波浪半对数的G=0.875(甘氏角)算法; C5、C6按费氏黄金分割1.236、1.618算法。} 波段微调:=2;
显示开关:=1;
DRAWTEXT_FIX(1,0.30,0.00005,1,'说明: 适当改变【波段微调】参数的数值,可变动波段的位置。'),COLORYELLOW;
QS:=zig(1,波段微调);
低点:=TROUGHBARS(2,波段微调,1);
高点:=PEAKBARS(1,波段微调,1);
L低:=IF(低点=0,L,IF(高点<低点,TROUGH(2,波段微调,1),REF(TROUGH(2,波段微调,1),1)));
H高:=IF(高点=0,H,IF(低点<高点,PEAK(1,波段微调,1),REF(PEAK(1,波段微调,1),1)));
L低A:=IF(高点<低点 AND 显示开关=1 OR 显示开关=2,L低,DRAWNULL);
H高A:=IF(高点<低点 AND 显示开关=1 OR 显示开关=2,H高,DRAWNULL);
DRAWTEXT(低点=0,L,VARCAT('【低点】',VAR2STR(L,2))),COLORGREEN;
DRAWTEXT(高点=0,H,VARCAT('【高点】',VAR2STR(H,2))),COLORRED;
DRAWLINE(低点=0,L,高点=0,H,0)COLORRED,LINETHICK2;
DRAWLINE(高点=0,H,低点=0,L,0)COLORGREEN,LINETHICK2;
VAR1:=SQRT(H高A/L低A);
VAR2:=SQRT(VAR1);
A:=H高A/SQRT(VAR1);
B:=H高A/VAR1;
D:=H高A/(VAR1+VAR2-1);
E:=POW(L低A,0.875)*POW(H高A,0.125);
I:=H高A-(H高A-L低A)*1.236,NODRAW;
U:=H高A-(H高A-L低A)*1.618,NODRAW;
DRAWTEXT(高点=0,(A),VARCAT('C1=',VAR2STR(A,2))),COLORYELLOW;
DRAWTEXT(高点=0,(B),VARCAT('C2=',VAR2STR(B,2))),COLORYELLOW;
DRAWTEXT(高点=0,(D),VARCAT('C3=',VAR2STR(D,2))),COLORYELLOW;
DRAWTEXT(高点=0,(E),VARCAT('G4=',VAR2STR(E,2))),COLORLIRED;
DRAWTEXT(高点=0,(I),VARCAT('C5=',VAR2STR(I,2))),COLORLIRED;
DRAWTEXT(高点=0,(U),VARCAT('G6=',VAR2STR(U,2))),COLORLIRED;
STICKLINE(高点<低点,A,A,3,1),COLORFF8800;
STICKLINE(高点<低点,B,B,3,1),COLORFF8800;
STICKLINE(高点<低点,D,D,3,1),COLORFF8800;
STICKLINE(高点<低点,E,E,3,1),COLORFF8800;
STICKLINE(高点<低点,I,I,3,1),COLORFF8800;
STICKLINE(高点<低点,U,U,3,1),COLORFF8800;
STICKLINE(高点=0,H,U,0,0),COLORFF8800;
L低1:=IF(低点=0,L,IF(高点<低点,TROUGH(2,波段微调,1),REF(TROUGH(2,波段微调,1),1)));
H高1:=IF(高点=0,H,IF(低点<高点,PEAK(1,波段微调,1),REF(PEAK(1,波段微调,1),1)));
L低B:=IF(高点>低点 AND 显示开关=1 OR 显示开关=3,L低1,DRAWNULL);
H高B:=IF(高点>低点 AND 显示开关=1 OR 显示开关=3,H高1,DRAWNULL);
VAR3:=SQRT(H高B/L低B);
VAR4:=SQRT(VAR3);
F:=L低B*SQRT(VAR3),NODRAW;
G:=L低B*VAR3,NODRAW;
J:=L低B*(VAR3+VAR4-1),NODRAW;
K:=POW(H高B,0.875)*POW(L低B,0.125);
P:=L低B+(H高B-L低B)*1.236,NODRAW;
Q:=L低B+(H高B-L低B)*1.618,NODRAW;
DRAWTEXT(低点=0,(F),VARCAT('C1=',VAR2STR(F,2))),COLORWHITE;
DRAWTEXT(低点=0,(G),VARCAT('C2=',VAR2STR(G,2))),COLORWHITE;
DRAWTEXT(低点=0,(J),VARCAT('C3=',VAR2STR(J,2))),COLORWHITE;
DRAWTEXT(低点=0,(K),VARCAT('C4=',VAR2STR(K,2))),COLORGREEN;
DRAWTEXT(低点=0,(P),VARCAT('C5=',VAR2STR(P,2))),COLORGREEN;
DRAWTEXT(低点=0,(Q),VARCAT('C6=',VAR2STR(Q,2))),COLORGREEN;
STICKLINE(低点<高点,F,F,3,1),COLORMAGENTA;
STICKLINE(低点<高点,G,G,3,1),COLORMAGENTA;
STICKLINE(低点<高点,J,J,3,1),COLORMAGENTA;
STICKLINE(低点<高点,K,K,3,1),COLORMAGENTA;
STICKLINE(低点<高点,P,P,3,1),COLORMAGENTA;
STICKLINE(低点<高点,Q,Q,3,1),COLORMAGENTA;
STICKLINE(低点=0,L,Q,0,0),COLORMAGENTA;
DRAWICON(高点=0,H,39);
DRAWICON(低点=0,L,38);
通达信波段空间计算主图指标公式
本文来自网络,不代表公式指标立场,转载请注明出处:https://www.gszb.top/92870.html