以下是通达信黄金波动主图选股公式源码

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,’【风险区】–高抛避险’);

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。