设为首页加入收藏

微信关注
官方微信号:71712643
加关注获取每日精选资讯
股票入门欢迎您加入
广告服务联系我们网站地图

飞狐真正的月周日K线同图指标公式是什么?

2016-4-25 11:21:04 股票入门 http://rumen.southmoney.com

飞狐真正的月周日K线同图指标公式是什么?附:飞狐转折线主赚了又赚副公式源码  南方财富网小编为您提供


【飞狐真正的月周日K线同图指标公式】

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">{月 周 日 K线同图-按日历计算的真正的月 周 日 K线同图}
DRAWGBK(1,COLORRGB(20,20,110),COLORRGB(0,0,50),1);
TBS:=POW(10,ABS(LOG(MINDIFF)));
//月线
BY:=MONTH;YB:=BY-REF(BY,1)<>0 OR BARPOS=1;
w:BARSLAST(YB),LINETHICK;
dg:=w=0 or ISLASTBAR;
wx:=0*C;
for P=datacount-1 downto lbound(dg) do
if dg[P] then
wx[P]:=0;
else
wx[P]:=wx[P+1]+1;
r:=BACKSET(ISLASTBAR,w+1)-ISLASTBAR;
wx:=refx(wx,1)+r,LINETHICK;
oo:=ref(o,w);
hh:=hhv(h,w+1);
LL:=LLv(L,w+1);
月开:ROUND(OO*TBS)/TBS,LINETHICK;
月高:ROUND(refx(hh,wx)*TBS)/TBS,LINETHICK;
月低:ROUND(refx(LL,wx)*TBS)/TBS,LINETHICK;
月收:ROUND(refx(c,wx)*TBS)/TBS,LINETHICK;
f:=月收>月开 or (月收=月开 and 月收>ref(月收,W));
j:=cross(w,wx);
STICKLINE(w>=0 and f AND NOT(BY<>REF(BY,1) OR BY<>REFX(BY,1)),月低,月高,20,0),COLORMAGENTA;
STICKLINE(w>=0 and not(f) AND NOT(BY<>REF(BY,1) OR BY<>REFX(BY,1)),月低,月高,20,0)COLORFFDD00;{}
P:=BARPOS;
DRAWTEXT(w>0 and j,月高*1.01,'月'),COLOR00CCFF,ALIGN1;
DRAWNUMBER(w>0 and j,月高*1.01,BY,0),COLOR00CCFF,ALIGN2;
//
{周月K线}
//周线
BZ:=WEEKDAY;ZB:=DATEDIFF(REF(DATE,1),DATE)<>BZ-REF(BZ,1) OR BARPOS=1;
ZW:=BARSLAST(ZB),LINETHICK;
Zdg:=ZW=0 or ISLASTBAR;
Zwx:=0*c;
for P=datacount-1 downto lbound(Zdg) do
if Zdg[P] then
Zwx[P]:=0;
else
Zwx[P]:=Zwx[P+1]+1;
Zr:=BACKSET(ISLASTBAR,Zw+1)-ISLASTBAR;
Zwx:=refx(Zwx,1)+Zr,LINETHICK;
zq:=BARSLAST(ref(Zwx,1)=0 or BARPOS=1)+1;
Zo:=ref(o,Zw);
Zh:=hhv(h,Zw+1);
ZL:=LLv(L,Zw+1);
周开:ROUND(ZO*TBS)/TBS,LINETHICK;
周高:ROUND(refx(Zh,Zwx)*TBS)/TBS,,COLORFF,LINETHICK;
周低:ROUND(refx(ZL,Zwx)*TBS)/TBS,COLORFF00,LINETHICK;
周收:ROUND(refx(c,Zwx)*TBS)/TBS,,COLORFF00FF,LINETHICK;
Zf:=周收>周开 or (周收=周开 and 周收>ref(周收,Zw+1));
Zj:=cross(Zw,Zwx);
yt:=if(zq=1 and refx(zq,2)=1,13,if(refx(zq,1)=1 or zq=1,7,14));
//影线
STICKLINE(Zw>0 and Zf and Zj,周低,周高,1,0)COLORAAAAEE;
STICKLINE(周开<周收,周开,周收,YT,0),COLORAAAAEE;
STICKLINE(Zw>0 and not(Zf) and Zj,周低,周高,1,0)COLOREEAAAA;
STICKLINE(周开>周收,周开,周收,YT,0),COLOREEAAAA;
//日线
TJ:=CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1);
STICKLINE(TJ,LOW,HIGH,1,0),ColorE9;
STICKLINE(TJ,LOW,CLOSE,8,0),Color80;
STICKLINE(TJ,LOW,CLOSE,6,0),ColorA5;
STICKLINE(TJ,LOW,CLOSE,4,0),ColorC0;
STICKLINE(TJ,LOW,CLOSE,2,0),ColorE6;
STICKLINE(NOT(TJ),HIGH,LOW,1,0),ColorAA00;
STICKLINE(NOT(TJ),CLOSE,OPEN,8,0),Color5000;
STICKLINE(NOT(TJ),CLOSE,OPEN,6,0),Color6600;
STICKLINE(NOT(TJ),CLOSE,OPEN,4,0),Color8000;
STICKLINE(NOT(TJ),CLOSE,OPEN,2,0),ColorA000;



