通达信干净测幅主图指标公式

 

KG1:=20;
F1:=10;
A1:=10;
A2:=10;
A3:=zig(1,A1);
A4:=PEAK(1,A1,1);
A5:=TROUGH(1,A1,1);
CC:=IF((A3 < (REF(A3,1))),A4,A5),NODRAW,LINETHICK2;
点:CC>REF(CC,1) OR CC<REF(CC,1);
正距:=BArslAST(点),NODRAW,LINETHICK2;
倒距:=IF(BARSNEXT(点=1)=DRAWNULL,CURRBARSCOUNT,BARSNEXT(点=1)),NODRAW;
A6:=crOSS((A4 - 0.02),A3);
A7:=CROSS(A3,(A5 + 0.02));
A8:=A2 / 100;
A9:=IF((A3 < (REF(A3,1))),A8,REVERSE(A8));
A10:=IF((A3 < (REF(A3,1))),A6,A7);
H1:=REF((CC * (1 - (A9 * 1))),BARSLAST(A10)),DOTLINE,LINETHICK0;
H2:=REF((CC * (1 - (A9 * 2))),BARSLAST(A10)),DOTLINE,LINETHICK0;
H3:=REF((CC * (1 - (A9 * 3))),BARSLAST(A10)),DOTLINE,LINETHICK0;
H4:=REF((CC * (1 - (A9 * 4))),BARSLAST(A10)),DOTLINE,LINETHICK0;
H5:=REF((CC * (1 - (A9 * 5))),BARSLAST(A10)),DOTLINE,LINETHICK0;
H6:=REF((CC * (1 - (A9 * 6))),BARSLAST(A10)),DOTLINE,LINETHICK0;
H7:=REF((CC * (1 - (A9 * 7))),BARSLAST(A10)),DOTLINE,LINETHICK0;
H8:=REF((CC * (1 - (A9 * 8))),BARSLAST(A10)),DOTLINE,LINETHICK0;
H9:=REF((CC * (1 - (A9 * 9))),BARSLAST(A10)),DOTLINE,LINETHICK0;
H10:=REF((CC * (1 - (A9 * 10))),BARSLAST(A10)),DOTLINE,LINETHICK0;
H11:=REF((CC * (1 - (A9 * 11))),BARSLAST(A10)),DOTLINE,LINETHICK0;
H12:=REF((CC * (1 - (A9 * 12))),BARSLAST(A10)),DOTLINE,LINETHICK0;
H13:=REF((CC * (1 - (A9 * 13))),BARSLAST(A10)),DOTLINE,LINETHICK0;
{==========================}
SW2:=HHV(CROSS(H,H2) OR CROSS(H2,L),正距)AND 点=0,COLORWHITE;
SW3:=HHV(CROSS(H,H3) OR CROSS(H3,L),正距)AND 点=0,COLORWHITE;
SW4:=HHV(CROSS(H,H4) OR CROSS(H4,L),正距)AND 点=0,COLORWHITE;
SW5:=HHV(CROSS(H,H5) OR CROSS(H5,L),正距)AND 点=0,COLORWHITE;
SW6:=HHV(CROSS(H,H6) OR CROSS(H6,L),正距)AND 点=0,COLORWHITE;
SW7:=HHV(CROSS(H,H7) OR CROSS(H7,L),正距)AND 点=0,COLORWHITE;
SW8:=HHV(CROSS(H,H8) OR CROSS(H8,L),正距)AND 点=0,COLORWHITE;
SW9:=HHV(CROSS(H,H9) OR CROSS(H9,L),正距)AND 点=0,COLORWHITE;
SW10:=HHV(CROSS(H,H10) OR CROSS(H10,L),正距)AND 点=0,COLORWHITE;
SW11:=HHV(CROSS(H,H11) OR CROSS(H11,L),正距)AND 点=0,COLORWHITE;
SW12:=HHV(CROSS(H,H12) OR CROSS(H12,L),正距)AND 点=0,COLORWHITE;
SW13:=HHV(CROSS(H,H13) OR CROSS(H13,L),正距)AND 点=0,COLORWHITE;
AF2:REFX(HHV(SW2,正距)=1,倒距-1);
AF3:REFX(HHV(SW3,正距)=1,倒距-1);
AF4:REFX(HHV(SW4,正距)=1,倒距-1);
AF5:REFX(HHV(SW5,正距)=1,倒距-1);
AF6:REFX(HHV(SW6,正距)=1,倒距-1);
AF7:REFX(HHV(SW7,正距)=1,倒距-1);
AF8:REFX(HHV(SW8,正距)=1,倒距-1);
AF9:REFX(HHV(SW9,正距)=1,倒距-1);
Af10:REFX(HHV(SW10,正距)=1,倒距-1);
AF11:REFX(HHV(SW11,正距)=1,倒距-1);
AF12:REFX(HHV(SW12,正距)=1,倒距-1);
AF13:REFX(HHV(SW13,正距)=1,倒距-1);
A11:=BARSLAST((ISLASTBAR = 1)) + 1;
A12:=HHV(HIGH,100);
A13:=LLV(LOW,100);
A14:=IF((PERIOD = 12),1.00005,(IF((PERIOD < 3),1.0005,1.002)));
STICKLINE(((CC >= A13) AND (CC <= A12)),CC,(CC * A14),10,-1000),COLORRED;
STICKLINE(((CC >= A13) AND (CC <= A12)),H1,H1,5,0),COLORGRAY;
STICKLINE(((H1 > A13) AND (H1 < A12)) AND AF2=1,H2,H2,5,0),COLORGRAY;
STICKLINE(((H2 > A13) AND (H2 < A12)) AND AF3=1,H3,H3,5,0),COLORGRAY;
STICKLINE(((H3 > A13) AND (H3 < A12)) AND AF4=1,H4,H4,5,0),COLORGRAY;
STICKLINE(((H4 > A13) AND (H4 < A12)) AND AF5=1,H5,H5,5,0),COLORGRAY;
STICKLINE(((H5 > A13) AND (H5 < A12)) AND AF6=1,H6,H6,5,0),COLORGRAY;
STICKLINE(((H6 > A13) AND (H6 < A12)) AND AF7=1,H7,H7,5,0),COLORGRAY;
STICKLINE(((H7 > A13) AND (H7 < A12)) AND AF8=1,H8,H8,5,0),COLORGRAY;
STICKLINE(((H8 > A13) AND (H8 < A12)) AND AF9=1,H9,H9,5,0),COLORGRAY;
STICKLINE(((H9 > A13) AND (H9 < A12)) AND AF10=1,H10,H10,5,0),COLORGRAY;
STICKLINE(((H10 > A13) AND (H10 < A12)) AND AF11=1,H11,H11,5,0),COLORGRAY;
STICKLINE(((H11 > A13) AND (H11 < A12)) AND AF12=1,H12,H12,5,0),COLORGRAY;
STICKLINE(((H12 > A13) AND (H12 < A12)) AND AF13=1,H13,H13,5,0),COLORGRAY;
DRAWTEXT(BARSLAST(A10)=1 ,H1,'10' ),COLORC0C0C0;
DRAWTEXT(BARSLAST(A10)=1 AND AF2=1 ,H2,'20'),COLORC0C0C0;
DRAWTEXT(BARSLAST(A10)=1 AND AF3=1 ,H3,'30'),COLORC0C0C0;
DRAWTEXT(BARSLAST(A10)=1 AND AF4=1 ,H4,'40'),COLORC0C0C0;
DRAWTEXT(BARSLAST(A10)=1 AND AF5=1 ,H5,'50'),COLORC0C0C0;
DRAWTEXT(BARSLAST(A10)=1 AND AF6=1 ,H6,'60'),COLORC0C0C0;
DRAWTEXT(BARSLAST(A10)=1 AND AF7=1 ,H7,'70'),COLORC0C0C0;
DRAWTEXT(BARSLAST(A10)=1 AND AF8=1 ,H8,'80'),COLORC0C0C0;
DRAWTEXT(BARSLAST(A10)=1 AND AF9=1 ,H9,'90'),COLORC0C0C0;
DRAWTEXT(BARSLAST(A10)=1 AND AF10=1 ,H10,'100'),COLORC0C0C0;
DRAWTEXT(BARSLAST(A10)=1 AND AF11=1 ,H11,'110'),COLORC0C0C0;
DRAWTEXT(BARSLAST(A10)=1 AND AF12=1 ,H12,'120'),COLORC0C0C0;




