首页 通达信专栏 正文

寻找任意统计区间内90%成本统计集中度的源码

通达信专栏 500

寻找任意统计区间内90%成本统计集中度的源码

寻找任意统计区间内90%成本统计集中度的源码

{m 1 1000 144}

{画简易筹码峰分布}

HB:=COST(99.9);

LB:=COST(0.1);

B3:=(HB-LB)/50;

NOTEXTHB:DRAWSL(BARSTATUS=2,HB,0 ,(WINNER(HB)-WINNER((HB-B3)))*800,1),COLOR9F5F9F;

NOTEXTB31:DRAWSL(BARSTATUS=2,(HB-B3*1),0,(WINNER(HB)-WINNER((HB-B3)))*800,1),COLOR9F5F9F;

NOTEXTB32:DRAWSL(BARSTATUS=2,(HB-B3*2),0,(WINNER((HB-B3))-WINNER((HB-B3*2)))*800,1),COLOR9F5F9F;

NOTEXTB33:DRAWSL(BARSTATUS=2,(HB-B3*3),0,(WINNER((HB-B3*2))-WINNER((HB-B3*3)))*800,1),COLOR9F5F9F;

NOTEXTB34:DRAWSL(BARSTATUS=2,(HB-B3*4),0,(WINNER((HB-B3*3))-WINNER((HB-B3*4)))*800,1),COLOR9F5F9F;

NOTEXTB35:DRAWSL(BARSTATUS=2,(HB-B3*5),0,(WINNER((HB-B3*4))-WINNER((HB-B3*5)))*800,1),COLOR9F5F9F;

NOTEXTB36:DRAWSL(BARSTATUS=2,(HB-B3*6),0,(WINNER((HB-B3*5))-WINNER((HB-B3*6)))*800,1),COLOR9F5F9F;

NOTEXTB37:DRAWSL(BARSTATUS=2,(HB-B3*7),0,(WINNER((HB-B3*6))-WINNER((HB-B3*7)))*800,1),COLOR9F5F9F;

NOTEXTB38:DRAWSL(BARSTATUS=2,(HB-B3*8),0,(WINNER((HB-B3*7))-WINNER((HB-B3*8)))*800,1),COLOR9F5F9F;

NOTEXTB39:DRAWSL(BARSTATUS=2,(HB-B3*9),0,(WINNER((HB-B3*8))-WINNER((HB-B3*9)))*800,1),COLOR9F5F9F;

NOTEXTB310:DRAWSL(BARSTATUS=2,(HB-B3*10),0,(WINNER((HB-B3*9))-WINNER((HB-B3*10)))*800,1),COLOR9F5F9F;

NOTEXTB311:DRAWSL(BARSTATUS=2,(HB-B3*11),0,(WINNER((HB-B3*10))-WINNER((HB-B3*11)))*800,1),COLOR9F5F9F;

NOTEXTB312:DRAWSL(BARSTATUS=2,(HB-B3*12),0,(WINNER((HB-B3*11))-WINNER((HB-B3*12)))*800,1),COLOR9F5F9F;

NOTEXTB313:DRAWSL(BARSTATUS=2,(HB-B3*13),0,(WINNER((HB-B3*12))-WINNER((HB-B3*13)))*800,1),COLOR9F5F9F;

NOTEXTB314:DRAWSL(BARSTATUS=2,(HB-B3*14),0,(WINNER((HB-B3*13))-WINNER((HB-B3*14)))*800,1),COLOR9F5F9F;

NOTEXTB315:DRAWSL(BARSTATUS=2,(HB-B3*15),0,(WINNER((HB-B3*14))-WINNER((HB-B3*15)))*800,1),COLOR9F5F9F;

NOTEXTB316:DRAWSL(BARSTATUS=2,(HB-B3*16),0,(WINNER((HB-B3*15))-WINNER((HB-B3*16)))*800,1),COLOR9F5F9F;

NOTEXTB317:DRAWSL(BARSTATUS=2,(HB-B3*17),0,(WINNER((HB-B3*16))-WINNER((HB-B3*17)))*800,1),COLOR9F5F9F;

NOTEXTB318:DRAWSL(BARSTATUS=2,(HB-B3*18),0,(WINNER((HB-B3*17))-WINNER((HB-B3*18)))*800,1),COLOR9F5F9F;

