以下是通达信黄金波动主图选股公式源码
N:=120;
K:=BARSLAST(CURRBARSCOUNT=N);
GD:=CONST(IF(ISLASTBAR=1,HHV(H,K),0));{高点}
DD:=CONST(IF(ISLASTBAR=1,LLV(L,K),0));{低点}
KJ:=GD-DD;{高低点差值=分区高度}
低:=IF(CURRBARSCOUNT<=N/2,DD,DRAWNULL);
支撑:=IF(CURRBARSCOUNT<=N/2,DD+KJ*0.191,DRAWNULL);
大胆买入:C<支撑;
+++++++++++++
N:=120;
K:=BARSLAST(CURRBARSCOUNT=N);
GD:=CONST(IF(ISLASTBAR=1,HHV(H,K),0));{高点}
DD:=CONST(IF(ISLASTBAR=1,LLV(L,K),0));{低点}
KJ:=GD-DD;{高低点差值=分区高度}
支撑:=IF(CURRBARSCOUNT<=N/2,DD+KJ*0.191,DRAWNULL);
强势:=IF(CURRBARSCOUNT<=N/2,DD+KJ*0.382,DRAWNULL);
逢低买入:C>=支撑 AND C<强势;
+++++++++++
N:=120;
K:=BARSLAST(CURRBARSCOUNT=N);
GD:=CONST(IF(ISLASTBAR=1,HHV(H,K),0));{高点}
DD:=CONST(IF(ISLASTBAR=1,LLV(L,K),0));{低点}
KJ:=GD-DD;{高低点差值=分区高度}
强势:=IF(CURRBARSCOUNT<=N/2,DD+KJ*0.382,DRAWNULL);
突破:=IF(CURRBARSCOUNT<=N/2,DD+KJ/2,DRAWNULL);
强势畜锐:C>=强势 AND C<突破;
+++++++++++
N:=120;
K:=BARSLAST(CURRBARSCOUNT=N);
GD:=CONST(IF(ISLASTBAR=1,HHV(H,K),0));{高点}
DD:=CONST(IF(ISLASTBAR=1,LLV(L,K),0));{低点}
KJ:=GD-DD;{高低点差值=分区高度}
突破:=IF(CURRBARSCOUNT<=N/2,DD+KJ/2,DRAWNULL);
警示:=IF(CURRBARSCOUNT<=N/2,DD+KJ*0.618,DRAWNULL);
主力拉升:C>=突破 AND C<警示;
++++++++++++
N:=120;
K:=BARSLAST(CURRBARSCOUNT=N);
GD:=CONST(IF(ISLASTBAR=1,HHV(H,K),0));
DD:=CONST(IF(ISLASTBAR=1,LLV(L,K),0));
KJ:=GD-DD;
DRAWTEXT(CURRBARSCOUNT=N/4+5,GD-KJ*0.3,’【警示区】–逢高减仓’);
+++++++++++++
N:=120;
K:=BARSLAST(CURRBARSCOUNT=N);
GD:=CONST(IF(ISLASTBAR=1,HHV(H,K),0));
DD:=CONST(IF(ISLASTBAR=1,LLV(L,K),0));
KJ:=GD-DD;
DRAWTEXT(CURRBARSCOUNT=N/4+5,GD-KJ*0.09,’【风险区】–高抛避险’);
评论(0)