来函数检测结果如下
该公式包含未来函数:PEAK
该公式包含未来函数:TROUGH
该公式包含未来函数:BARSNEXT
该公式包含未来函数:REFX

解密、定制、编写公式指标请联系QQ或微信同号:88652583
置顶指标

相关指标公式

KG1赋值:20
F1赋值:10
A1赋值:10
A2赋值:10
A3赋值:最高价A1%的之字转向
A4赋值:最高价A1%之字转向的前1个波峰值
A5赋值:最高价A1%之字转向的前1个波谷值
CC赋值:如果(A3<(1日前的A3)),返回A4,否则返回A5,NODRAW,线宽为2
输出点:CC>1日前的CC OR CC<1日前的CC
正距赋值:上次点距今天数,NODRAW,线宽为2
倒距赋值:如果下次点=1距今天数=无效数,返回到最后交易的周期,否则返回下次点=1距今天数,NODRAW
A6赋值:(A4-0.02)上穿A3
A7赋值:A3上穿(A5+0.02)
A8赋值:A2 / 100
A9赋值:如果(A3<(1日前的A3)),返回A8,否则返回A8的相反数
A10赋值:如果(A3<(1日前的A3)),返回A6,否则返回A7
H1赋值:上次A10距今天数日前的(CC*(1-(A9*1))),DOTLINE,线宽为0
H2赋值:上次A10距今天数日前的(CC*(1-(A9*2))),DOTLINE,线宽为0
H3赋值:上次A10距今天数日前的(CC*(1-(A9*3))),DOTLINE,线宽为0
H4赋值:上次A10距今天数日前的(CC*(1-(A9*4))),DOTLINE,线宽为0
H5赋值:上次A10距今天数日前的(CC*(1-(A9*5))),DOTLINE,线宽为0
H6赋值:上次A10距今天数日前的(CC*(1-(A9*6))),DOTLINE,线宽为0
H7赋值:上次A10距今天数日前的(CC*(1-(A9*7))),DOTLINE,线宽为0
H8赋值:上次A10距今天数日前的(CC*(1-(A9*8))),DOTLINE,线宽为0
H9赋值:上次A10距今天数日前的(CC*(1-(A9*9))),DOTLINE,线宽为0
H10赋值:上次A10距今天数日前的(CC*(1-(A9*10))),DOTLINE,线宽为0
H11赋值:上次A10距今天数日前的(CC*(1-(A9*11))),DOTLINE,线宽为0
H12赋值:上次A10距今天数日前的(CC*(1-(A9*12))),DOTLINE,线宽为0
H13赋值:上次A10距今天数日前的(CC*(1-(A9*13))),DOTLINE,线宽为0
SW2赋值:正距日内最高价上穿H2ORCROSS(H2,最低价)的最高值AND 点=0,画白色
SW3赋值:正距日内最高价上穿H3ORCROSS(H3,最低价)的最高值AND 点=0,画白色
SW4赋值:正距日内最高价上穿H4ORCROSS(H4,最低价)的最高值AND 点=0,画白色
SW5赋值:正距日内最高价上穿H5ORCROSS(H5,最低价)的最高值AND 点=0,画白色
SW6赋值:正距日内最高价上穿H6ORCROSS(H6,最低价)的最高值AND 点=0,画白色
SW7赋值:正距日内最高价上穿H7ORCROSS(H7,最低价)的最高值AND 点=0,画白色
SW8赋值:正距日内最高价上穿H8ORCROSS(H8,最低价)的最高值AND 点=0,画白色
SW9赋值:正距日内最高价上穿H9ORCROSS(H9,最低价)的最高值AND 点=0,画白色
SW10赋值:正距日内最高价上穿H10ORCROSS(H10,最低价)的最高值AND 点=0,画白色
SW11赋值:正距日内最高价上穿H11ORCROSS(H11,最低价)的最高值AND 点=0,画白色
SW12赋值:正距日内最高价上穿H12ORCROSS(H12,最低价)的最高值AND 点=0,画白色
SW13赋值:正距日内最高价上穿H13ORCROSS(H13,最低价)的最高值AND 点=0,画白色
输出AF2:倒距-1日后的正距日内SW2的最高值=1
输出AF3:倒距-1日后的正距日内SW3的最高值=1
输出AF4:倒距-1日后的正距日内SW4的最高值=1
输出AF5:倒距-1日后的正距日内SW5的最高值=1
输出AF6:倒距-1日后的正距日内SW6的最高值=1
输出AF7:倒距-1日后的正距日内SW7的最高值=1
输出AF8:倒距-1日后的正距日内SW8的最高值=1
输出AF9:倒距-1日后的正距日内SW9的最高值=1
输出AF10:倒距-1日后的正距日内SW10的最高值=1
输出AF11:倒距-1日后的正距日内SW11的最高值=1
输出AF12:倒距-1日后的正距日内SW12的最高值=1
输出AF13:倒距-1日后的正距日内SW13的最高值=1
A11赋值:上次(是否最后一个周期=1)距今天数 + 1
A12赋值:100日内最高价的最高值
A13赋值:100日内最低价的最低值
A14赋值:如果(周期类型=12),返回1.00005,否则返回(如果(周期类型<3),返回1.0005,否则返回1.002)
当满足条件((CC>=A13)AND(CC<=A12))时,在CC和(CC*A14)位置之间画柱状线,宽度为10,-1000不为0则画空心柱.,画红色
当满足条件((CC>=A13)AND(CC<=A12))时,在H1和H1位置之间画柱状线,宽度为5,0不为0则画空心柱.,画深灰色
当满足条件((H1>A13)AND(H1当满足条件((H2>A13)AND(H2当满足条件((H3>A13)AND(H3当满足条件((H4>A13)AND(H4当满足条件((H5>A13)AND(H5当满足条件((H6>A13)AND(H6当满足条件((H7>A13)AND(H7当满足条件((H8>A13)AND(H8当满足条件((H9>A13)AND(H9当满足条件((H10>A13)AND(H10当满足条件((H11>A13)AND(H11当满足条件((H12>A13)AND(H12当满足条件上次A10距今天数=1时,在H1位置书写文字,COLORC0C0C0
当满足条件上次A10距今天数=1ANDAF2=1时,在H2位置书写文字,COLORC0C0C0
当满足条件上次A10距今天数=1ANDAF3=1时,在H3位置书写文字,COLORC0C0C0
当满足条件上次A10距今天数=1ANDAF4=1时,在H4位置书写文字,COLORC0C0C0
当满足条件上次A10距今天数=1ANDAF5=1时,在H5位置书写文字,COLORC0C0C0
当满足条件上次A10距今天数=1ANDAF6=1时,在H6位置书写文字,COLORC0C0C0
当满足条件上次A10距今天数=1ANDAF7=1时,在H7位置书写文字,COLORC0C0C0
当满足条件上次A10距今天数=1ANDAF8=1时,在H8位置书写文字,COLORC0C0C0
当满足条件上次A10距今天数=1ANDAF9=1时,在H9位置书写文字,COLORC0C0C0
当满足条件上次A10距今天数=1ANDAF10=1时,在H10位置书写文字,COLORC0C0C0
当满足条件上次A10距今天数=1ANDAF11=1时,在H11位置书写文字,COLORC0C0C0
当满足条件上次A10距今天数=1ANDAF12=1时,在H12位置书写文字,COLORC0C0C0

指标安装下载帮助  |   联系我们  |  股朋指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股朋指标网别名指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
免责声明:股朋指标网所有指标公式及文章由网络收集,不保障实时性和真实性, 仅供学习研究并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。
QQ:88652583 微信 88652583
sitemap站点地图