多空趋势指标 一目了然,不含未来。 趋势明朗 看看就懂,但奥妙无穷。 相关简介: 同花顺多空趋势指标公式 授权方式:免费版 指标评级:★★★★★ 指标分类:策略 画线方法:副图/主图未来函数检测结果: 暂未发现存在未来函数同花顺多空趋势指标公式源码: 高1:=REF(HHV(H,150),3); 低1:=REF(LLV(L,150),3); H1:=高1-(高1-低1)*0.191; H2:=高1-(高1-低1)*0.382; H3:=高1-(高1-低1)*0.5; H4:=高1-(高1-低1)*0.618; H5:=高1-(高1-低1)*0.809; 突破:REF(EMA(C,14),1),colormagenta,LINETHICK2; 顶:REFDATE(高1,DATE),POINTDOT,colorwhite; A1X:=(EMA(C,14)-突破)/突破*100; 出击:IF(A1X =0,REF(EMA(C,14),BARSLAST(CROSS(A1X,0))+1),DRAWNULL),colorred,LINETHICK2; 休假:IF(A1X 0,REF(EMA(C,14),BARSLAST(CROSS(0,A1X))+1),DRAWNULL),colorgreen,LINETHICK2; STICKLINE(A1X =0,出击,突破,0,-1),colorred; STICKLINE(A1X 0,休假,突破,0,-1),colorgreen; STICKLINE(CROSS(A1X,0),C,O,2,0),coloryellow; STICKLINE(CROSS(0,A1X),C,O,2,0),colorgreen; 趋势分界线:IF(A1X 0,突破,DRAWNULL),colorgreen,LINETHICK2; VAR0:=BKNAME; DRAWTEXTABS(10,2,STKLABEL+ +STKNAME+ +VAR0),COLORYELLOW; VAR1:= ◆大事提醒◆ VAR2:= 时间 VAR3:=F10FIND(VAR2,F10FIND(VAR1,1))+80; DRAWTEXTABS(0,25, +F10TEXT(VAR3,80)),COLORYELLOW; VAR4:= 时间 VAR5:=F10FIND(VAR4,F10FIND(VAR1,1))+135; DRAWTEXTABS(336,25, +F10TEXT(VAR5,28)),COLORYELLOW; VAR6:=EMA(CLOSE,7); VAR7:=EMA(CLOSE,21); STICKLINE(CLOSE =OPEN,CLOSE,OPEN,8,0),COLOR000055; STICKLINE(CLOSE =OPEN,CLOSE,OPEN,6.5,0),COLOR000075; STICKLINE(CLOSE =OPEN,CLOSE,OPEN,5,0),COLOR000095; STICKLINE(CLOSE =OPEN,CLOSE,OPEN,3.5,0),COLOR0000B5; STICKLINE(CLOSE =OPEN,CLOSE,OPEN,2,0),COLOR0000D5; STICKLINE(CLOSE =OPEN,HIGH,LOW,0.5,0),COLOR0000F5; STICKLINE(CLOSE OPEN,CLOSE,OPEN,8,0),COLOR303000; STICKLINE(CLOSE OPEN,CLOSE,OPEN,6.5,0),COLOR404000; STICKLINE(CLOSE OPEN,CLOSE,OPEN,5,0),COLOR505000; STICKLINE(CLOSE OPEN,CLOSE,OPEN,3.5,0),COLOR606000; STICKLINE(CLOSE OPEN,CLOSE,OPEN,2,0),COLOR707000; STICKLINE(CLOSE OPEN,HIGH,LOW,0.5,0),COLOR808000; 操盘线:VAR6,COLORWHITE; VAR8:=VAR7; PARTLINE(VAR8,VAR8 REF(VAR8,1),RGB(255,0,0),VAR8 REF(VAR8,1),RGB(0,255,0),1,RGB(0,0,255)),LINETHICK2; 总股本(亿):FINANCE2(35)/10000,LINETHICK0,COLORYELLOW; 流通(亿):FINANCE2(37)/10000,LINETHICK0,COLORWHITE; VAR9:=CROSS(VAR6,VAR7); DRAWICON(VAR9,LOW*0.99,7),ALIGN1; VAR10:=CROSS(VAR7,VAR6); DRAWICON(VAR10,HIGH*1.01,8),ALIGN1; VAR11:= 大额日线.主力#DAY VAR12:= 大额日线.特买#DAY VAR13:= 大额日线.特卖#DAY VAR14:= 大额日线.大买#DAY VAR15:= 大额日线.大卖#DAY VAR16:= 大额日线.中买#DAY VAR17:= 大额日线.中卖#DAY VAR18:= 大额日线.小买#DAY VAR19:= 大额日线.小卖#DAY VAR20:= 大额日线.超大比#DAY VAR21:= 大额日线.大户比#DAY VAR22:= 大额日线.中户比#DAY VAR23:= 大额日线.散户比#DAY VAR24:= 大额日线.主力比#DAY VAR25:=VAR18-VAR19; VAR26:=VAR16-VAR17; VAR27:=VAR14-VAR15; VAR28:=VAR12-VAR13; VAR29:=VAR12+VAR14; VAR30:=VAR13+VAR15; VAR31:=VAR29+VAR30; VAR32:=VAR28+VAR27; DRAWRECTABS(30,15,80,30,1),COLOR808000; DRAWRECTABS(80,15,130,30,1),COLOR008080; DRAWRECTABS(80,17,IF(30+VAR32/100 =100,80+VAR32/100,100),28,1710731),COLOR1A1A8B; DRAWRECTABS(80,19,IF(30+VAR32/100 =100,80+VAR32/100,100),26,2500301),COLOR2626CD; DRAWRECTABS(80,21,IF(30+VAR32/100 =100,80+VAR32/100,100),24,2895086),COLOR2C2CEE; DRAWRECTABS(80,23,IF(30+VAR32/100 =100,80+VAR32/100,100),22,3158271),COLOR3030FF; DRAWTEXTABS(5,15, 主力 ),COLORRED; DRAWTEXTABS(140,15,NUMTOSTRN(VAR32,2)+ 元 ),COLORRED; DRAWRECTABS(30,32,80,47,1),COLOR808000; DRAWRECTABS(80,32,130,47,1),COLOR008080; DRAWRECTABS(80,34,IF(30+VAR28/100 =100,80+VAR28/100,100),45,9147648),COLOR8B8600; DRAWRECTABS(80,36,IF(30+VAR28/100 =100,80+VAR28/100,100),43,13485312),COLORCDCD50; DRAWRECTABS(80,38,IF(30+VAR28/100 =100,80+VAR28/100,100),41,15656192),COLOREEE500; DRAWRECTABS(80,40,IF(30+VAR28/100 =100,80+VAR28/100,100),39,16774400),COLORFFF500; DRAWTEXTABS(5,33, 特户 ),COLORCYAN; DRAWTEXTABS(140,33,NUMTOSTRN(VAR28,2)+ 元 ),COLORCYAN; DRAWRECTABS(30,50,80,65,1),COLOR808000; DRAWRECTABS(80,50,130,65,1),COLOR008080; DRAWRECTABS(80,52,IF(30+VAR27/100 =100,80+VAR27/100,130),63,23179),COLOR005A8B; DRAWRECTABS(80,54,IF(30+VAR27/100 =100,80+VAR27/100,130),61,34253),COLOR0085CD; DRAWRECTABS(80,56,IF(30+VAR27/100 =100,80+VAR27/100,130),59,39662),COLOR009AEE; DRAWRECTABS(80,58,IF(30+VAR27/100 =100,80+VAR27/100,130),57,42495),COLOR00A5FF; DRAWTEXTABS(5,51, 大户 ),COLORYELLOW; DRAWTEXTABS(140,51,NUMTOSTRN(VAR27,2)+ 元 ),COLORYELLOW; DRAWRECTABS(30,68,80,83,1),COLOR808000; DRAWRECTABS(80,68,130,83,1),COLOR008080; DRAWRECTABS(80,70,IF(30+VAR26/100 =100,80+VAR26/100,130),81,3816075),COLOR3A3A8B; DRAWRECTABS(80,72,IF(30+VAR26/100 =100,80+VAR26/100,130),79,5592525),COLOR5555CD; DRAWRECTABS(80,74,IF(30+VAR26/100 =100,80+VAR26/100,130),77,6513646),COLOR6363EE; DRAWRECTABS(80,76,IF(30+VAR26/100 =100,80+VAR26/100,130),75,6974207),COLOR6A6AFF; DRAWTEXTABS(5,69, 中户 ),COLOR8080FF; DRAWTEXTABS(140,69,NUMTOSTRN(VAR26,2)+ 元 ),COLOR8080FF; DRAWRECTABS(30,86,80,101,1),COLOR808000; DRAWRECTABS(80,86,130,101,1),COLOR008080; DRAWRECTABS(80,88,IF(30+VAR25/100 =100,80+VAR25/100,130),99,5245579),COLOR500A8B; DRAWRECTABS(80,90,IF(30+VAR25/100 =100,80+VAR25/100,130),97,7737549),COLOR7610CD; DRAWRECTABS(80,92,IF(30+VAR25/100 =100,80+VAR25/100,130),95,8983278),COLOR8912EE; DRAWRECTABS(80,94,IF(30+VAR25/100 =100,80+VAR25/100,130),93,9639167),COLOR9314FF; DRAWTEXTABS(5,87, 散户 ),COLORMAGENTA; DRAWTEXTABS(140,87,NUMTOSTRN(VAR25,2)+ 元 ),COLORMAGENTA;同花顺多空趋势指标公式源码解读 高1赋值:3日前的150日内最高价的最高值 低1赋值:3日前的150日内最低价的最低值 H1赋值:高1-(高1-低1)*0.191 H2赋值:高1-(高1-低1)*0.382 H3赋值:高1-(高1-低1)*0.5 H4赋值:高1-(高1-低1)*0.618 H5赋值:高1-(高1-低1)*0.809 输出突破:1日前的收盘价的14日指数移动平均,画洋红色,线宽为2 输出顶:日期日高1,POINTDOT,画白色 A1X赋值:(收盘价的14日指数移动平均-突破)/突破*100 输出出击:如果A1X ,返回?,否则返回? =0,上次A1X上穿0距今天数+1日前的收盘价的14日指数移动平均,无效数),画红色,线宽为2 输出休假:如果A1X ,返回?,否则返回? 0,上次0上穿A1X距今天数+1日前的收盘价的14日指数移动平均,无效数),画绿色,线宽为2 当满足条件A1X 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. =0,出击,突破,0,-1),画红色 当满足条件A1X 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 0,休假,突破,0,-1),画绿色 当满足条件A1X上穿0时,在收盘价和开盘价位置之间画柱状线,宽度为2,0不为0则画空心柱.,画黄色 当满足条件0上穿A1X时,在收盘价和开盘价位置之间画柱状线,宽度为2,0不为0则画空心柱.,画绿色 输出趋势分界线:如果A1X ,返回?,否则返回? 0,突破,无效数),画绿色,线宽为2 VAR0赋值:BKNAME DRAWTEXTABS(10,2,STKLABEL+ +品种名称+ +VAR0),画黄色 VAR1赋值: ◆大事提醒◆ VAR2赋值: 时间 VAR3赋值:F10FIND(VAR2,F10FIND(VAR1,1))+80 DRAWTEXTABS(0,25, +F10TEXT(VAR3,80)),画黄色 VAR4赋值: 时间 VAR5赋值:F10FIND(VAR4,F10FIND(VAR1,1))+135 DRAWTEXTABS(336,25, +F10TEXT(VAR5,28)),画黄色 VAR6赋值:收盘价的7日指数移动平均 VAR7赋值:收盘价的21日指数移动平均 当满足条件收盘价 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. =开盘价,收盘价,开盘价,8,0),COLOR000055 当满足条件收盘价 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. =开盘价,收盘价,开盘价,6.5,0),COLOR000075 当满足条件收盘价 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. =开盘价,收盘价,开盘价,5,0),COLOR000095 当满足条件收盘价 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. =开盘价,收盘价,开盘价,3.5,0),COLOR0000B5 当满足条件收盘价 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. =开盘价,收盘价,开盘价,2,0),COLOR0000D5 当满足条件收盘价 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. =开盘价,最高价,最低价,0.5,0),COLOR0000F5 当满足条件收盘价 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 开盘价,收盘价,开盘价,8,0),COLOR303000 当满足条件收盘价 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 开盘价,收盘价,开盘价,6.5,0),COLOR404000 当满足条件收盘价 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 开盘价,收盘价,开盘价,5,0),COLOR505000 当满足条件收盘价 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 开盘价,收盘价,开盘价,3.5,0),COLOR606000 当满足条件收盘价 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 开盘价,收盘价,开盘价,2,0),COLOR707000 当满足条件收盘价 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. 开盘价,最高价,最低价,0.5,0),COLOR808000 输出操盘线:VAR6,画白色 VAR8赋值:VAR7 PARTLINE(VAR8,VAR8 1日前的VAR8,自定色,VAR8 1日前的VAR8,自定色,1,自定色),线宽为2 输出总股本(亿):FINANCE2(35)/10000,线宽为0,画黄色 输出流通(亿):FINANCE2(37)/10000,线宽为0,画白色 VAR9赋值:VAR6上穿VAR7 当满足条件VAR9时,在最低价*0.99位置画7号图标,ALIGN1 VAR10赋值:VAR7上穿VAR6 当满足条件VAR10时,在最高价*1.01位置画8号图标,ALIGN1 VAR11赋值: 大额日线.主力[取日线数据] VAR12赋值: 大额日线.特买[取日线数据] VAR13赋值: 大额日线.特卖[取日线数据] VAR14赋值: 大额日线.大买[取日线数据] VAR15赋值: 大额日线.大卖[取日线数据] VAR16赋值: 大额日线.中买[取日线数据] VAR17赋值: 大额日线.中卖[取日线数据] VAR18赋值: 大额日线.小买[取日线数据] VAR19赋值: 大额日线.小卖[取日线数据] VAR20赋值: 大额日线.超大比[取日线数据] VAR21赋值: 大额日线.大户比[取日线数据] VAR22赋值: 大额日线.中户比[取日线数据] VAR23赋值: 大额日线.散户比[取日线数据] VAR24赋值: 大额日线.主力比[取日线数据] VAR25赋值:VAR18-VAR19 VAR26赋值:VAR16-VAR17 VAR27赋值:VAR14-VAR15 VAR28赋值:VAR12-VAR13 VAR29赋值:VAR12+VAR14 VAR30赋值:VAR13+VAR15 VAR31赋值:VAR29+VAR30 VAR32赋值:VAR28+VAR27 DRAWRECTABS(30,15,80,30,1),COLOR808000 DRAWRECTABS(80,15,130,30,1),COLOR008080 DRAWRECTABS(80,17,如果30+VAR32/100 ,返回?,否则返回? =100,80+VAR32/100,100),28,1710731),COLOR1A1A8B DRAWRECTABS(80,19,如果30+VAR32/100 ,返回?,否则返回? =100,80+VAR32/100,100),26,2500301),COLOR2626CD DRAWRECTABS(80,21,如果30+VAR32/100 ,返回?,否则返回? =100,80+VAR32/100,100),24,2895086),COLOR2C2CEE DRAWRECTABS(80,23,如果30+VAR32/100 ,返回?,否则返回? =100,80+VAR32/100,100),22,3158271),COLOR3030FF DRAWTEXTABS(5,15, 主力 ),画红色 DRAWTEXTABS(140,15,NUMTOSTRN(VAR32,2)+ 元 ),画红色 DRAWRECTABS(30,32,80,47,1),COLOR808000 DRAWRECTABS(80,32,130,47,1),COLOR008080 DRAWRECTABS(80,34,如果30+VAR28/100 ,返回?,否则返回? =100,80+VAR28/100,100),45,9147648),COLOR8B8600 DRAWRECTABS(80,36,如果30+VAR28/100 ,返回?,否则返回? =100,80+VAR28/100,100),43,13485312),COLORCDCD50 DRAWRECTABS(80,38,如果30+VAR28/100 ,返回?,否则返回? =100,80+VAR28/100,100),41,15656192),COLOREEE500 DRAWRECTABS(80,40,如果30+VAR28/100 ,返回?,否则返回? =100,80+VAR28/100,100),39,16774400),COLORFFF500 DRAWTEXTABS(5,33, 特户 ),画青色 DRAWTEXTABS(140,33,NUMTOSTRN(VAR28,2)+ 元 ),画青色 DRAWRECTABS(30,50,80,65,1),COLOR808000 DRAWRECTABS(80,50,130,65,1),COLOR008080 DRAWRECTABS(80,52,如果30+VAR27/100 ,返回?,否则返回? =100,80+VAR27/100,130),63,23179),COLOR005A8B DRAWRECTABS(80,54,如果30+VAR27/100 ,返回?,否则返回? =100,80+VAR27/100,130),61,34253),COLOR0085CD DRAWRECTABS(80,56,如果30+VAR27/100 ,返回?,否则返回? =100,80+VAR27/100,130),59,39662),COLOR009AEE DRAWRECTABS(80,58,如果30+VAR27/100 ,返回?,否则返回? =100,80+VAR27/100,130),57,42495),COLOR00A5FF DRAWTEXTABS(5,51, 大户 ),画黄色 DRAWTEXTABS(140,51,NUMTOSTRN(VAR27,2)+ 元 ),画黄色 DRAWRECTABS(30,68,80,83,1),COLOR808000 DRAWRECTABS(80,68,130,83,1),COLOR008080 DRAWRECTABS(80,70,如果30+VAR26/100 ,返回?,否则返回? =100,80+VAR26/100,130),81,3816075),COLOR3A3A8B DRAWRECTABS(80,72,如果30+VAR26/100 ,返回?,否则返回? =100,80+VAR26/100,130),79,5592525),COLOR5555CD DRAWRECTABS(80,74,如果30+VAR26/100 ,返回?,否则返回? =100,80+VAR26/100,130),77,6513646),COLOR6363EE DRAWRECTABS(80,76,如果30+VAR26/100 ,返回?,否则返回? =100,80+VAR26/100,130),75,6974207),COLOR6A6AFF DRAWTEXTABS(5,69, 中户 ),COLOR8080FF DRAWTEXTABS(140,69,NUMTOSTRN(VAR26,2)+ 元 ),COLOR8080FF DRAWRECTABS(30,86,80,101,1),COLOR808000 DRAWRECTABS(80,86,130,101,1),COLOR008080 DRAWRECTABS(80,88,如果30+VAR25/100 ,返回?,否则返回? =100,80+VAR25/100,130),99,5245579),COLOR500A8B DRAWRECTABS(80,90,如果30+VAR25/100 ,返回?,否则返回? =100,80+VAR25/100,130),97,7737549),COLOR7610CD DRAWRECTABS(80,92,如果30+VAR25/100 ,返回?,否则返回? =100,80+VAR25/100,130),95,8983278),COLOR8912EE DRAWRECTABS(80,94,如果30+VAR25/100 ,返回?,否则返回? =100,80+VAR25/100,130),93,9639167),COLOR9314FF DRAWTEXTABS(5,87, 散户 ),画洋红色 DRAWTEXTABS(140,87,NUMTOSTRN(VAR25,2)+ 元 ),画洋红色