周框图引用公式:
{先建引用公式 名称: 引用4价}
C1:C;
O1:O;
H1:H;
L1:L;



{周框图-听雪寻股}
WC:="引用4价.C1#WEEK",LINETHICK0;
Wo:="引用4价.o1#WEEK",;
WH:="引用4价.h1#WEEK",LINETHICK0;
WL:="引用4价.l1#WEEK",LINETHICK0;
●周开:WO,LINETHICK0,COLOR00AAFF;
●周收:WC,LINETHICK0,COLORFF00FF;
●周高:WH,LINETHICK0,COLORRED;
●周低:WL,LINETHICK0,COLOR00FFFF;
BZ:=WEEKDAY;ZB:=DATEDIFF(REF(DATE,1),DATE)<>BZ-REF(BZ,1) OR BARPOS=1;
ZC:=WEEKDAY<REF(WEEKDAY,1)or zb;ZM:=REFX(zc,1) ;
TT:=BARSCOUNT(C)=1;
{周影线}
{STICKLINE(WC>=WO AND WEEKDAY=3 OR (REF(WEEKDAY,1)<3 AND WEEKDAY=4),WL,WH,0.1,0),LINEDOT,,COLOR9999DD;
STICKLINE(WC<WO AND WEEKDAY=3 OR (REF(WEEKDAY,1)<3 AND WEEKDAY=4),WL,WH,0.1,0),LINEDOT,,COLORDDAA88;}
STICKLINE(WC>=WO AND (ZC OR TT OR ZM OR ISLASTBAR) ,WL,WH,0.1,0),LINEDOT,COLOR9999DD;
STICKLINE(WC<WO AND (ZC OR TT OR ZM OR ISLASTBAR),WL,WH,0.1,0),LINEDOT,COLORDDAA88;
DRAWLINE(WC>=WO AND (ZC OR TT ),WH,WC>=WO AND (ZM OR ISLASTBAR) ,WH,0),LINEDOT,COLOR9999DD;
DRAWLINE(WC<WO AND (ZC OR TT ),WH,WC<WO AND (ZM OR ISLASTBAR) ,WH,0),LINEDOT,COLORDDAA88;
DRAWLINE(WC>=WO AND (ZC OR TT ),WL,WC>=WO AND (ZM OR ISLASTBAR) ,WL,0),LINEDOT,COLOR9999DD;
DRAWLINE(WC<WO AND (ZC OR TT ),WL,WC<WO AND (ZM OR ISLASTBAR) ,WL,0),LINEDOT,COLORDDAA88;

DRAWICON(h=wh,h*1.02,10);
DRAWICON(l=wl,l*0.98,12);

KLINE(O,H,L,C,0);
JC:=(REF(C,3)+REF(C,5)+REF(C,7)+REF(C,8)+REF(C,13)+REF(C,21))/6;
参考价:SMA(JC,5,1), CIRCLEDOT,COLORGREEN,;
价:IF(C>=参考价,参考价,0),CIRCLEDOT,COLOR0000FF,LINETHICK0;

附:【飞狐转折线主赚了又赚副公式源码】

转折线(主) + 赚了又赚(副) 源码

{转折线=三玩童}
AC:=CLOSE;
转强:=WMA(HIGH,5);
转弱:=WMA(LOW,5);
B:=CLOSE*0;
FOR I=13+1 TO DATACOUNT DO BEGIN 
IF AC[I]>转强[I-1] THEN 
B[I]:=1;ELSE 
IF AC[I]<转弱[I-1] THEN 
B[I]:=-1;ELSE 
B[I]:=B[I-1];
END;
转折线:IF(B=-1,MA(HIGH,4),MA(LOW,4)),LINETHICK;
PARTLINE(c>转折线,转折线),LINETHICK2,COLORMAGENTA;
PARTLINE(c<转折线,转折线),LINETHICK2,COLORCYAN;




{赚了又赚=愚叟}
ZF:=(C-REF(C,1))/REF(C,1)*100;
AA:EMA(EMA((C-REF(C,1)),6),6)*100/EMA(EMA(ABS((C-REF(C,1))),6),6)COLORGREEN,LINETHICK2;
DD:=LLV(AA,BARSLAST(AA<REF(AA,1))+1);
ZT:=BARSLAST(CROSS(AA,DD*0.66) AND AA<0 AND DD<-20);
收益:SUM(ZF,IF(ZT=0,1,ZT)),COLORRED,LINETHICK0;
MR:=CROSS(AA,DD*0.66) AND AA<0 AND DD<-20;
DRAWICON(MR,AA*0.8,25);
MC:=CROSS(DD,0) AND DD=AA;
DRAWICON(MC,AA*0.9,24);
DRAWTEXT(MC,AA*1.02,'快跑')COLORYELLOW;
DRAWTEXT(MR,AA,'买入')COLORRED;

更多飞狐指标公式相关资讯请关注南方财富网

股票入门声明:资讯来源于互联网,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。