在线检测未来函数

飞狐任意黄金分割主图指标公式

来源:Internet,编辑:股旁网,2016-03-02

INPUT:高(0,0,255),XS(0,0,3),调(0,0,2),F(0,0,255);
BQ:=IF((SYSPARAM(1) = (BARSSINCE((C > 0)) + 1)),1,0);
BQ1:=(H<REF(L,1));
BQ2:=(L>REF(H,1));
STICKLINE(BQ1,o+(c-o)*0.25,O,5,0),colorcc0000;
STICKLINE(BQ1,o+(c-o)*0.25,O,3,0),colordd0000;
STICKLINE(BQ1,o+(c-o)*0.25,O,1,0),coloree0000;
STICKLINE(BQ2,O,o+(c-o)*0.25,6,0),color208AAA;
STICKLINE(BQ2,O,o+(c-o)*0.25,4,0),color208DDD;
STICKLINE(BQ2 ,O,o+(c-o)*0.25,2,0),color208FFF;
DRAWTEXT(((BQ > 0) AND Bq1),H,'↓缺口'),colorFFFFEE,pxdn10,ALIGN2;
DRAWTEXT(((BQ > 0) AND Bq2),L,'↑缺口'),color00FFEE,pxup20,ALIGN1;
as:=(o+h+l+c)/4;
BL: eMA(as,F),linethick2,Color208FFF;
PARTLINE(BL<REF(BL,1),BL),colorff0000,linethick2;
BLT:=BARSTATUS=2;
DRAWTEXT(BLT AND BL>REF(BL,1),BL,'↑'+NUMTOSTR(f,0)+':'+NUMTOSTR(BL,2)),COLOR208fff;
DRAWTEXT(BLT AND BL<REF(BL,1),BL,'↓'+NUMTOSTR(f,0)+':'+NUMTOSTR(BL,2)),Color208FFF;
TTt:=ISLASTBAR=1;
A1:=((H-L)/L)*100;
A2:=H-L;
MAI:=C*1.015;
MAII:=C*1.03;
DRAWTEXTEX(TTT AND 调=0,0,310,5,'▼明短线赢利[1.5%--3%:]'+'/'+NUMTOSTR(MAI[SYSPARAM(1)],2)+'--'+NUMTOSTR(MAII [SYSPARAM(1)],2)),Color00dd00;
DRAWTEXTEX(TTt,0,176,5,'【振幅:'+NUMTOSTR(A1[SYSPARAM(1)],2)+'% '+NUMTOSTR(A2[SYSPARAM(1)],2)+'元 】'+''),Colordddd00;
DRAWTEXTEX(TTT,0,1,5,'【代码:'+STKLABEL+' 名称:'+STKNAME+'】'),Color00FFFF;
TA1:=BARPOS=SYSPARAM(1);
TA2:=BARPOS=SYSPARAM(3);
T1:=datacount-barpos+0;
T2:=DATEDIFF(date,CURRENTDATE);
X:=SYSPARAM(2);
X1:=SYSPARAM(3);
X2:=SYSPARAM(4);
X3:=SYSPARAM(5);
X4:=SYSPARAM(1);
YG:=REF(H,BARSLAST(TA1));
YD:=REF(L,BARSLAST(TA1));
N:=((X1 - X) + 1);
AHH:=HHV(H,N);
ZG:=ref(H,高);
BHH:=HHV(zg,1);
HH:=IF(高=0,AHH,BHH);
LL:=LLV(L,N);
GG:HH[X1],colorFF00FF;
DD1:LL[X1],colorff0000;
DD:=YD[X1],color005555,LINEDOT;
PARTLINE(YD,YD),LINETHICK1,COLOR00FF00;
DRAWTEXT(TA2,YD,'K线低--'+NUMTOSTR(YD,2)),COLORFFFFFF,ALIGN2,PXDN5;
//DRAWTEXT(TA2,YG,'K线高--'+NUMTOSTR(YG,2)),COLORFFFFFF,ALIGN2,PXDN5;
DRAWTEXT(TTT ,DD1,'最低'+NUMTOSTR(DD1,2)),ALIGN1,colorFFEE00,,pxup25;
DRAWTEXT(TTT ,GG,' 最高'+NUMTOSTR(GG,2)),ALIGN1,colorffaaaa,,pxDN5;
Q:=(DD + ((GG - DD) * 0.191));
Q2:=(DD + ((GG - DD) * 0.382));
Q3:=(DD + ((GG - DD) * 0.50));
Q4:=(DD + ((GG - DD) * 0.618));
Q5:=(DD + ((GG - DD) * 0.809));
Y_1:=REF(Q,BARSLAST(TA1));
Y_2:=REF(Q2,BARSLAST(TA1));
Y_3:=REF(Q3,BARSLAST(TA1));
Y_4:=REF(Q4,BARSLAST(TA1));
Y_5:=REF(Q5,BARSLAST(TA1));
PARTLINE(Y_1,Y_1),LINEDOT,Color005555;
PARTLINE(Y_2,Y_2),LINEDOT,Color005555;
PARTLINE(Y_3,Y_3),LINEDOT,Colordddddd;
PARTLINE(Y_4,Y_4),LINEDOT,Color005555;
PARTLINE(Y_5,Y_5),LINEDOT,Color005555;
DRAWTEXT(TA2,Q,NUMTOSTR(Q,2)+' :--0.191'),COLOR00bbbb,ALIGN2,PXDN5;
DRAWTEXT(TA2,Q2,NUMTOSTR(Q2,2)+' :--0.382'),COLOR00bbbb,ALIGN2,PXUP22;
DRAWTEXT(TA2,Q3,'★:('+NUMTOSTR(Q3,2)+') ←*1/2'),COLORFFFFFF,ALIGN2,PXDN5;
DRAWTEXT(TA2,Q4,NUMTOSTR(Q4,2)+' :--0.618'),COLOR00bbbb,ALIGN2,PXDN5;
DRAWTEXT(TA2,Q5,NUMTOSTR(Q5,2)+' :--0.809'),COLOR00bbbb,ALIGN2,PXDN5;
JN1:=dd+(HH-dd)*0.875; JN7:=dd+(HH-dd)*0.85; JN9:=dd+(HH-dd)*0.72; JN12:=dd+(HH-dd)*0.28;
JN14:=dd+(HH-dd)*0.75; JN8:=dd+(HH-dd)*0.78; JN2:=dd+(HH-dd)*0.667;
JN6:=dd+(HH-dd)*0.125; JN10:=dd+(HH-dd)*0.25; JN13:=dd+(HH-dd)*0.15;
JN3:=dd+(HH-dd)*0.333; HJ6:=dd+(HH-dd)*0.55; HJ7:=dd+(HH-dd)*0.45;
HJ13:=dd+(HH-dd)*0.98; HJ14:=dd+(HH-dd)*0.93; JN11:=dd+(HH-dd)*0.22;
TT6:=ISLASTBAR=1 AND XS=1;
TT7:=ISLASTBAR=1 AND XS=2;
TT8:=ISLASTBAR=1 AND XS=3;
DRAWTEXT(TT7,JN1,''+'7/8﹡→('+NUMTOSTR(JN1,2)+' '+'← *'),ALIGN2,Coloraa88aa,pxUP8;
DRAWTEXT(TT7,JN14,''+'6/8﹡→('+NUMTOSTR(JN14,2)+' '+'← *'),ALIGN2,Coloraa88aa,pxUP8;
DRAWTEXT(TT8,JN7,''+'85%﹡→('+NUMTOSTR(JN7,2)+''+'-----'),ALIGN2,Color208bbb,pxUP8;
DRAWTEXT(TT8,JN8,''+'78%﹡→('+NUMTOSTR(JN8,2)+''+'← '),ALIGN2,Color9bbb00,pxUP8;
DRAWTEXT(TT8,JN9,''+'72%﹡→('+NUMTOSTR(JN9,2)+''+'← '),ALIGN2,Color9bbb00,pxUP8;
DRAWTEXT(TT6 or tt7 or tt8,JN2,''+'2/3﹡→('+NUMTOSTR(JN2,2)+' '+'←-- *'),ALIGN2,Color00FF00,pxUP8;
DRAWTEXT(TT6 or tt7 or tt8,JN3,''+'1/3﹡→('+NUMTOSTR(JN3,2)+' '+'←-- *'),ALIGN2,Color00FF00,pxUP8;
DRAWTEXT(TT6 or tt7 or tt8,HJ6,''+'55%﹡→('+NUMTOSTR(HJ6,2)+''+'←'),ALIGN2,ColorAAAAAA,pxUP8;
DRAWTEXT(TT6 or tt7 or tt8,HJ7,''+'45%﹡→('+NUMTOSTR(HJ7,2)+''+'←'),ALIGN2,ColorAAAAAA,pxUP8;
DRAWTEXT(TT7,JN10,''+'2/8﹡→('+NUMTOSTR(JN10,2)+' '+'← *'),ALIGN2,Coloraa88aa,pxUP8;
DRAWTEXT(TT7,JN6,''+'1/8﹡→('+NUMTOSTR(JN6,2)+' '+'← *'),ALIGN2,Coloraa88aa,pxUP8;
DRAWTEXT(TT6 or tt7 or tt8,HJ13,''+'98%﹡→('+NUMTOSTR(HJ13,2)+''+'← '),ALIGN2,Colorcccc00,pxUP8;
//DRAWTEXT(TT6,HJ9,''+'95%('+NUMTOSTR(HJ9,2)+''+'←'),ALIGN2,ColorFFFF00,pxDN2;
DRAWTEXT(TT6 or tt7 or tt8,HJ14,''+'93%﹡→('+NUMTOSTR(HJ14,2)+''+'← '),ALIGN2,Colorcccc00,pxUP8;
DRAWTEXT(TT8,JN13,''+'15%﹡→('+NUMTOSTR(JN13,2)+''+'-----'),ALIGN2,Color208EEE,pxUP8;
DRAWTEXT(TT8,JN12,''+'28%﹡→('+NUMTOSTR(JN12,2)+''+'← '),ALIGN2,Color9FFF00,pxUP8;
DRAWTEXT(TT8,JN11,''+'22%﹡→('+NUMTOSTR(JN11,2)+''+'← '),ALIGN2,Color9FFF00,pxUP8;
//DRAWTEXT(TT6,HJ10,''+'10%﹡→('+NUMTOSTR(HJ10,2)+''+'← '),ALIGN2,ColorFFFF00,pxUP8;
//DRAWTEXT(TT6,HJ12,''+'8%﹡→('+NUMTOSTR(HJ12,2)+''+'← '),ALIGN2,ColorFFFF00,pxUP8;
//DRAWTEXT(TT6,HJ15,''+'3%﹡→('+NUMTOSTR(HJ15,2)+''+'← '),ALIGN2,ColorFFFF00,pxUP8;
TT4:=ISLASTBAR=1 and 调=1;
TT5:=ISLASTBAR=1 and 调=2;
GHJS1:=YD+(HH-YD)*1.191; GJNS1:=YD+(HH-YD)*1.333;
GHJS2:=YD+(HH-YD)*1.382; GJNS2:=YD+(HH-YD)*1.25;
GHJS3:=YD+(HH-YD)*1.03; GJNS3:=YD+(HH-YD)*1.15;
GHJS4:=YD+(HH-YD)*1.08; GJNS4:=YD+(HH-YD)*1.125;
GHJS5:=YD+(HH-YD)*1.45; GJNS5:=YD+(HH-YD)*1.22;
GHJS6:=YD+(HH-YD)*1.50; GJNS6:=YD+(HH-YD)*1.28;
DRAWTEXT(TT4,GHJS3,''+'3%﹡→('+NUMTOSTR(GHJS3,2)+''+'← '),ALIGN2,ColorAAAA00,pxUP8;
DRAWTEXT(TT4,GHJS4,''+'8%﹡→('+NUMTOSTR(GHJS4,2)+''+'← '),ALIGN2,ColorAAAA00,pxUP8;
DRAWTEXT(TT4,GJNS4,''+'1/8﹡→('+NUMTOSTR(GJNS4,2)+' '+'← *'),ALIGN2,ColorFFAAAA,pxUP8;
DRAWTEXT(TT4,GJNS3,''+'15%﹡→('+NUMTOSTR(GJNS3,2)+' '+'← *'),ALIGN2,Color208EEE,pxUP8;
DRAWTEXT(TT4,GHJS1,''+'19.1%﹡→('+NUMTOSTR(GHJS1,2)+' '+'←- *'),ALIGN2,Color00BBBB,pxUP8;
DRAWTEXT(TT4,GJNS5,''+'22%﹡→('+NUMTOSTR(GJNS5,2)+''+'← '),ALIGN2,Color9AAA00,pxUP8;
DRAWTEXT(TT4,GJNS2,''+'2/8﹡→('+NUMTOSTR(GJNS2,2)+' '+'← *'),ALIGN2,ColorFFAAAA,pxUP8;
DRAWTEXT(TT4,GJNS6,''+'28%﹡→('+NUMTOSTR(GJNS6,2)+''+'← '),ALIGN2,Color9AAA00,pxUP8;
DRAWTEXT(TT4,GJNS1,''+'1/3﹡→('+NUMTOSTR(GJNS1,2)+' '+'←-- *'),ALIGN2,Color00DD00,pxUP8;
DRAWTEXT(TT4,GHJS2,''+'38.2%﹡→('+NUMTOSTR(GHJS2,2)+' '+'←- *'),ALIGN2,Color00BBBB,pxUP8;
DRAWTEXT(TT4,GHJS5,''+'45%﹡→('+NUMTOSTR(GHJS5,2)+' '+'← *'),ALIGN2,ColorBBBBBB,pxUP8;
DRAWTEXT(TT4,GHJS6,''+'50%﹡→('+NUMTOSTR(GHJS6,2)+''+'﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊'),ALIGN2,ColorDDDDDD,pxDN2;
GHJ1:=HH+(YD-HH)*1.191; GJN1:=HH+(YD-HH)*1.333;
GHJ2:=HH+(YD-HH)*1.382; GJN2:=HH+(YD-HH)*1.25;
GHJ3:=HH+(YD-HH)*1.03; GJN3:=HH+(YD-HH)*1.15;
GHJ4:=HH+(YD-HH)*1.08; GJN4:=HH+(YD-HH)*1.125;
GHJ5:=HH+(YD-HH)*1.45; GJN5:=HH+(YD-HH)*1.22;
GHJ6:=HH+(YD-HH)*1.50; GJN6:=HH+(YD-HH)*1.28;
GHJ7:=HH+(YD-HH)*1.55; GJN7:=HH+(YD-HH)*1.667;
GHJ8:=HH+(YD-HH)*1.618; GJN8:=HH+(YD-HH)*1.75;
GHJ9:=HH+(YD-HH)*1.809;
DRAWTEXT(TT5,GHJ3,''+'3%﹡→('+NUMTOSTR(GHJ3,2)+''+'← '),ALIGN2,ColorDDDD00,pxUP8;
DRAWTEXT(TT5,GHJ4,''+'8%﹡→('+NUMTOSTR(GHJ4,2)+''+'← '),ALIGN2,ColorDDDD00,pxUP8;
DRAWTEXT(TT5,GJN4,''+'1/8﹡→('+NUMTOSTR(GJN4,2)+' '+'← *'),ALIGN2,Color208FFF,pxUP8;
DRAWTEXT(TT5,GJN3,''+'15%﹡→('+NUMTOSTR(GJN3,2)+' '+'← *'),ALIGN2,Color208EEE,pxDN2;
DRAWTEXT(TT5,GHJ1,''+'19.1%﹡→('+NUMTOSTR(GHJ1,2)+' '+'←- *'),ALIGN2,Color00FFFF,pxUP8;
DRAWTEXT(TT5,GJN5,''+'22%﹡→('+NUMTOSTR(GJN5,2)+''+'← '),ALIGN2,ColorFFFF00,pxUP8;
DRAWTEXT(TT5,GJN2,''+'2/8﹡→('+NUMTOSTR(GJN2,2)+' '+'← *'),ALIGN2,Color208FFF,pxUP8;
DRAWTEXT(TT5,GJN8,''+'6/8﹡→('+NUMTOSTR(GJN8,2)+' '+'← *'),ALIGN2,Color208FFF,pxUP8;
DRAWTEXT(TT5,GJN6,''+'28%﹡→('+NUMTOSTR(GJN6,2)+''+'← '),ALIGN2,ColorFFFF00,pxUP8;
DRAWTEXT(TT5,GJN1,''+'1/3﹡→('+NUMTOSTR(GJN1,2)+' '+'←-- *'),ALIGN2,Color00FF00,pxUP8;
DRAWTEXT(TT5,GJN7,''+'2/3﹡→('+NUMTOSTR(GJN7,2)+' '+'←-- *'),ALIGN2,Color00FF00,pxUP8;
DRAWTEXT(TT5,GHJ2,''+'38.2%﹡→('+NUMTOSTR(GHJ2,2)+' '+'←- *'),ALIGN2,Color00FFFF,pxUP8;
DRAWTEXT(TT5,GHJ5,''+'45%﹡→('+NUMTOSTR(GHJ5,2)+' '+'← *'),ALIGN2,ColorffFFff,pxUP8;
DRAWTEXT(TT5,GHJ6,''+'50%﹡→('+NUMTOSTR(GHJ6,2)+''+' ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄'),ALIGN2,ColorfffFFF,pxDN2;
DRAWTEXT(TT5,GHJ7,''+'55%﹡→('+NUMTOSTR(GHJ7,2)+' '+'← *'),ALIGN2,ColorffFFff,pxUP8;
DRAWTEXT(TT5,GHJ8,''+'61.8%﹡→('+NUMTOSTR(GHJ8,2)+''+' ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄'),ALIGN2,Color00FFff,pxDN2;
DRAWTEXT(TT5,GHJ9,''+'80.9%﹡→('+NUMTOSTR(GHJ9,2)+''+' ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄'),ALIGN2,Color00FFff,pxDN2;
D1:=HH-dd;
D2:=D1/hh*100;
Dz2:=D1/dd*100;
D3:=HH-L;
D4:=D3/HH*100;
D5:=HH-c;
D6:=D5/HH*100;
D7:=H-dd;
D8:=D7/dd*100;
D9:=C-dd;
D10:=D9/dd*100;
GH1:=dd+(HH-dd)*1.55;
GH2:=dd+(HH-dd)*1.618;
GH3:=dd+(HH-dd)*1.667;
GH4:=dd+(HH-dd)*1.75;
GH5:=dd+(HH-dd)*1.809;
GH6:=dd+(HH-dd)*1.875;
DRAWTEXTEX(TT4,0,327,1,'【突破后空间】55%:('+NUMTOSTR(GH1,2)+' 元)--0.618:('+NUMTOSTR(GH2,2)+' 元)--2/3('+NUMTOSTR(GH3,2)+' 元)'),Coloraaaaaa;
DRAWTEXTEX(TT4,0,327,16,' 6/8:('+NUMTOSTR(GH4,2)+' 元)--0.809:('+NUMTOSTR(GH5,2)+' 元)--7/8('+NUMTOSTR(GH6,2)+' 元)'),Color00bb00;
STICKLINE(TA1,gg,dd,0,0),LINETHICK0,COLORFFAAAA;
DRAWTEXT((BARPOS = SYSPARAM(1)),dd,'▲'),ALIGN0,color00FFdd,pxdn5;
DRAWTEXT(TA1,SYSPARAM(4),'\n \n \n \n \n \n \n \n ★交易天:'+NUMTOSTR(T1[SYSPARAM(1)],0)+'(天) / '+'◆自然天:'+NUMTOSTR(T2[SYSPARAM(1)],0)+'(天) '),COLORbbbbbb,PXDN107,align2;
DRAWTEXT(TA1,SYSPARAM(4),' \n \n \n \n \n \n \n \n 阶段高('+NUMTOSTR(HH,2)+' 元)'+'\n ----至 ---'+ '\n K线低('+NUMTOSTR(YD,2)+' 元)'+' \n 波幅:('+NUMTOSTR(Dz2,2)+' % -'+NUMTOSTR(D2,2)+' % )'+'-('+NUMTOSTR(D1,2)+' 元)'),COLOR00ee00,PXDN107,align2;
DRAWTEXT(TA1,SYSPARAM(4),' \n \n \n \n \n \n \n \n ' +' \n \n \n\n \n 【创于2010.06.06 草根】'),COLORFFFFFF,PXDN107,align2;

飞狐任意黄金分割主图指标公式

 

相关文章