通达信《自动测幅》(源码主图大智慧通用)

 

《自动测幅》(源码、主图、通达信\大智慧)

 昨天《领带低点涨停》指标发出后,下载的坛友不少,有坛友索取用于测幅的主图,源码送给大家,对您也许有帮助。

通达信自动测幅主图请下载

大智慧自动测幅主图源码
input:KG1(20,1,50),F1(10,1,20);
a1:=IF((DATATYPE <= 3),1,(IF((DATATYPE <= 5),5,(IF((DATATYPE <= 7),10,KG1)))));
a2:=IF((DATATYPE <= 5),1,(IF((DATATYPE = 6),3,(IF((DATATYPE = 7),5,F1)))));
a3:=ZIG(4,a1);
a4:=PEAK(4,a1,1);
a5:=TROUGH(4,a1,1);
CC:IF((a3 < (REF(a3,1))),a4,a5),linethick0;
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;
H14:REF((CC * (1 - (a9 * 14))),BARSLAST(a10)),DOTLINE,linethick0;
H15:REF((CC * (1 - (a9 * 15))),BARSLAST(a10)),DOTLINE,linethick0;
a11:=BARSLAST((DISPSTATUS = 1)) + 1;
a12:=HHVALL((HHV(HIGH,a11)));
a13:=LLVALL((LLV(LOW,a11)));
a14:=IF((DATATYPE = 2),1.00005,(IF((DATATYPE < 6),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)),H2,H2,5,0),colorGray;
STICKLINE(((H2 > a13) AND (H2 < a12)),H3,H3,5,0),colorGray;
STICKLINE(((H3 > a13) AND (H3 < a12)),H4,H4,5,0),colorGray;
STICKLINE(((H4 > a13) AND (H4 < a12)),H5,H5,5,0),colorGray;
STICKLINE(((H5 > a13) AND (H5 < a12)),H6,H6,5,0),colorGray;
STICKLINE(((H6 > a13) AND (H6 < a12)),H7,H7,5,0),colorGray;
STICKLINE(((H7 > a13) AND (H7 < a12)),H8,H8,5,0),colorGray;
STICKLINE(((H8 > a13) AND (H8 < a12)),H9,H9,5,0),colorGray;
STICKLINE(((H9 > a13) AND (H9 < a12)),H10,H10,5,0),colorGray;
STICKLINE(((H10 > a13) AND (H10 < a12)),H11,H11,5,0),colorGray;
STICKLINE(((H11 > a13) AND (H11 < a12)),H12,H12,5,0),colorGray;
STICKLINE(((H12 > a13) AND (H12 < a12)),H13,H13,5,0),colorGray;
STICKLINE(((H13 > a13) AND (H13 < a12)),H14,H14,5,0),colorGray;
STICKLINE(((H14 > a13) AND (H14 < a12)),H15,H15,5,0),colorGray;
DRAWTEXT(((a10 AND (CC >= a13)) AND (CC <= a12)),H1,''+a2 * 1+'%'),ColorC0C0C0;
DRAWTEXT(((a10 AND (H1 > a13)) AND (H1 < a12)),H2,''+a2 * 2+'%'),ColorC0C0C0;
DRAWTEXT(((a10 AND (H2 > a13)) AND (H2 < a12)),H3,''+a2 * 3+'%'),ColorC0C0C0;
DRAWTEXT(((a10 AND (H3 > a13)) AND (H3 < a12)),H4,''+a2 * 4+'%'),ColorC0C0C0;
DRAWTEXT(((a10 AND (H4 > a13)) AND (H4 < a12)),H5,''+a2 * 5+'%'),ColorC0C0C0;
DRAWTEXT(((a10 AND (H5 > a13)) AND (H5 < a12)),H6,''+a2 * 6+'%'),ColorC0C0C0;
DRAWTEXT(((a10 AND (H6 > a13)) AND (H6 < a12)),H7,''+a2 * 7+'%'),ColorC0C0C0;
DRAWTEXT(((a10 AND (H7 > a13)) AND (H7 < a12)),H8,''+a2 * 8+'%'),ColorC0C0C0;
DRAWTEXT(((a10 AND (H8 > a13)) AND (H8 < a12)),H9,''+a2 * 9+'%'),ColorC0C0C0;
DRAWTEXT(((a10 AND (H9 > a13)) AND (H9 < a12)),H10,''+a2 * 10+'%'),ColorC0C0C0;
DRAWTEXT(((a10 AND (H10 > a13)) AND (H10 < a12)),H11,''+a2 * 11+'%'),ColorC0C0C0;
DRAWTEXT(((a10 AND (H11 > a13)) AND (H11 < a12)),H12,''+a2 * 12+'%'),ColorC0C0C0;
DRAWTEXT(((a10 AND (H12 > a13)) AND (H12 < a12)),H13,''+a2 * 13+'%'),ColorC0C0C0;
DRAWTEXT(((a10 AND (H13 > a13)) AND (H13 < a12)),H14,''+a2 * 14+'%'),ColorC0C0C0;
DRAWTEXT(((a10 AND (H14 > a13)) AND (H14 < a12)),H15,''+a2 * 15+'%'),ColorC0C0C0;
a15:=BARSLAST(a6) + 1;
a16:=BARSLAST(a7) + 1;
a17:=IF((a16 > a15),a15,a16);
a18:=IFS((CC = a4),'下行 ','上升 ');
a19:=IFS((DATATYPE = 8),'天 ',IFS((DATATYPE = 9),'周 ',IFS((DATATYPE = 10),'月 ','单位')));
DRAWTEXTREL(-70,40,'目前波段'+a18+a17+a19),ColorCCCCCC;
DRAWTEXT(a6,CC,''+REF(a17,1)+a19),VALIGN2,ALIGN2,ColorFF99FF;
DRAWTEXT(a7,(CC * 0.995),''+REF(a17,1)+a19),ALIGN2,Color00EECC;
 




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

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

