文章教程

飞狐很好很全的分割主图指标公式

5/13/2018 10:06:25 PM 人评论 次浏览

HH:=SYSPARAM(4);
LL:=SYSPARAM(5);
P16:=(LL + ((HH - LL) * 0.625));
P17:=(LL + ((HH - LL) * 0.375));
P7:=(LL + ((HH - LL) * 0.875));
P8:=(LL + ((HH - LL) * 0.667));
P10:=(LL + ((HH - LL) * 0.333));
P11:=(LL + ((HH - LL) * 0.125));
DRAWTEXT((ISLASTBAR = 1),P7,(' ▲87.5%:' + NUMTOSTR(P7,2))),ALIGN2,color84C1FF;
DRAWTEXT((ISLASTBAR = 1),P8,(' ▲66.7%:' + NUMTOSTR(P8,2))),ALIGN2,color84C1FF;
DRAWTEXT((ISLASTBAR = 1),P10,(' ▲33.3%:' + NUMTOSTR(P10,2))),ALIGN2,colorFFFF00;
DRAWTEXT((ISLASTBAR = 1),P11,(' ▲12.5%:' + NUMTOSTR(P11,2))),ALIGN2,colorFFFF00;
DRAWTEXT((ISLASTBAR = 1),P16,(' ⊙62.5%:' + NUMTOSTR(P16,2))),ALIGN2,colorFF00;
DRAWTEXT((ISLASTBAR = 1),P17,(' ⊙37.5%:' + NUMTOSTR(P17,2))),ALIGN2,colorFF00;
NNL:=(BARPOS = SYSPARAM(3));
江05:(LL + ((HH - LL) * 0.05)),COLOR0010FF,linethick2;
江10:(LL + ((HH - LL) * 0.1));
黄191:(LL + ((HH - LL) * 0.191)),COLOR0010FF,linethick2;
江22:(LL + ((HH - LL) * 0.22));
江25:(LL + ((HH - LL) * 0.25));
江28:(LL + ((HH - LL) * 0.28)),COLOR0010FF,linethick2;
黄甘337:(LL + ((HH - LL) * 0.337));
黄382:(LL + ((HH - LL) * 0.382));
甘氏45:(LL + ((HH - LL) * 0.45)),COLOR0010FF,linethick2;
黄500:(LL + ((HH - LL) * 0.5)),COLOR0010FF,linethick2;
黄618:(LL + ((HH - LL) * 0.618));
黄甘667:(LL + ((HH - LL) * 0.667)),COLOR0010FF,linethick2;
黄甘75:(LL + ((HH - LL) * 0.75));
黄809:(LL + ((HH - LL) * 0.809)),COLOR0010FF,linethick2;
江55:(LL + ((HH - LL) * 0.55));
江75:(LL + ((HH - LL) * 0.75));
江78:(LL + ((HH - LL) * 0.78));
江85:(LL + ((HH - LL) * 0.85));
江90:(LL + ((HH - LL) * 0.9)),COLOR0010FF,linethick2;
DRAWTEXT((SYSPARAM(2) = BARPOS),(LL + ((HH - LL) * 0.05)),(('江恩05%(' + NUMTOSTR(江05,2)) + ')')),color84C1FF;
DRAWTEXT((SYSPARAM(2) = BARPOS),(LL + ((HH - LL) * 0.1)),(('江恩10%(' + NUMTOSTR(江10,2)) + ')')),color84C1FF;
DRAWTEXT((SYSPARAM(2) = BARPOS),(LL + ((HH - LL) * 0.22)),(('江恩22%(' + NUMTOSTR(江22,2)) + ')')),color84C1FF;
DRAWTEXT((SYSPARAM(2) = BARPOS),(LL + ((HH - LL) * 0.25)),(('江恩25%(' + NUMTOSTR(江25,2)) + ')')),color84C1FF;
DRAWTEXT((SYSPARAM(2) = BARPOS),(LL + ((HH - LL) * 0.28)),(('江恩28%(' + NUMTOSTR(江28,2)) + ')')),COLOR0010FF;
DRAWTEXT((SYSPARAM(2) = BARPOS),(LL + ((HH - LL) * 0.55)),(('江恩55%(' + NUMTOSTR(江55,2)) + ')')),color84C1FF;
DRAWTEXT((SYSPARAM(2) = BARPOS),(LL + ((HH - LL) * 0.191)),(('黄金19.1%(' + NUMTOSTR(黄191,2)) + ')')),colorFFFF;
DRAWTEXT((SYSPARAM(2) = BARPOS),(LL + ((HH - LL) * 0.45)),(('甘氏45%(' + NUMTOSTR(甘氏45,2)) + ')')),COLOR0010FF;
DRAWTEXT((SYSPARAM(2) = BARPOS),(LL + ((HH - LL) * 0.382)),(('★黄金38.2%(' + NUMTOSTR(黄382,2)) + ')')),colorFFFF;
DRAWTEXT((SYSPARAM(2) = BARPOS),(LL + ((HH - LL) * 0.337)),(('黄甘33.7%(' + NUMTOSTR(黄甘337,2)) + ')')),colorFFFF;
DRAWTEXT((SYSPARAM(2) = BARPOS),(LL + ((HH - LL) * 0.5)),(('黄金强弱分界(' + NUMTOSTR(黄500,2)) + ')')),COLOR0010FF;
DRAWTEXT((SYSPARAM(2) = BARPOS),(LL + ((HH - LL) * 0.618)),(('★黄金61.8%(' + NUMTOSTR(黄618,2)) + ')')),colorFFFF;
DRAWTEXT((SYSPARAM(2) = BARPOS),(LL + ((HH - LL) * 0.667)),(('黄甘66.7%(' + NUMTOSTR(黄甘667,2)) + ')')),colorFFFF;
DRAWTEXT((SYSPARAM(2) = BARPOS),(LL + ((HH - LL) * 0.75)),(('江恩75%(' + NUMTOSTR(江75,2)) + ')')),colorDAFC8B;
DRAWTEXT((SYSPARAM(2) = BARPOS),(LL + ((HH - LL) * 0.78)),(('江恩78%(' + NUMTOSTR(江78,2)) + ')')),colorDAFC8B;
DRAWTEXT((SYSPARAM(2) = BARPOS),(LL + ((HH - LL) * 0.809)),(('黄金80.9%(' + NUMTOSTR(黄809,2)) + ')')),colorFFFF;
DRAWTEXT((SYSPARAM(2) = BARPOS),(LL + ((HH - LL) * 0.85)),(('江恩85%(' + NUMTOSTR(江85,2)) + ')')),colorDAFC8B;
DRAWTEXT((SYSPARAM(2) = BARPOS),(LL + ((HH - LL) * 0.9)),(('江恩90%(' + NUMTOSTR(江90,2)) + ')')),colorDAFC8B;
DRAWTEXT((SYSPARAM(2) = BARPOS),(LL + ((HH - LL) * 0.999)),(('最高价¥(' + NUMTOSTR(HH,2)) + ')')),colorFF00FF;
DRAWTEXT((SYSPARAM(2) = BARPOS),(LL + ((HH - LL) * 0.0000)),(('最低价¥(' + NUMTOSTR(LL,2)) + ')')),colorFFFF00;
LL+((HH-LL)*0.764),pointdot,linethick1,coloryellow;
DRAWTEXT(c>0 and ISLASTBAR=1,LL+((HH-LL)*0.764),' 0.764↑'),color009999;
LL+((HH-LL)*0.236),pointdot,linethick1,coloryellow;
DRAWTEXT(c>0 and ISLASTBAR=1,LL+((HH-LL)*0.236),' 0.236↑'),color009999;
Input:
左侧右移(5,0,100,1),
右侧左移(0,0,100,1),
开关(1,1,2,1),
N(30,1,1000,1),
M(5,1,365,1);
t1:=barpos=sysparam(2)+左侧右移;
t2:=barpos=sysparam(3)-右侧左移;
t11:=sysparam(2)+左侧右移;
t21:=sysparam(3)-右侧左移;
ymd:=date;
D1:=ymd[t11],linethick0;
D2:=ymd[t21],linethick0;
间隔:=t21-t11,linethick0;
x1:=间隔*(0.191);
x8:=间隔*(0.382);
x05:=间隔*(0.5);
x3:=间隔*(0.618);
x5:=间隔*(0.809);
x1831:=sysparam(2)+左侧右移+ROUND(x1);
tx1:=BARPOS=x1831;
VERTLINE(tx1),colorffff33,LINEDOT;
D191:=ymd[x1831],linethick0;
x1838:=t11+ROUND(x8);
tx8:=BARPOS=x1838;
VERTLINE(tx8),color00aaaa,LINEDOT;
D382:=ymd[x1838],linethick0;
x18305:=t11+ROUND(x05);
tx05:=BARPOS=x18305;
VERTLINE(tx05),color0000ff,LINEDOT;
D05:=ymd[x18305],linethick0;
x1833:=t11+ROUND(x3);
tx3:=BARPOS=x1833;
VERTLINE(tx3),color00aaaa,LINEDOT;
D618:=ymd[x1833],linethick0;
x1835:=t11+ROUND(x5);
tx5:=BARPOS=x1835;
VERTLINE(tx5),colorffff33,LINEDOT;
D809:=ymd[x1835],linethick0;
ph:=SYSPARAM(4);
pl:=SYSPARAM(5);
drawtext(t1,ph*0.99,'0点'),color00ffff;
drawtext(t2,ph*0.99,'100%'),color00ffff,align2;
drawtext(tx1,ph*0.99,'0.191'),colorffff33;
drawtext(tx8,ph*0.99,'0.382'),color00aaaa;
drawtext(tx05,ph*0.99,'0.5'),color0000ff;
drawtext(tx3,ph*0.99,'0.618'),color00aaaa;
drawtext(tx5,ph*0.99,'0.809'),colorffff33;
input:k(1,1,3,1);
hh:= SYSPARAM(4);
ll:= SYSPARAM(5);
HL:=hh-ll;
wH := BARSlast(H=hh);
wL :=BARSlast(L=ll);
KK := wH-wL;
a1 :=if(kk<0,hh- HL*0.25,ll+HL*0.25);
a2 :=if(kk<0,hh- HL*0.75,ll+HL*0.75);
a3 :=if(kk<0,hh- HL*0.3125,ll+HL*0.3125);
mHL:= hh-HL*0.5;b1:=if(kk<0,hh- HL*0.125,ll+HL*0.125);b2:=if(kk<0,hh- HL*0.0625,ll+HL*0.0625);b3:=if(kk<0,hh- HL*0.375,ll+HL*0.375);b4:=if(kk<0,hh- HL*0.625,ll+HL*0.625);
b5:=if(kk<0,hh- HL*0.1875,ll+HL*0.1875);b6:=if(kk<0,hh- HL*0.875,ll+HL*0.875);b7:=if(kk<0,hh- HL*0.4375,ll+HL*0.4375);b8:=if(kk<0,hh- HL*0.5625,ll+HL*0.5625);
b9:=if(kk<0,hh- HL*0.6875,ll+HL*0.6875);b10:=if(kk<0,hh- HL*0.9375,ll+HL*0.9375);b11:=if(kk<0,hh- HL*0.8125,ll+HL*0.8125);A := islastbar;
DRAWTEXT(A and K<>3,HH, ' 最高价:'+NUMTOSTR(HH,2)),ALIGN2,colorred;DRAWTEXT(A and K<>3,LL, ' 最低价:'+NUMTOSTR(ll,2)),ALIGN2,,COLORCYAN;
DRAWTEXT(A and K<>3,mHL,' 50%:'+NUMTOSTR(mHL,2)),ALIGN2,coloryellow;DRAWTEXT(A and K=1, a1, ' 25%:'+NUMTOSTR(a1,2)),ALIGN2,coloryellow;
DRAWTEXT(A and K=1, a2, ' 75%:'+NUMTOSTR(a2,2)),ALIGN2,colorgreen;DRAWTEXT(A and K=1, a3, ' 31.25%:'+NUMTOSTR(a3,3)),ALIGN2,COLORGRAY;
DRAWTEXT(A and K=1, b1, ' 12.5%:'+NUMTOSTR(b1,2)),ALIGN2,COLORGRAY;DRAWTEXT(A and K=1, b2, ' 6.25%:'+NUMTOSTR(b2,2)),ALIGN2,COLORGRAY;
DRAWTEXT(A and K=1, b3, ' 37.5%:'+NUMTOSTR(b3,2)),ALIGN2,COLORGRAY;DRAWTEXT(A and K=1, b4, ' 62.5%:'+NUMTOSTR(b4,2)),ALIGN2,COLORGRAY;
DRAWTEXT(A and K=1, b5, ' 18.75%:'+NUMTOSTR(b5,3)),ALIGN2,COLORGRAY;DRAWTEXT(A and K=1, b6, ' 87.5%:'+NUMTOSTR(b6,2)),ALIGN2,COLORGRAY;
DRAWTEXT(A and K=1, b7, ' 43.75%:'+NUMTOSTR(b7,2)),ALIGN2,COLORGRAY;DRAWTEXT(A and K=1, b8, ' 56.25%:'+NUMTOSTR(b8,2)),ALIGN2,COLORGRAY;
DRAWTEXT(A and K=1, b9, ' 68.75%:'+NUMTOSTR(b9,2)),ALIGN2,COLORGRAY;DRAWTEXT(A and K=1, b10, ' 93.75%:'+NUMTOSTR(b10,2)),ALIGN2,COLORGRAY;
DRAWTEXT(A and K=1, b11, ' 81.25:'+NUMTOSTR(b11,2)),ALIGN2,COLORGRAY;
STICKLINE(C>=O,C,O,8,0),COLOR0000AA;
STICKLINE(C>=O,C,O,6,0),COLOR0000bb ;
STICKLINE(C>=O,C,O,4,0),COLOR0000cc ;
STICKLINE(C>=O,C,O,2,0),COLOR0000ee;
STICKLINE(C>=O,H,L,0,0),COLOR0000ff;
STICKLINE(C<=O,C,O,8,0),Color7B7b00;
STICKLINE(C<=O,C,O,6,0),Color909000;
STICKLINE(C<=O,C,O,4,0),ColorA8a800;
STICKLINE(C<=O,C,O,2,0),COLORcece00;
STICKLINE(C<=O,H,L,0,0),COLORffff00;

飞狐很好很全的分割主图指标公式

教程类别