NOTEXTB319:DRAWSL(BARSTATUS=2,(HB-B3*19),0,(WINNER((HB-B3*18))-WINNER((HB-B3*19)))*800,1),COLOR9F5F9F;

NOTEXTB320:DRAWSL(BARSTATUS=2,(HB-B3*20),0,(WINNER((HB-B3*19))-WINNER((HB-B3*20)))*800,1),COLORLIGRAY;

NOTEXTB321:DRAWSL(BARSTATUS=2,(HB-B3*21),0,(WINNER((HB-B3*20))-WINNER((HB-B3*21)))*800,1),COLORLIGRAY;

NOTEXTB322:DRAWSL(BARSTATUS=2,(HB-B3*22),0,(WINNER((HB-B3*21))-WINNER((HB-B3*22)))*800,1),COLORLIGRAY;

NOTEXTB323:DRAWSL(BARSTATUS=2,(HB-B3*23),0,(WINNER((HB-B3*22))-WINNER((HB-B3*23)))*800,1),COLORLIGRAY;

NOTEXTB324:DRAWSL(BARSTATUS=2,(HB-B3*24),0,(WINNER((HB-B3*23))-WINNER((HB-B3*24)))*800,1),COLORLIGRAY;

NOTEXTB325:DRAWSL(BARSTATUS=2,(HB-B3*25),0,(WINNER((HB-B3*24))-WINNER((HB-B3*25)))*800,1),COLORLIGRAY;

NOTEXTB326:DRAWSL(BARSTATUS=2,(HB-B3*26),0,(WINNER((HB-B3*25))-WINNER((HB-B3*26)))*800,1),COLORLIGRAY;

NOTEXTB327:DRAWSL(BARSTATUS=2,(HB-B3*27),0,(WINNER((HB-B3*26))-WINNER((HB-B3*27)))*800,1),COLORLIGRAY;

NOTEXTB328:DRAWSL(BARSTATUS=2,(HB-B3*28),0,(WINNER((HB-B3*27))-WINNER((HB-B3*28)))*800,1),COLORLIGRAY;

NOTEXTB329:DRAWSL(BARSTATUS=2,(HB-B3*29),0,(WINNER((HB-B3*28))-WINNER((HB-B3*29)))*800,1),COLORLIGRAY;

NOTEXTB330:DRAWSL(BARSTATUS=2,(HB-B3*30),0,(WINNER((HB-B3*29))-WINNER((HB-B3*30)))*800,1),COLORLIGRAY;

NOTEXTB331:DRAWSL(BARSTATUS=2,(HB-B3*31),0,(WINNER((HB-B3*30))-WINNER((HB-B3*31)))*800,1),COLORLIGREEN;

NOTEXTB332:DRAWSL(BARSTATUS=2,(HB-B3*32),0,(WINNER((HB-B3*31))-WINNER((HB-B3*32)))*800,1),COLORLIGREEN;

NOTEXTB333:DRAWSL(BARSTATUS=2,(HB-B3*33),0,(WINNER((HB-B3*32))-WINNER((HB-B3*33)))*800,1),COLORLIGREEN;

NOTEXTB334:DRAWSL(BARSTATUS=2,(HB-B3*34),0,(WINNER((HB-B3*33))-WINNER((HB-B3*34)))*800,1),COLORLIGREEN;

NOTEXTB335:DRAWSL(BARSTATUS=2,(HB-B3*35),0,(WINNER((HB-B3*34))-WINNER((HB-B3*35)))*800,1),COLORLIGREEN;

NOTEXTB336:DRAWSL(BARSTATUS=2,(HB-B3*36),0,(WINNER((HB-B3*35))-WINNER((HB-B3*36)))*800,1),COLORLIGREEN;

NOTEXTB337:DRAWSL(BARSTATUS=2,(HB-B3*37),0,(WINNER((HB-B3*36))-WINNER((HB-B3*37)))*800,1),COLORLIGREEN;

NOTEXTB338:DRAWSL(BARSTATUS=2,(HB-B3*38),0,(WINNER((HB-B3*37))-WINNER((HB-B3*38)))*800,1),COLORLIGREEN;

NOTEXTB339:DRAWSL(BARSTATUS=2,(HB-B3*39),0,(WINNER((HB-B3*38))-WINNER((HB-B3*39)))*800,1),COLORLIGREEN;

