MA5:MA(C,5),PRECIS2,COLORFFFFFF; MA10:MA(C,10),PRECIS2,COLORYELLOW; MA20:MA(C,20),PRECIS2,COLORFF68FF; MA30:MA(C,30),PRECIS2,ColorGREEN; MA60:MA(C,60),PRECIS2;{ MA120:MA(C,120),linethick0,PRECIS2; MA250:MA(C,250),linethick0,PRECIS2;} 均线:(MA(CLOSE,M) * 1),PRECIS2,ColorFFFFFF,DASHLINE; 乖离率:(CLOSE-均线)/均线*100,PRECIS2,linethick0,Color00FFFF; DRAWTEXT(DISPSTATUS=2,均线,' '+NUMTOSTRN(M,0)+'日 乖离率: '+NUMTOSTRN(乖离率,2),5),ALIGN0,VALIGN1,ColorFFFFFF; {CCI} TYP := (HIGH + LOW + CLOSE)/3; CCI:(TYP-MA(TYP,CI))/(0.015*AVEDEV(TYP,CI)),PRECIS0,ColorFFFFFF,linethick0; DRAWGBK(CCI>100),Color00002F; DRAWGBK(CCI<-100),Color002F00; {撑压划线} A1:=ref(h,N)=hhv(h,2*N+1); B1:=filter(A1,N); C1:=backset(B1,N+1); D1:=filter(C1,N);{高点} A2:=ref(l,N)=llv(l,2*N+1); B2:=filter(A2,N); C2:=backset(B2,N+1); D2:=filter(C2,N);{低点} E1:=(ref(llv(l,2*N),1)+ref(hhv(h,2*N),1))/2; E2:=(h+l)/2;{高低点出现在同一K线上时可作取舍} H1:=(D1 AND not(D2 AND E1>=E2)) OR barstatus=2 OR barscount(c)=1; L1:=(D2 AND not(D1 AND E1<E2)); H2:=D1 AND not(D2 AND E1>=E2); X1:=ref(barslast(H1),1)+1; F1:=backset(H1 AND count(L1,X1)>0,llvbars(if(L1,l,10000),X1)); G1:=F1>ref(F1,1); I1:=backset(G1,2); LD:=I1>ref(I1,1);{过滤后低点} L2:=LD OR barstatus=2 OR barscount(c)=1; X2:=ref(barslast(L2),1)+1; F2:=backset(L2 AND count(H2,X2)>0,hhvbars(if(H2,h,0),X2)); G2:=F2>ref(F2,1); I2:=backset(G2,2); HD:=I2>ref(I2,1);{过滤后高点} R1:=backset(barstatus=2,barslast(HD)+1); S1:=R1>ref(R1,1); {前一高} T1:=backset(barstatus=2,barslast(LD)+1); U1:=T1>ref(T1,1); {前一低}{ {涨跌幅时间窗口} A:=BARSLAST(DISPSTATUS=1)+1; HH:=HHV(HIGH,A); LL:=LLV(LOW,A); 上涨:=BARSSINCE(BACKSET(DISPSTATUS=2,BARSLAST(L=LL)+1)); 上涨空间%:=(C/REF(L,上涨)-1)*100; 最高%:=(HHVALL(HH)/REF(L,上涨)-1)*100; 下跌:=BARSSINCE(BACKSET(DISPSTATUS=2,BARSLAST(H=HH)+1)); 下跌空间%:=(C/REF(H,下跌)-1)*100; 最低%:=(LLVALL(LL)/REF(H,下跌)-1)*100; 最高价:REF(H,下跌),PRECIS2,COLOR0000FF,DOTLINE; 最低价:REF(L,上涨),PRECIS2,COLOR00FF00,DOTLINE; 幅度:最高价-最低价,PRECIS2,COLORFFFFFF,linethick0; 半分位:=O+(C-O)/2; 昨半分位:REF(半分位,1),PRECIS2,COLOR00FFFF,linethick0; DRAWTEXT(BARSTATUS=2,昨半分位,'---- 昨半分位:'+NUMTOSTRN(昨半分位,2)+'',-5),ALIGN0,COLOR00FFFF; DRAWTEXT(BARSTATUS=2,昨半分位,'-------',-5),ALIGN2,COLOR00FFFF; DRAWTEXT(BARSTATUS=2,最高价,' 最高价:'+NUMTOSTRN(最高价,2),2),ALIGN0,color0000ff; DRAWTEXT(BARSTATUS=2,最低价,' 最低价:'+NUMTOSTRN(最低价,2),-12),ALIGN0,color00FF00; drawline(最高价,h,S1,h,1),Color00BBFF,DOTLINE; drawline(最低价,l,U1,l,1),ColorDFFF08,DOTLINE; {布林带} 布林中轨:MA(CLOSE,BL),PRECIS2,COLORFFFFFF,DASHLINE; 布林上轨:布林中轨+ P*STD(CLOSE,BL),PRECIS2,COLOR0000FF,DASHLINE; 布林下轨:布林中轨- P*STD(CLOSE,BL),PRECIS2,COLOR00FF00,DASHLINE; VERTLINE(上涨=0,3),COLOR0000FF; VERTLINE(下跌=0,3),COLOR00FF00; DRAWTEXT(上涨=0 AND 最高%>10,LL*1.1,' 10%',-5),COLORYELLOW; DRAWTEXT(上涨=0 AND 最高%>20,LL*1.2,' 20%',-5),COLOR00FFFF; DRAWTEXT(上涨=0 AND 最高%>30,LL*1.3,' 30%',-5),COLOR00FFFF; DRAWTEXT(上涨=0 AND 最高%>40,LL*1.4,' 40%',-5),COLOR00FFFF; DRAWTEXT(上涨=0 AND 最高%>50,LL*1.5,' 50%',-5),COLOR00FFFF; DRAWTEXT(上涨=0 AND 最高%>60,LL*1.6,' 60%',-5),COLOR00FFFF; DRAWTEXT(上涨=0 AND 最高%>70,LL*1.7,' 70%',-5),COLOR00FFFF; DRAWTEXT(上涨=0 AND 最高%>80,LL*1.8,' 80%',-5),COLOR00FFFF; DRAWTEXT(上涨=0 AND 最高%>90,LL*1.9,' 90%',-5),COLOR00FFFF; DRAWTEXT(上涨=0 AND 最高%>100,LL*2,' 99.99%',-5),COLOR00FFFF; DRAWTEXT(上涨=0 AND 最高%>125,LL*2.25,' 125%',-5),COLOR00FFFF; DRAWTEXT(上涨=0 AND 最高%>150,LL*2.5,' 150%',-5),COLOR00FFFF; DRAWTEXT(上涨=0 AND 最高%>200,LL*3,' 200%',-5),COLOR00FFFF; DRAWTEXT(上涨=0 AND 最高%>250,LL*3.5,' 250%',-5),COLOR00FFFF; DRAWTEXT(下跌=0 AND 最低%<-10,HH*0.9,' -10%'),COLORFFFFFF; DRAWTEXT(下跌=0 AND 最低%<-20,HH*0.8,' -20%'),COLORFFFFFF; DRAWTEXT(下跌=0 AND 最低%<-30,HH*0.7,' -30%'),COLORFFFFFF; DRAWTEXT(下跌=0 AND 最低%<-40,HH*0.6,' -40%'),COLORFFFFFF; DRAWTEXT(下跌=0 AND 最低%<-50,HH*0.5,' -50%'),COLORFFFFFF; DRAWTEXT(下跌=0 AND 最低%<-60,HH*0.4,' -60%'),COLORFFFFFF; DRAWTEXT(下跌=0 AND 最低%<-70,HH*0.3,' -70%'),COLORFFFFFF; DRAWTEXT(下跌=0 AND 最低%<-80,HH*0.2,' -80%'),COLORFFFFFF; DRAWTEXT(下跌=0 AND 最低%<-90,HH*0.1,' -90%'),COLORFFFFFF; DRAWTEXT(上涨=5,H,'涨5',-20),COLOR00FFFF,ALIGN1; DRAWTEXT(上涨=8,H,'涨8',-20),COLOR00FFFF,ALIGN1; DRAWTEXT(上涨=13,H,'涨13',-20),COLOR00FFFF,ALIGN1; DRAWTEXT(上涨=21,H,'涨21',-20),COLOR00FFFF,ALIGN1; DRAWTEXT(上涨=34,H,'涨34',-20),COLOR00FFFF,ALIGN1; DRAWTEXT(上涨=55,H,'涨55',-20),COLOR00FFFF,ALIGN1; DRAWTEXT(上涨=89,H,'涨89',-20),COLOR00FFFF,ALIGN1; DRAWTEXT(上涨=144,H,'涨144',-20),COLOR00FFFF,ALIGN1; DRAWTEXT(上涨=180,H,'涨180',-20),COLOR00FFFF,ALIGN1; DRAWTEXT(上涨=250,H,'涨250',-20),COLOR00FFFF,ALIGN1; DRAWTEXT(下跌=5,L,'跌5',10),COLOR00FF00,ALIGN1; DRAWTEXT(下跌=8,L,'跌8',10),COLOR00FF00,ALIGN1; DRAWTEXT(下跌=13,L,'跌13',10),COLOR00FF00,ALIGN1; DRAWTEXT(下跌=21,L,'跌21',10),COLOR00FF00,ALIGN1; DRAWTEXT(下跌=34,L,'跌34',10),COLOR00FF00,ALIGN1; DRAWTEXT(下跌=55,L,'跌55',10),COLOR00FF00,ALIGN1; DRAWTEXT(下跌=89,L,'跌89',10),COLOR00FF00,ALIGN1; DRAWTEXT(下跌=144,L,'跌144',10),COLOR00FF00,ALIGN1; DRAWTEXT(下跌=180,L,'跌180',10),COLOR00FF00,ALIGN1; DRAWTEXT(下跌=250,L,'跌250',10),COLOR00FF00,ALIGN1; {百分指标}{ bb146:最低价+幅度*0.146,DOTLINE; bb236:最低价+幅度*0.236,DOTLINE; BB382:最低价+幅度*0.382,DOTLINE; BB50:最低价+幅度*0.5,DOTLINE; BB618:最低价+幅度*0.618,DOTLINE; BB854:最低价+幅度*0.854,DOTLINE; DRAWTEXT(BARSTATUS=2,bb146,' 0.146%:'+NUMTOSTRN(bb146,2),-5),ALIGN0,color00FFff; DRAWTEXT(BARSTATUS=2,bb236,' 0.236%:'+NUMTOSTRN(bb236,2),-5),ALIGN0,color00FFff; DRAWTEXT(BARSTATUS=2,bb382,' 0.382%:'+NUMTOSTRN(bb382,2),-5),ALIGN0,color00FFff; DRAWTEXT(BARSTATUS=2,bb50,' 0.5%:'+NUMTOSTRN(bb50,2),-5),ALIGN0,COLORMAGENTA; DRAWTEXT(BARSTATUS=2,bb618,' 0.618%:'+NUMTOSTRN(bb618,2),-5),ALIGN0,COLOR00FFFF; DRAWTEXT(BARSTATUS=2,bb854,' 0.854%:'+NUMTOSTRN(bb854,2),-5),ALIGN0,color00FFff; {K线} STICKLINE(CLOSE>=OPEN and OPEN<>0,HIGH,LOW,1,0),Color0022FF; STICKLINE(CLOSE>=OPEN and OPEN<>0,CLOSE,OPEN,7.5,0),color000033; STICKLINE(CLOSE>=OPEN and OPEN<>0,CLOSE,OPEN,6,0),color000066; STICKLINE(CLOSE>=OPEN and OPEN<>0,CLOSE,OPEN,5,0),color000088; STICKLINE(CLOSE>=OPEN and OPEN<>0,CLOSE,OPEN,4,0),color0000BB; STICKLINE(CLOSE>=OPEN and OPEN<>0,CLOSE,OPEN,2.5,0),Color0000EE; STICKLINE(CLOSE>=OPEN and OPEN<>0,CLOSE,OPEN,1,0),Color0022FF; STIC |
评论内容只代表网友观点,与本站立场无关!
本网提供的公式文件说明:
* alg格式飞狐股票公式,可以用飞狐交易师或者交易师软件导入;
* fnc格式大智慧新一代公式指标,可以用大智慧股票软件使用,少部分可以用分析家股票软件引入使用;
* exp格式大智慧经典版股票公式,仅可以用大智慧经典版股票软件引入使用;
* tni和tnc格式通达信股票公式,仅可以用通达信新引入使用,例如可以用通达信股票软件引入使用;
* tne,tn6格式通达信公式,可以用通达信公式编辑器5.0版导入,推荐通达信金融终端版本;
* hxf格式同花顺股票公式,仅可以用同花顺股票软件引入使用。
以上的各种软件都可以在本网股票软件栏目找到!
* 关于股票公式时间限制,如果在引入大智慧公式,交易师公式或者飞狐公式的时候,发现公式名称栏是空白的,这时候调整电脑时间到1997年,又能出现公式名称,并且能正常显示,可能是公式使用期限已过。
* 关于还原公式源码如果你忘记了自己编写的大智慧公式,通达信公式,同花顺公式,操盘手公式,飞狐公式,博易大师公式,金字塔公式,文华公式和交易师公式等等公式的密码,本网可帮恢复源码,有.偿.服.务无意勿扰,点击在线咨询联系我。
* 关于股票公式源码编辑
本网提供的源码,一般都可以编辑成公式,如果不明白公式的编辑,在本页右侧教程录像可参考,或者找公式教程资料学习,请搜索:教程
* 如果您发现软件内容或者链接错误,请点击报告错误谢谢!
* 站内提供的所有软件包含源码均是由网上搜集,若侵犯了你的版权利益,请联系通知我们!