同花顺主图公式源码 同花顺突破长压主图无未来函数公式源码
2014-12-30 11:08:11 股票入门 http://rumen.southmoney.com
南方财富网带来同花顺主图公式源码 同花顺突破长压主图无未来函数公式源码:
为了配合突破长压选股公式再上突破长压主图,源码如下:
参数:
n 最小;1.00 最大:30.00 缺省:8.00
n1 最小;1.00 最大:300.00 缺省:5.00
n2 最小;1.00 最大:300.00 缺省:10.00
n3 最小;1.00 最大:300.00 缺省:20.00
n4 最小;1.00 最大:300.00 缺省:60.00
n5 最小;1.00 最大:300.00 缺省:120.00
n6 最小;1.00 最大:300.00 缺省:250.00
DRAWBAND(MA(CLOSE,N4),RGB(250,80,120),MA(CLOSE,N5),RGB(30,80,10));
DRAWBAND(MA(CLOSE,N1),RGB(200,80,120),MA(CLOSE,N2),RGB(80,130,100));
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
{涨跌幅度}
{以下涨停红柱、跌停绿柱、涨幅》5%洋红柱、跌幅达》5%蓝柱}
C9:=REF(C,1);
V1:=IF(NAMELIKE(‘ST’) OR NAMELIKE(‘*ST’), 5, 10);
非ST涨停:=IF((C-C9)*100/C9》=(10-0.01*100/C9),1,0);
涨停:=非ST涨停;
STICKLINE(涨停,OPEN,CLOSE,3,0),COLOR000099;
STICKLINE(涨停,OPEN,CLOSE,1.86,0),COLOR0000CC;
STICKLINE(涨停,OPEN,CLOSE,0.5,0),COLOR0000FF;
STICKLINE(涨停,H,L,0,0),COLOR6633FF;
{}
非ST跌停:=IF((C9-C)*100/C9》=(10-0.01*100/C9),1,0);
跌停:=非ST跌停;
STICKLINE(跌停,HIGH,LOW,0,0),COLOR66FF00;
STICKLINE(跌停,CLOSE,OPEN,3.2,0),COLOR33CC00;
STICKLINE(跌停,CLOSE,OPEN,3,0),COLOR009900;
STICKLINE(跌停,CLOSE,OPEN,1.8,0),COLOR00CC33;
STICKLINE(跌停,CLOSE,OPEN,0.5,0),COLOR00FF00;
半涨1:=IF((C-C9)*100/C9》=(5-0.01*100/C9),1,0);
半涨2:=IF((C-C9)*100/C9《(10-0.01*100/C9),1,0);
JRS:=半涨1 AND 半涨2 AND FINANCE(33)》0;
STICKLINE(JRS,OPEN,CLOSE,3,0),COLORCC0099;
STICKLINE(JRS,OPEN,CLOSE,1.86,0),COLORCC00CC;
STICKLINE(JRS,OPEN,CLOSE,0.5,0),COLORFF00FF;
STICKLINE(JRS,H,L,0,0),COLORFF66FF;
{跌幅达》5%蓝柱}
{半跌1:=IF((C9-C)*100/C9》=(5-0.01*100/C9),1,0);
半跌2:=IF((C9-C)*100/C9《(10-0.01*100/C9),1,0);
JES:=半跌1 AND 半跌2 AND FINANCE(33)》0;
STICKLINE(JES,HIGH,LOW,0,0),COLORFF9933;
STICKLINE(JES,CLOSE,OPEN,3.2,0),COLORFF9933;
STICKLINE(JES,CLOSE,OPEN,3,0),COLORFF6633;
STICKLINE(JES,CLOSE,OPEN,1.8,0),COLORFF9933;
STICKLINE(JES,CLOSE,OPEN,0.5,0),COLORFFCC33;}
{显示涨跌幅}
NUMBER:=COUNT(非ST涨停,BARSSINCE(非ST涨停)+1);
DRAWNUMBER(非ST涨停,HIGH*1.02,NUMBER),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.95,0.98,0,NUMBER),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.85,0.98,0,‘上市以来共涨停:’),COLORRED;
{}
MMA1:MA(CLOSE,N1),COLORWHITE;
MMA2:MA(CLOSE,N2),COLORYELLOW;
MMA3:MA(CLOSE,N3),COLORMAGENTA,LINETHICK2;
MMA4:MA(CLOSE,N4),COLORGREEN,LINETHICK2;
MMA5:MA(CLOSE,N5),COLORLIBLUE;
MMA6:MA(CLOSE,N6),COLORBLUE,LINETHICK2;
{}
{突破显示23号图标白圈红十角}
均价:=(2*C+(H-L)/2+L+O)/4;
价差:=SUM(均价-REF(均价,1),3)/3;
实价:=(均价+价差);
MA8:=MA(实价,8);
MA24:=MA(实价,24);
MM:=EMA(均价+价差,53),COLORCYAN;
XM:=EMA(均价,53);
I0:=(EMA(MM,3)+EMA(MM,6)+EMA(MM,12)+EMA(MM,24))/4;
I1:=(EMA(XM,3)+EMA(XM,6)+EMA(XM,12)+EMA(XM,24))/4;
牛熊线:=0.5*(I0+I1),LINETHICK,COLORRED;
多头:=COUNT(MA24》牛熊线,10)=10;
ZD:=MAX(MA8,MAX(MA24,牛熊线));
ZX:=MIN(MA8,MIN(MA24,牛熊线));
粘合:=ABS(ZD/ZX-1)*100《=15;
TP:=MIN(牛熊线*1.15,MA24*1.13);
DRAWICON(FILTER(CROSS(C,TP) AND 粘合 AND 牛熊线》REF(牛熊线,1),18) ,L+0.1,23);{突破显示23号图标};
AA2:=REF(C,9)=LLV(C,2*9+1); B2:=FILTER(AA2,9); C2:=BACKSET(B2,9+1);
AA3:=REF(C,10)=HHV(C,2*10+1); B3:=FILTER(AA3,10); C3:=BACKSET(B3,10+1); HD1:=FILTER(C3,10);
AA4:=REF(C,60)=HHV(C,2*60+1); B4:=FILTER(AA4,60); C4:=BACKSET(B4,60+1); HD2:=FILTER(C4,60);
近压:=REF(C,BARSLAST(HD1));
长压:=REF(C,BARSLAST(HD2));
STICKLINE(C,近压,近压,3,2),COLORYELLOW,LINETHICK1;
STICKLINE(C,长压,长压,3,2),COLORWHITE,LINETHICK1;
股票入门声明:资讯来源于互联网,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。