NOTEXTB340:DRAWSL(BARSTATUS=2,(HB-B3*40),0,(WINNER((HB-B3*39))-WINNER((HB-B3*40)))*800,1),COLORLIGREEN;

NOTEXTB341:DRAWSL(BARSTATUS=2,(HB-B3*41),0,(WINNER((HB-B3*40))-WINNER((HB-B3*41)))*800,1),COLORLIGREEN;

NOTEXTB342:DRAWSL(BARSTATUS=2,(HB-B3*42),0,(WINNER((HB-B3*41))-WINNER((HB-B3*42)))*800,1),COLORLIGREEN;

NOTEXTB343:DRAWSL(BARSTATUS=2,(HB-B3*43),0,(WINNER((HB-B3*42))-WINNER((HB-B3*43)))*800,1),COLORLIGREEN;

NOTEXTB344:DRAWSL(BARSTATUS=2,(HB-B3*44),0,(WINNER((HB-B3*43))-WINNER((HB-B3*44)))*800,1),COLORLIGREEN;

NOTEXTB345:DRAWSL(BARSTATUS=2,(HB-B3*45),0,(WINNER((HB-B3*44))-WINNER((HB-B3*45)))*800,1),COLORLIGREEN;

NOTEXTB346:DRAWSL(BARSTATUS=2,(HB-B3*46),0,(WINNER((HB-B3*45))-WINNER((HB-B3*46)))*800,1),COLORLIGREEN;

NOTEXTB347:DRAWSL(BARSTATUS=2,(HB-B3*47),0,(WINNER((HB-B3*46))-WINNER((HB-B3*47)))*800,1),COLORLIGREEN;

NOTEXTB348:DRAWSL(BARSTATUS=2,(HB-B3*48),0,(WINNER((HB-B3*47))-WINNER((HB-B3*48)))*800,1),COLORLIGREEN;

NOTEXTB349:DRAWSL(BARSTATUS=2,(HB-B3*49),0,(WINNER((HB-B3*48))-WINNER((HB-B3*49)))*800,1),COLORLIGREEN;

NOTEXTLB:DRAWSL(BARSTATUS=2,LB,0,(WINNER((HB-B3*49))-WINNER(LB))*800,1),COLORLIGREEN;

{筹码文字显示}

WW1:=WINNER(C)*100;

WWW1:=STRCAT('当前价格获利盘(%): ',CON2STR(WW1,1));

{90%筹码}

A:=90+(100-90)/2;

B:=(100-90)/2;

CC:=COST(A);

DD:=COST(B);

集中度:=ROUND2((CC-DD)/ COST(100)*100,2),LINETHICK1,COLORLIRED;

WWW2:=STRCAT(WWW1,' | 90%成本统计集中度: ');

WWW3:=STRCAT(WWW2,CON2STR(集中度,1));

DRAWTEXT_FIX(ISLASTBAR=1 AND 集中度<=15,0.1,0.3,0,WWW3),COLORRED,DRAWABOVE;

DRAWTEXT_FIX(ISLASTBAR=1 AND 集中度>15,0.1,0.3,0,WWW3),COLORLIBLUE,DRAWABOVE;

C1:=C;

DRAWTEXT(CURRBARSCOUNT=6,C1,STRCAT('←←←←',CON2STR(C1,2))),COLORRED;

{成本统计}

TJ2:=LLV(集中度,N);

TJ4:=STRCAT('前',CON2STR(N,0));

TJ5:=STRCAT(TJ4,'期90%成本统计集中度最小值:');

TJ6:=STRCAT(TJ5,CON2STR(TJ2,2));

DRAWTEXT_FIX(ISLASTBAR=1,0.1,0.5,0,TJ6),COLORRED,DRAWABOVE;

集中度比较:=(集中度/TJ2>0.95 AND 集中度/TJ2<1.05);

DRAWTEXT_FIX(ISLASTBAR=1 AND 集中度比较,0.1,0.3,0,WWW3),COLORRED,DRAWABOVE;

佳奕操作系统2023年末修正说明
« 上一篇 2023-12-15
中恒时代(福建)再生资源科技有限公司中恒时代年产100万吨陶瓷岩板精细原料基地项目(一期)竣工环境保护验收监测报告表公示
下一篇 » 2023-11-25

发表评论

还没有评论