软件名称:[B]函数PERIOD(周期类型)的妙用(知道就行)[/B]
软件类型:国产软件
运行环境:Win9X/Win2000/WinXP/Win2003/Win7/
软件语言:简体中文
授权方式:免费版
软件大小:2.00 KB
官方主页:Home Page
更新时间:2017-08-01 00:59:38
软件简介:
{周K线}
PPP:=0;{设定从倒数第PP根K线结束显示周线}
Q11:=90;{设定周K线显示根数为Q11}
Q12:=00;{设定月K线显示根数为Q12}
CCC:=AA.C1#WEEK;HHH:=AA.H1#WEEK;LLL:=AA.L1#WEEK;OO:=AA.O1#WEEK;
ZQZ:=TOTALBARSCOUNT;
ZQC:=BARSCOUNT(C);
KX1:=ZQZ-ZQC;{周K线显示开始位置}
K6:=AA.DT1#WEEK;{周K线周期}
Q:=IF(CONST(K6)<Q11,CONST(K6)+1,Q11);{如总周K小于Q11,显示根数改为总周K线+1根}
PP:=IF(ZQZ<PPP,ZQZ-Q,PPP);{如总K线小于开始位置,改周K线开始位置为总K线周期-Q}
K7:=K6>REF(K6,1);{周K线更后}
K8:=SUM(K7,0);{当前周K线位置}
K9:=CONST(K8)-K8;
W2:=KX1<PP+Q AND PERIOD=5;{周K线显示区域}
ZH:=ISLASTBAR;{www.70822.com}
SU:=IF(ZH,0,SUMBARS(K7,KX1-K9)-1);
C1:=REF(CCC,SU);O1:=REF(OO,SU);H1:=REF(HHH,SU);L11:=REF(LLL,SU);
RC:=REFX(C1,PP);RO:=REFX(O1,PP);RH:=REFX(H1,PP);RL:=REFX(L11,PP);
TJ4:=RC>=REF(RC,1); TJ5:=RC<REF(RC,1);
STICKLINE(W2 AND TJ4,RH,RL,0,0),COLORRED;
STICKLINE(W2 AND TJ5,RH,RL,0,0),COLORLIBLUE;
STICKLINE(W2 AND TJ4,RC,RO,2,1),COLORRED;
STICKLINE(W2 AND TJ5,RC,RO,2,0),COLORLIBLUE;
{www.70822.com}
HH1:=AA.H1#MONTH;LL1:=AA.L1#MONTH;
OO1:=AA.O1#MONTH;CCC1:=AA.C1#MONTH;
KK6:=AA.DT1#MONTH;{月K线周期}
P12:=PP-Q12-3;{设定从周K线结束位置隔3天开始显示月K线}
Q1:=IF(PP<PPP,CONST(KK6)+1,Q12);{如总月K小于Q12,显示根数改为总月K线+1根}
P1:=IF(PP<PPP,PP-Q1-2,P12);{如总K线小于开始位置,改月K线开始位置为总K线周期-Q1}
W22:=KX1<P1+Q1 AND PERIOD=5;{月K线显示区域}
KK7:=KK6>REF(KK6,1);{月K线更后}
KK8:=SUM(KK7,0);{当前月K线位置}
KK9:=CONST(KK8)-KK8;
SU1:=IF(ZH,0,SUMBARS(KK7,KX1-KK9)-1);
MC1:=REF(CCC1,SU1);MO1:=REF(OO1,SU1);MH1:=REF(HH1,SU1);ML1:=REF(LL1,SU1);
MRC:=REFX(MC1,P1);MRO:=REFX(MO1,P1);MRH:=REFX(MH1,P1);MRL:=REFX(ML1,P1);
MTJ4:=MRC>=REF(MRC,1); MTJ5:=MRC<REF(MRC,1);
STICKLINE(W22 AND MTJ4,MRH,MRL,0,0),COLORFF8080;
STICKLINE( W22 AND MTJ5,MRH,MRL,0,0),COLORFF8080;
STICKLINE(W22 AND MTJ4,MRC,MRO,3,1),COLORFF8080;
STICKLINE( W22 AND MTJ5,MRC,MRO,3,0),COLORFF8080;
A:=ALIGNRIGHT(IF(WEEKOFYEAR!=REF(WEEKOFYEAR,1),C#WEEK,DRAWNULL));
MA1:MA(A,5),COLORWHITE;{www.70822.com}
MA2:MA(A,10),COLORRED;
MA3:MA(A,20),COLOR6699FF;
[url=http://www.70822.com/soft/sort013/sort05/down-114521.html]函数PERIOD(周期类型)的妙用(知道就行)[/url]