股票的公式有哪些?飞狐质变划线主图公式源码
2016-6-14 10:29:07 股票入门 http://rumen.southmoney.com
股票的公式有哪些?飞狐质变划线主图公式源码 附:飞狐盈亏平衡主图公式源码 南方财富网小编为您提供
【飞狐质变划线主图公式源码】
A:=LINEVALUE(LOW<=LLV(LOW,120),LOW,HHV(H,6)<=HHV(H,10),LLV(LOW,6),0,0), COLORBLUE ,LINETHICK2;
WRAP: break-word; WHITE-SPACE: normal; TEXT-TRANSFORM: none; WORD-SPACING: 0px; COLOR: rgb(51,51,51); PADDING-BOTTOM: 0px; PADDING-TOP: 0px; FONT: 14px/24px 宋体, arial, sans-serif, 'DejaVu Sans', 'Lucida Grande', Tahoma, 'Hiragino Sans GB', STHeiti, SimSun, sans-serif; PADDING-LEFT: 0px; MARGIN: 0px; WIDOWS: 1; LETTER-SPACING: normal; PADDING-RIGHT: 0px; TEXT-INDENT: 0px; -webkit-text-stroke-width: 0px">TY:=C;
MA5:MA(C,5)COLORWHITE;
MA10:MA(C,10);
MA20:MA(C,20);
MA30:MA(C,30);
MA060:MA(C,60)COLORRED;
MA1200:MA(CLOSE,120),LINETHICK2,COLORRED ;
MA250:MA(CLOSE,250),LINETHICK2,COLORWHITE ;
{均线}
TYP:= (HIGH + LOW +2* C)/4;
均线:=EMA(TYP,3),LINETHICK2,COLORWHITE;
均线上轨:=HHV(均线,14),LINETHICK2,COLORYELLOW;
均线下轨:=LLV(均线,14),LINETHICK2,COLORGREEN;
角度:=ATAN((均线/REF(均线,1)-1)*100)*180/3.1416;
{K线优化}
STICKLINE(角度>0,O ,C ,1.33,0 ),COLORRED;
STICKLINE(角度<0,O ,C,1.33 ,0 ),COLORCYAN;
STICKLINE(角度<0,O,C,8,0),COLORFF6600;{蓝K线持币}
STICKLINE(角度<0,O,C,5.33,0),COLORFF9900;
STICKLINE(角度<0,O,C,3.2,0),COLORFFCC00;
STICKLINE(角度<0,O,C,0.53,0),COLORCYAN;
STICKLINE(角度>0,O,C,8,0),COLOR000099;
STICKLINE(角度>0,O,C,5.33,0),COLOR0000CC;{红K线持股}
STICKLINE(角度>0,O,C,3.47,0),COLOR0000FF;
STICKLINE(角度>0,O,C,0.8,0),COLORCC66FF;
X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+
14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)
+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+
REF(A,20))/210;
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
CB:=EMA(X,13);
买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
DRAWICON(FILTER(买=1,5),L*0.97,3);
P:=5;
A1:=REF(H,P)=HHV(H,2*P+1);
B1:=FILTER(A1,P);
C1:=BACKSET(B1,P+1);
D1:=FILTER(C1,P);
A2:=REF(H,P)=LLV(H,2*P+1);
B2:=FILTER(A2,P);
C2:=BACKSET(B2,P+1);
D2:=FILTER(C2,P);
R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);
S11:=R11>REF(R11,1);
DRAWLINE(D1,H,S11,H,1),COLOR00FF00,LINETHICK1;
T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);
U11:=T11>REF(T11,1);
DRAWLINE(D2,L,U11,L,1),COLORYELLOW,LINETHICK1;
附:【飞狐盈亏平衡主图公式源码】
INPUT:N(3,1,9),KG(0,0,1);
A:=DATATYPE;KK:=0;
TJ1:=A<1 OR A>6 AND A<>9 OR KG;
TJ2:=A<2 OR A>6 AND A<>9 OR KG;
TJ3:=A<3 OR A>7 AND A<>9 OR KG;
TJ4:=A<4 OR A=8 OR KG;
TJ5:=A<5 OR A=8 OR KG;
{10日盈亏平衡线,根据牛熊界线基准线内插;当KG=1时,显示普通均线MA(C,10)}
N1:=IF(A=6,10,IF(A=7,2,IF(A=10,3,IF(A=5,40,IF(A=4,80,IF(A=3,160,480))))));
H10:=IF(TJ1,KK,IF(CAPITAL,HHV(EMA(H+C,N),N1)*0.933,HHV(EMA(H+C,N),N1)*0.983));
L10:=IF(TJ1,KK,IF(CAPITAL,LLV(EMA(L+C,N),N1)*1.067,LLV(EMA(L+C,N),N1)*1.017));
YK10R:IF(TJ1,MA(C,10),(H10+L10)/4),LINETHICK1,PRECISION2;
{30日盈亏平衡线,根据牛熊界线基准线内插;当KG=1时,显示普通均线MA(C,30)}
N2:=IF(A=6,30,IF(A=7,6,IF(A=10,10,IF(A=5,120,IF(A=4,240,480)))));
H30:=IF(TJ2,KK,IF(CAPITAL,HHV(EMA(H+C,N),N2)*0.9,HHV(EMA(H+C,N),N2)*0.95));
L30:=IF(TJ2,KK,IF(CAPITAL,LLV(EMA(L+C,N),N2)*1.1,LLV(EMA(L+C,N),N2)*1.05));
YK30R:IF(TJ2,MA(C,30),(H30+L30)/4),LINETHICK1,PRECISION2;
{60日盈亏平衡线,根据牛熊界线基准线内插;当KG=1时,显示普通均线MA(C,60)}
N3:=IF(A=6,60,IF(A=7,12,IF(A=8,3,IF(A=10,20,IF(A=5,240,IF(A=4,480,480))))));
H60:=IF(TJ3,KK,IF(CAPITAL,HHV(EMA(H,N),N3)*0.8,HHV(EMA(H,N),N3)*0.9));
L60:=IF(TJ3,KK,IF(CAPITAL,LLV(EMA(L,N),N3)*1.2,LLV(EMA(L,N),N3)*1.1));
YK60R:IF(TJ3,MA(C,60),(H60+L60)/2),LINETHICK1,PRECISION2;
{120日盈亏平衡线,牛熊界线基准线;当KG=1时,显示普通均线MA(C,120)即半年线}
N4:=IF(A=5,480,IF(A=6,120,IF(A=7,24,IF(A=8,6,IF(A=10,40,IF(A=9,2,480))))));
H120:=IF(TJ4,KK,IF(CAPITAL,HHV(EMA(H,N),N4)*0.7,HHV(EMA(H,N),N4)*0.8));
L120:=IF(TJ4,KK,IF(CAPITAL,LLV(EMA(L,N),N4)*1.3,LLV(EMA(L,N),N4)*1.2));
YK120R:IF(TJ4,MA(C,120),(H120+L120)/2),COLOR1389EE,LINETHICK2,PRECISION2;
{240日盈亏平衡线,根据牛熊界线基准线外推;当KG=1时,显示普通均线MA(C,240)即年线}
N5:=IF(A=6,240,IF(A=7,48,IF(A=8,12,IF(A=9,1,IF(A=10,80,480)))));
H240:=IF(TJ5,KK,IF(CAPITAL,HHV(EMA(H,N),N5)*0.8,HHV(EMA(H,N),N5)*0.9));
L240:=IF(TJ5,KK,IF(CAPITAL,LLV(EMA(L,N),N5)*1.2,LLV(EMA(L,N),N5)*1.1));
YK240R:IF(TJ5,MA(C,240),(H240+L240)/2),LINETHICK2,PRECISION2;
{480日盈亏平衡线,根据牛熊界线基准线外推;当KG=1时,显示普通均线MA(C,480)即2年线}
N6:=IF(A=6,480,IF(A=7,96,IF(A=8,24,IF(A=10,160,IF(A=9,2,480)))));
H480:=IF(TJ5,KK,IF(CAPITAL,HHV(EMA(H,N),N6)*0.70,HHV(EMA(H,N),N6)*0.8));
L480:=IF(TJ5,KK,IF(CAPITAL,LLV(EMA(L,N),N6)*1.3,LLV(EMA(L,N),N6)*1.2));
YK480R:IF(TJ5,MA(C,480),(H480+L480)/2),COLORBLUE,LINETHICK2,PRECISION2;
更多股票公式相关资讯请关注南方财富网
股票入门声明:资讯来源于互联网,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。