赢在起点主图中长线趋势指标源码分享

现手买:=BUYVOL*DYNAINFO(7)*100/10000 COLOR0000FF,NODRAW;
现手卖:=SELLVOL*DYNAINFO(7)*100/10000 COLOR00FF00,NODRAW;
合:=ABS(现手买)+ABS(现手卖)COLOR80FFFF,NODRAW;
差:=ABS(现手买)-ABS(现手卖)COLOR80FFFF,NODRAW;
MPB1:=ABS(现手买)/合*100; 
MPB2:=ABS(现手卖)/合*100; 
TESTSKIP(NOT(现手买 OR 现手卖 OR 合 OR 差 OR MPB1 OR MPB2)!=0);
{}
N:=C;
A:=N;
S:=5;
B:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+14*REF(A,6)
+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)
+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+
REF(A,20))/210,COLORRED,LINETHICK1;
D07:=EMA(B,1*S),COLORRED,LINETHICK1;
D14:=EMA(B,2*S),COLORRED,LINETHICK1;
D21:=EMA(B,3*S),COLORRED,LINETHICK1;
D28:=EMA(B,4*S),COLORRED,LINETHICK1;
大值:=MAX(B,MAX(D07,MAX(D14,MAX(D21,D28))));
小值:=MIN(B,MIN(D07,MIN(D14,MIN(D21,D28))));
UB:=EMA(大值*1.09,5);
LB:=EMA(小值*0.91,5);
X1:=IF(B>小值,小值,DRAWNULL);
X2:=IF(B<大值,大值,DRAWNULL);
STICKLINE(B=大值,UB,LB,5,0),COLORFF0000;
STICKLINE(B=小值,UB,LB,5,0),COLORLICYAN;
STICKLINE(B<大值 AND B>小值,UB,LB,5,0),COLOR888888;
DRAWBAND(X1,RGB(80,180,80),B,RGB(200,0,128));
DRAWBAND(X2,RGB(80,180,80),B,RGB(200,0,128));
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
{显示买卖量};
DRAWRECTREL(100,1000,400,940,RGB(190,190,190));
DRAWRECTREL(100,995,400,945,RGB(200,200,200));
DRAWRECTREL(100,990,400,950,RGB(210,210,210));
DRAWRECTREL(100,985,400,955,RGB(220,220,220));
DRAWRECTREL(100,980,400,960,RGB(230,230,230));
DRAWRECTREL(100,975,400,965,RGB(240,240,240));
DRAWRECTREL(100,970,400,970,RGB(250,250,250));
DRAWRECTREL(250-现手卖*200/合,1000,250,940,RGB(0,128,0));
DRAWRECTREL(250-现手卖*200/合,995,250,945,RGB(0,148,0));
DRAWRECTREL(250-现手卖*200/合,990,250,950,RGB(0,168,0));
DRAWRECTREL(250-现手卖*200/合,985,250,955,RGB(0,188,0));
DRAWRECTREL(250-现手卖*200/合,980,250,960,RGB(0,208,0));
DRAWRECTREL(250-现手卖*200/合,975,250,965,RGB(0,228,0));
DRAWRECTREL(250-现手卖*200/合,970,250,970,RGB(0,248,0));
DRAWRECTREL(250,1000,250+现手买*200/合,940,RGB(128,0,0));
DRAWRECTREL(250,995,250+现手买*200/合,945,RGB(148,0,0));
DRAWRECTREL(250,990,250+现手买*200/合,950,RGB(168,0,0));
DRAWRECTREL(250,985,250+现手买*200/合,955,RGB(188,0,0));
DRAWRECTREL(250,980,250+现手买*200/合,960,RGB(208,0,0));
DRAWRECTREL(250,975,250+现手买*200/合,965,RGB(228,0,0));
DRAWRECTREL(99.8,1000.2,99.8,939.8,RGB(250,250,0));{左}
DRAWRECTREL(400.2,939.8,400.2,1000.2,RGB(250,250,0));{右}
DRAWRECTREL(99.8,939.8,400.2,939.8,RGB(250,250,0));{上}
DRAWRECTREL(250,1000,250,940,RGB(250,250,0));{中}
DRAWTEXT_FIX(1,0.38,0.9,0,STRCAT(STRCAT('',CON2STR(现手买,1)),'万')),COLORFF00FF;
DRAWTEXT_FIX(1,0.08,0.9,0,STRCAT(STRCAT('',CON2STR(现手卖,1)),'万')),COLORFFFF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(差)>0,0.21,0.9,0,STRCAT('  ',STRCAT(CON2STR(差,1),'万'))) COLORFF00FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(差)<0,0.21,0.9,0,STRCAT('  ',STRCAT(CON2STR(差,1),'万'))) COLOR00FFFF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(差)=0,0.21,0.9,0,STRCAT('  ',STRCAT(CON2STR(差,1),'万'))) COLORFFFF00;
DRAWTEXT_FIX(1,0.048,0.95,0,STRCAT(STRCAT(' ',CON2STR(MPB2,1)),'%%')),COLORFFFF00;
DRAWTEXT_FIX(1,0.408,0.95,0,STRCAT(STRCAT('',CON2STR(MPB1,1)),'%%')),COLORFF00FF;
{显示日期};
D1:=YEAR AND MONTH AND DAY;
AA1:=STRCAT(CON2STR(YEAR,0),'年');
AA2:=STRCAT(CON2STR(MONTH,0),'月');
AA3:=STRCAT(CON2STR(DAY,0),'日');
AA4:=STRCAT('【',IF(WEEKDAY=1,'一',IF(WEEKDAY=2,'二',IF(WEEKDAY=3,'三',IF(WEEKDAY=4,'四',IF(WEEKDAY=5,'五',IF(WEEKDAY=6,'六','日'))))))); 
AA5:=STRCAT(STRCAT(STRCAT(AA1,AA2),STRCAT(AA3,AA4)),'】');
DRAWTEXT_FIX(D1,0.7,0.95,0,AA5),COLORFFFF00;



未来函数检测结果如下:
该公式包含未来函数:DYNAINFO
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  指标公式网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 浙ICP备2024071487号-2 指标公式网别名指标网仅为互联网文章,所有指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。指标公式网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图