相关指标公式

《自动测幅》(源码、主图、通达信\大智慧) 昨天《领带低点涨停》指标发出后,下载的坛友不少,有坛友索取用于测幅的主图,源码送给大家,对您也许有帮助。通达信自动测幅主图请下载大智慧自动测幅主图源码INPUT:KG1(20,1,50),F1(10,1,20)
A1赋值:如果(DATATYPE<=3),返回1,否则返回(如果(DATATYPE<=5),返回5,否则返回(如果(DATATYPE<=7),返回10,否则返回KG1))
A2赋值:如果(DATATYPE<=5),返回1,否则返回(如果(DATATYPE=6),返回3,否则返回(如果(DATATYPE=7),返回5,否则返回F1))
A3赋值:4A1%的之字转向
A4赋值:4A1%之字转向的前1个波峰值
A5赋值:4A1%之字转向的前1个波谷值
输出CC:如果(A3<(1日前的A3)),返回A4,否则返回A5,线宽为0
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
输出H14:上次A10距今天数日前的(CC*(1-(A9*14))),DOTLINE,线宽为0
输出H15:上次A10距今天数日前的(CC*(1-(A9*15))),DOTLINE,线宽为0
A11赋值:上次(DISPSTATUS=1)距今天数 + 1
A12赋值:HHVALL((A11日内最高价的最高值))
A13赋值:LLVALL((A11日内最低价的最低值))
A14赋值:如果(DATATYPE=2),返回1.00005,否则返回(如果(DATATYPE<6),返回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当满足条件((H13>A13)AND(H13当满足条件((H14>A13)AND(H14当满足条件((A10AND(CC>=A13))AND(CC<=A12))时,在H1位置书写文字,COLORC0C0C0
当满足条件((A10AND(H1>A13))AND(H1当满足条件((A10AND(H2>A13))AND(H2当满足条件((A10AND(H3>A13))AND(H3当满足条件((A10AND(H4>A13))AND(H4当满足条件((A10AND(H5>A13))AND(H5当满足条件((A10AND(H6>A13))AND(H6当满足条件((A10AND(H7>A13))AND(H7当满足条件((A10AND(H8>A13))AND(H8当满足条件((A10AND(H9>A13))AND(H9当满足条件((A10AND(H10>A13))AND(H10当满足条件((A10AND(H11>A13))AND(H11当满足条件((A10AND(H12>A13))AND(H12当满足条件((A10AND(H13>A13))AND(H13当满足条件((A10AND(H14>A13))AND(H14A15赋值:上次A6距今天数 + 1
A16赋值:上次A7距今天数 + 1
A17赋值:如果(A16>A15),返回A15,否则返回A16
A18赋值:IFS((CC = A4),'下行 ','上升 ')
A19赋值:IFS((DATATYPE = 8),'天 ',IFS((DATATYPE = 9),'周 ',IFS((DATATYPE = 10),'月 ','单位')))
DRAWTEXTREL(-70,40,'目前波段'+A18+A17+A19),COLORCCCCCC
当满足条件A6时,在CC位置书写文字,VALIGN2,ALIGN2,COLORFF99FF
当满足条件A7时,在(CC*0.995)位置书写文字,ALIGN2,COLOR00EECC

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

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