请老师帮忙增加可以显示小数点后两位?谢谢 [博易POBO]
咨询内容:
CURRBARSCOUNT:=DATACOUNT-BARPOS+1;
KT:=BARSLAST(CURRBARSCOUNT=N);
GD:=REFX(IF(ISLASTBAR=1,HHV(H,KT),0),DATACOUNT-BARPOS-1);//{高点}
DD:=REFX(IF(ISLASTBAR=1,LLV(L,KT),0),DATACOUNT-BARPOS-1);//{低点}
KJ:=GD-DD;//{高低点差值=分区高度}
GD4:=IF(CURRBARSCOUNT<=N/30+16,GD,DRAWNULL);
高:=IF(CURRBARSCOUNT<=N/30+16,GD,DRAWNULL),COLORWHITE,COLOR00FFFF,PRECIS0;
低:=IF(CURRBARSCOUNT<=N/30+16,DD,DRAWNULL),COLORWHITE,COLORFFFF00,PRECIS0;
高区:IF(CURRBARSCOUNT<=N+16,GD,DRAWNULL),COLORWHITE,DASH,COLOR004080,PRECIS0;
低区:IF(CURRBARSCOUNT<=N+16,DD,DRAWNULL),COLORWHITE,DASH,COLOR004080,PRECIS0;
压力:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.764,DRAWNULL),COLORGREEN,COLOR00FF00,PRECIS0;
警示:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.618,DRAWNULL),COLOR00FFFF,PRECIS0;
突破:IF(CURRBARSCOUNT<=N/40+16,DD+KJ/2,DRAWNULL),COLORYELLOW,COLOR0000FF,PRECIS0;
强势:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.382,DRAWNULL),COLORFF00FF,PRECIS0;
支撑一:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.236,DRAWNULL),COLORRED,COLOR00FFFF,PRECIS0;
支撑二:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.191,DRAWNULL),COLORRED,COLOR00FFFF,PRECIS0;
低涨:IF(CURRBARSCOUNT<=N/40+16,(C/LLV(LOW,KT)-1)*100,DRAWNULL),COLORFF8000,COLOR0000FF,NODRAW,PRECIS0;
天数:BARSLAST(L=DD),COLORWHITE,NODRAW,PRECIS0;
//{STICKLINE1(CURRBARSCOUNT=N/30,GD,DD,0,0),COLORGREEN;
//STICKLINE1(CURRBARSCOUNT=1,GD,DD,0,0),COLORGREEN;}
STICKLINE(CURRBARSCOUNT<=N/30,支撑一,支撑一,14,0),COLORFF00FF;
STICKLINE(CURRBARSCOUNT<=N/30,支撑二,支撑二,14,0),COLORFF00FF;
STICKLINE(CURRBARSCOUNT<=N/30,强势,强势,14,0),COLORFF00FF;
STICKLINE(CURRBARSCOUNT<=N/30,突破,突破,14,0),COLORABABAB;
STICKLINE(CURRBARSCOUNT<=N/30,警示,警示,14,0),COLOR00FFFF;
STICKLINE(CURRBARSCOUNT<=N/30,压力,压力,14,0),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=N/40+16,压力,'压力:764'),COLORMAGENTA,FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,警示,'警示:618'),FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,突破,'突破:500'),FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,强势,'强势:382'),FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,支撑一,'支撑一:236'),FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,支撑二,'支撑二:191'),FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,低,'低位:000'),FONTSIZE10,ALIGN2,VALIGN1;
M:=BARSLAST(CURRBARSCOUNT=N);
平衡:=IF(CURRBARSCOUNT<=N,DD+KJ/2,DRAWNULL),COLORWHITE,POINTDOT,COLOR004080,PRECIS0;
CD:=CURRBARSCOUNT,NODRAW;
STICKLINE(CD=46,HHV(高区,60),LLV(低区,60),10,1),COLORBLACK,COLOR004080;
STICKLINE(CD=120,HHV(高区,60),LLV(低区,60),10,1),COLORBLUE,COLOR004080;
STICKLINE(CD=1,HHV(高区,60),LLV(低区,60),0.10,1),COLOR000000,COLOR004080;
DRAWNUMBER(ISLASTBAR,GD,GD,0),COLORWHITE,FONTSIZE15,ALIGN0,VALIGN1;
DRAWNUMBER(ISLASTBAR,DD,DD,0),COLORWHITE,FONTSIZE15,ALIGN0,VALIGN1
CURRBARSCOUNT:=DATACOUNT-BARPOS+1;
KT:=BARSLAST(CURRBARSCOUNT=N);
GD:=REFX(IF(ISLASTBAR=1,HHV(H,KT),0),DATACOUNT-BARPOS-1);//{高点}
DD:=REFX(IF(ISLASTBAR=1,LLV(L,KT),0),DATACOUNT-BARPOS-1);//{低点}
KJ:=GD-DD;//{高低点差值=分区高度}
GD4:=IF(CURRBARSCOUNT<=N/30+16,GD,DRAWNULL);
高:=IF(CURRBARSCOUNT<=N/30+16,GD,DRAWNULL),COLORWHITE,COLOR00FFFF,PRECIS0;
低:=IF(CURRBARSCOUNT<=N/30+16,DD,DRAWNULL),COLORWHITE,COLORFFFF00,PRECIS0;
高区:IF(CURRBARSCOUNT<=N+16,GD,DRAWNULL),COLORWHITE,DASH,COLOR004080,PRECIS0;
低区:IF(CURRBARSCOUNT<=N+16,DD,DRAWNULL),COLORWHITE,DASH,COLOR004080,PRECIS0;
压力:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.764,DRAWNULL),COLORGREEN,COLOR00FF00,PRECIS0;
警示:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.618,DRAWNULL),COLOR00FFFF,PRECIS0;
突破:IF(CURRBARSCOUNT<=N/40+16,DD+KJ/2,DRAWNULL),COLORYELLOW,COLOR0000FF,PRECIS0;
强势:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.382,DRAWNULL),COLORFF00FF,PRECIS0;
支撑一:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.236,DRAWNULL),COLORRED,COLOR00FFFF,PRECIS0;
支撑二:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.191,DRAWNULL),COLORRED,COLOR00FFFF,PRECIS0;
低涨:IF(CURRBARSCOUNT<=N/40+16,(C/LLV(LOW,KT)-1)*100,DRAWNULL),COLORFF8000,COLOR0000FF,NODRAW,PRECIS0;
天数:BARSLAST(L=DD),COLORWHITE,NODRAW,PRECIS0;
//{STICKLINE1(CURRBARSCOUNT=N/30,GD,DD,0,0),COLORGREEN;
//STICKLINE1(CURRBARSCOUNT=1,GD,DD,0,0),COLORGREEN;}
STICKLINE(CURRBARSCOUNT<=N/30,支撑一,支撑一,14,0),COLORFF00FF;
STICKLINE(CURRBARSCOUNT<=N/30,支撑二,支撑二,14,0),COLORFF00FF;
STICKLINE(CURRBARSCOUNT<=N/30,强势,强势,14,0),COLORFF00FF;
STICKLINE(CURRBARSCOUNT<=N/30,突破,突破,14,0),COLORABABAB;
STICKLINE(CURRBARSCOUNT<=N/30,警示,警示,14,0),COLOR00FFFF;
STICKLINE(CURRBARSCOUNT<=N/30,压力,压力,14,0),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=N/40+16,压力,'压力:764'),COLORMAGENTA,FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,警示,'警示:618'),FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,突破,'突破:500'),FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,强势,'强势:382'),FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,支撑一,'支撑一:236'),FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,支撑二,'支撑二:191'),FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,低,'低位:000'),FONTSIZE10,ALIGN2,VALIGN1;
M:=BARSLAST(CURRBARSCOUNT=N);
平衡:=IF(CURRBARSCOUNT<=N,DD+KJ/2,DRAWNULL),COLORWHITE,POINTDOT,COLOR004080,PRECIS0;
CD:=CURRBARSCOUNT,NODRAW;
STICKLINE(CD=46,HHV(高区,60),LLV(低区,60),10,1),COLORBLACK,COLOR004080;
STICKLINE(CD=120,HHV(高区,60),LLV(低区,60),10,1),COLORBLUE,COLOR004080;
STICKLINE(CD=1,HHV(高区,60),LLV(低区,60),0.10,1),COLOR000000,COLOR004080;
DRAWNUMBER(ISLASTBAR,GD,GD,2),COLORWHITE,FONTSIZE15,ALIGN0,VALIGN1;
DRAWNUMBER(ISLASTBAR,DD,DD,2),COLORWHITE,FONTSIZE15,ALIGN0,VALIGN1 老师,再烦请将以下几个可以显示小数点后两位?谢谢!
压力:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.764,DRAWNULL),COLORGREEN,COLOR00FF00,PRECIS0;
警示:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.618,DRAWNULL),COLOR00FFFF,PRECIS0;
突破:IF(CURRBARSCOUNT<=N/40+16,DD+KJ/2,DRAWNULL),COLORYELLOW,COLOR0000FF,PRECIS0;
强势:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.382,DRAWNULL),COLORFF00FF,PRECIS0;
支撑一:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.236,DRAWNULL),COLORRED,COLOR00FFFF,PRECIS0;
支撑二:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.191,DRAWNULL),COLORRED,COLOR00FFFF,PRECIS0; 来源 程序化久久网
请老师帮忙增加可以显示小数点后两位?谢谢
N:=120;CURRBARSCOUNT:=DATACOUNT-BARPOS+1;
KT:=BARSLAST(CURRBARSCOUNT=N);
GD:=REFX(IF(ISLASTBAR=1,HHV(H,KT),0),DATACOUNT-BARPOS-1);//{高点}
DD:=REFX(IF(ISLASTBAR=1,LLV(L,KT),0),DATACOUNT-BARPOS-1);//{低点}
KJ:=GD-DD;//{高低点差值=分区高度}
GD4:=IF(CURRBARSCOUNT<=N/30+16,GD,DRAWNULL);
高:=IF(CURRBARSCOUNT<=N/30+16,GD,DRAWNULL),COLORWHITE,COLOR00FFFF,PRECIS0;
低:=IF(CURRBARSCOUNT<=N/30+16,DD,DRAWNULL),COLORWHITE,COLORFFFF00,PRECIS0;
高区:IF(CURRBARSCOUNT<=N+16,GD,DRAWNULL),COLORWHITE,DASH,COLOR004080,PRECIS0;
低区:IF(CURRBARSCOUNT<=N+16,DD,DRAWNULL),COLORWHITE,DASH,COLOR004080,PRECIS0;
压力:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.764,DRAWNULL),COLORGREEN,COLOR00FF00,PRECIS0;
警示:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.618,DRAWNULL),COLOR00FFFF,PRECIS0;
突破:IF(CURRBARSCOUNT<=N/40+16,DD+KJ/2,DRAWNULL),COLORYELLOW,COLOR0000FF,PRECIS0;
强势:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.382,DRAWNULL),COLORFF00FF,PRECIS0;
支撑一:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.236,DRAWNULL),COLORRED,COLOR00FFFF,PRECIS0;
支撑二:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.191,DRAWNULL),COLORRED,COLOR00FFFF,PRECIS0;
低涨:IF(CURRBARSCOUNT<=N/40+16,(C/LLV(LOW,KT)-1)*100,DRAWNULL),COLORFF8000,COLOR0000FF,NODRAW,PRECIS0;
天数:BARSLAST(L=DD),COLORWHITE,NODRAW,PRECIS0;
//{STICKLINE1(CURRBARSCOUNT=N/30,GD,DD,0,0),COLORGREEN;
//STICKLINE1(CURRBARSCOUNT=1,GD,DD,0,0),COLORGREEN;}
STICKLINE(CURRBARSCOUNT<=N/30,支撑一,支撑一,14,0),COLORFF00FF;
STICKLINE(CURRBARSCOUNT<=N/30,支撑二,支撑二,14,0),COLORFF00FF;
STICKLINE(CURRBARSCOUNT<=N/30,强势,强势,14,0),COLORFF00FF;
STICKLINE(CURRBARSCOUNT<=N/30,突破,突破,14,0),COLORABABAB;
STICKLINE(CURRBARSCOUNT<=N/30,警示,警示,14,0),COLOR00FFFF;
STICKLINE(CURRBARSCOUNT<=N/30,压力,压力,14,0),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=N/40+16,压力,'压力:764'),COLORMAGENTA,FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,警示,'警示:618'),FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,突破,'突破:500'),FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,强势,'强势:382'),FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,支撑一,'支撑一:236'),FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,支撑二,'支撑二:191'),FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,低,'低位:000'),FONTSIZE10,ALIGN2,VALIGN1;
M:=BARSLAST(CURRBARSCOUNT=N);
平衡:=IF(CURRBARSCOUNT<=N,DD+KJ/2,DRAWNULL),COLORWHITE,POINTDOT,COLOR004080,PRECIS0;
CD:=CURRBARSCOUNT,NODRAW;
STICKLINE(CD=46,HHV(高区,60),LLV(低区,60),10,1),COLORBLACK,COLOR004080;
STICKLINE(CD=120,HHV(高区,60),LLV(低区,60),10,1),COLORBLUE,COLOR004080;
STICKLINE(CD=1,HHV(高区,60),LLV(低区,60),0.10,1),COLOR000000,COLOR004080;
DRAWNUMBER(ISLASTBAR,GD,GD,0),COLORWHITE,FONTSIZE15,ALIGN0,VALIGN1;
DRAWNUMBER(ISLASTBAR,DD,DD,0),COLORWHITE,FONTSIZE15,ALIGN0,VALIGN1
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: N:=120;CURRBARSCOUNT:=DATACOUNT-BARPOS+1;
KT:=BARSLAST(CURRBARSCOUNT=N);
GD:=REFX(IF(ISLASTBAR=1,HHV(H,KT),0),DATACOUNT-BARPOS-1);//{高点}
DD:=REFX(IF(ISLASTBAR=1,LLV(L,KT),0),DATACOUNT-BARPOS-1);//{低点}
KJ:=GD-DD;//{高低点差值=分区高度}
GD4:=IF(CURRBARSCOUNT<=N/30+16,GD,DRAWNULL);
高:=IF(CURRBARSCOUNT<=N/30+16,GD,DRAWNULL),COLORWHITE,COLOR00FFFF,PRECIS0;
低:=IF(CURRBARSCOUNT<=N/30+16,DD,DRAWNULL),COLORWHITE,COLORFFFF00,PRECIS0;
高区:IF(CURRBARSCOUNT<=N+16,GD,DRAWNULL),COLORWHITE,DASH,COLOR004080,PRECIS0;
低区:IF(CURRBARSCOUNT<=N+16,DD,DRAWNULL),COLORWHITE,DASH,COLOR004080,PRECIS0;
压力:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.764,DRAWNULL),COLORGREEN,COLOR00FF00,PRECIS0;
警示:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.618,DRAWNULL),COLOR00FFFF,PRECIS0;
突破:IF(CURRBARSCOUNT<=N/40+16,DD+KJ/2,DRAWNULL),COLORYELLOW,COLOR0000FF,PRECIS0;
强势:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.382,DRAWNULL),COLORFF00FF,PRECIS0;
支撑一:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.236,DRAWNULL),COLORRED,COLOR00FFFF,PRECIS0;
支撑二:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.191,DRAWNULL),COLORRED,COLOR00FFFF,PRECIS0;
低涨:IF(CURRBARSCOUNT<=N/40+16,(C/LLV(LOW,KT)-1)*100,DRAWNULL),COLORFF8000,COLOR0000FF,NODRAW,PRECIS0;
天数:BARSLAST(L=DD),COLORWHITE,NODRAW,PRECIS0;
//{STICKLINE1(CURRBARSCOUNT=N/30,GD,DD,0,0),COLORGREEN;
//STICKLINE1(CURRBARSCOUNT=1,GD,DD,0,0),COLORGREEN;}
STICKLINE(CURRBARSCOUNT<=N/30,支撑一,支撑一,14,0),COLORFF00FF;
STICKLINE(CURRBARSCOUNT<=N/30,支撑二,支撑二,14,0),COLORFF00FF;
STICKLINE(CURRBARSCOUNT<=N/30,强势,强势,14,0),COLORFF00FF;
STICKLINE(CURRBARSCOUNT<=N/30,突破,突破,14,0),COLORABABAB;
STICKLINE(CURRBARSCOUNT<=N/30,警示,警示,14,0),COLOR00FFFF;
STICKLINE(CURRBARSCOUNT<=N/30,压力,压力,14,0),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=N/40+16,压力,'压力:764'),COLORMAGENTA,FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,警示,'警示:618'),FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,突破,'突破:500'),FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,强势,'强势:382'),FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,支撑一,'支撑一:236'),FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,支撑二,'支撑二:191'),FONTSIZE10,ALIGN2,VALIGN1;
DRAWTEXT(CURRBARSCOUNT=N/40+16,低,'低位:000'),FONTSIZE10,ALIGN2,VALIGN1;
M:=BARSLAST(CURRBARSCOUNT=N);
平衡:=IF(CURRBARSCOUNT<=N,DD+KJ/2,DRAWNULL),COLORWHITE,POINTDOT,COLOR004080,PRECIS0;
CD:=CURRBARSCOUNT,NODRAW;
STICKLINE(CD=46,HHV(高区,60),LLV(低区,60),10,1),COLORBLACK,COLOR004080;
STICKLINE(CD=120,HHV(高区,60),LLV(低区,60),10,1),COLORBLUE,COLOR004080;
STICKLINE(CD=1,HHV(高区,60),LLV(低区,60),0.10,1),COLOR000000,COLOR004080;
DRAWNUMBER(ISLASTBAR,GD,GD,2),COLORWHITE,FONTSIZE15,ALIGN0,VALIGN1;
DRAWNUMBER(ISLASTBAR,DD,DD,2),COLORWHITE,FONTSIZE15,ALIGN0,VALIGN1 老师,再烦请将以下几个可以显示小数点后两位?谢谢!
压力:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.764,DRAWNULL),COLORGREEN,COLOR00FF00,PRECIS0;
警示:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.618,DRAWNULL),COLOR00FFFF,PRECIS0;
突破:IF(CURRBARSCOUNT<=N/40+16,DD+KJ/2,DRAWNULL),COLORYELLOW,COLOR0000FF,PRECIS0;
强势:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.382,DRAWNULL),COLORFF00FF,PRECIS0;
支撑一:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.236,DRAWNULL),COLORRED,COLOR00FFFF,PRECIS0;
支撑二:IF(CURRBARSCOUNT<=N/40+16,DD+KJ*0.191,DRAWNULL),COLORRED,COLOR00FFFF,PRECIS0; 来源 程序化久久网
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容