 | |  |  |
飞狐顶乖分段2A源码公式:
下轨:=MA(L,3),PRECISION2,COLORYELLOW,LINETHICK0;
上轨:=MA(H,3),PRECISION2,COLORYELLOW,LINETHICK0;
顶乖:=(上轨-H)/上轨*100,COLORyellow,LINETHICK0;
A:=下轨>REF(下轨,1);
{乖分段统计}
顶乖6 :=count(顶乖 >6 AND A,0),linethick1;
顶乖65 :=count(顶乖 >5 AND 顶乖 <=6 AND A,0),linethick1;
顶乖54 :=count(顶乖 >4 AND 顶乖 <=5 AND A,0),linethick1;
顶乖43 :=count(顶乖 >3 AND 顶乖 <=4 AND A,0),linethick1;
顶乖32 :=count(顶乖 >2 AND 顶乖 <=3 AND A,0),linethick1;
顶乖21 :=count(顶乖 >1 AND 顶乖 <=2 AND A,0),linethick1;
顶乖10 :=count(顶乖 >0 AND 顶乖 <=1 AND A,0),linethick1;
顶乖01B:=count(顶乖 >-1 AND 顶乖 <=0 AND A,0),linethick1;
顶乖12B:=count(顶乖 >-2 AND 顶乖<=-1 AND A,0),linethick1;
顶乖23B:=count(顶乖 >-3 AND 顶乖<=-2 AND A,0),linethick1;
顶乖34B:=count(顶乖 >-4 AND 顶乖<=-3 AND A,0),linethick1;
顶乖45B:=count(顶乖 >-5 AND 顶乖<=-4 AND A,0),linethick1;
顶乖56B:=count(顶乖 >-6 AND 顶乖<=-5 AND A,0),linethick1;
顶乖6B:=count(顶乖<=-6 AND A,0),linethick1;
B:=count(顶乖<=6 AND 顶乖>=-6 AND A,0);//统计6-6乖区间在下轨上升时的次数
{各区间乖占比}
CC:=B/B;
占比6:=顶乖6/B;
占比65:=顶乖65/B;
占比54:=顶乖54/B;
占比43:=顶乖43/B;
占比32:=顶乖32/B;
占比21:=顶乖21/B;
占比10:=顶乖10/B;
占比01B:=顶乖01B/B;
占比12B:=顶乖12B/B;
占比23B:=顶乖23B/B;
占比34B:=顶乖34B/B;
占比45B:=顶乖45B/B;
占比56B:=顶乖56B/B;
占比6B:=顶乖6B/B;
{图表部份}
p:=SYSPARAM(1);
DRAWTEXT(c>0 and BARSTATUS=2,-10,''),ColorFFFF00,ALIGN2; {表框下限}{50行}
DRAWTEXT(c>0 and BARSTATUS=2, 60,'┏━━━┱───┬───┬───┬───┬───┬───┬───┬───┲┱───┬───┬───┬───┬───┬───┬───┐') ,Color00AAAA,LINETHICK1,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2, 50,'┃ ┃ │ │ │ │ │ │ │ ┃┃ │ │ │ │ │ │ │'),Color00AAAA,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2, 40,'┠───╂───┼───┼───┼───┼───┼───┼───┼───╂╂───┼───┼───┼───┼───┼───┼───┤') ,Color00AAAA,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2, 30,'┃ ┃ │ │ │ │ │ │ │ ┃┃ │ │ │ │ │ │ │'),Color00AAAA,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2, 20,'┠───╂───┼───┼───┼───┼───┼───┼───┼───╂╂───┼───┼───┼───┼───┼───┼───┤') ,Color00AAAA,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2, 10,'┃ ┃ │ │ │ │ │ │ │ ┃┃ │ │ │ │ │ │ │'),Color00AAAA,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2, 0,'┗━━━┹───┴───┴───┴───┴───┴───┴───┴───┺┹───┴───┴───┴───┴───┴───┴───┘') ,Color00AAAA,ALIGN2,SHIFT3;
{}
DRAWTEXT(c>0 and BARSTATUS=2,50,' 分段 6-6 顶乖6 顶乖65 顶乖54 顶乖43 顶乖34B 顶乖45B 顶乖56B 顶乖6B '),ColorDEDEDE,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,30,' 次数 '),ColorDEDEDE,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,10,' 占比 '),ColorDEDEDE,ALIGN2,SHIFT3;
{}
DRAWTEXT(c>0 and BARSTATUS=2,50,' 顶乖21 顶乖10 顶乖01B 顶乖12B '),Color00AAFF,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,50,' 顶乖32 顶乖23B '),Color00FFAA,ALIGN2,SHIFT3;
{}
DRAWTEXT(c>0 and BARSTATUS=2,30,NUMTOSTR(B,0)+' '),COLORYELLOW,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,30, NUMTOSTR(顶乖6,0)+' '),COLORYELLOW,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,30, NUMTOSTR(顶乖65,0)+' '),COLORYELLOW,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,30, NUMTOSTR(顶乖54,0)+' '),COLORYELLOW,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,30, NUMTOSTR(顶乖43,0)+' '),COLORYELLOW,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,30, NUMTOSTR(顶乖32,0)+' '),COLOR00FFAA,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,30, NUMTOSTR(顶乖21,0)+' '),COLOR00AAFF,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,30, NUMTOSTR(顶乖10,0)+' '),COLOR00AAFF,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,30, NUMTOSTR(顶乖01B,0)+' '),COLOR00AAFF,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,30, NUMTOSTR(顶乖12B,0)+' '),COLOR00AAFF,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,30, NUMTOSTR(顶乖23B,0)+' '),COLOR00FFAA,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,30, NUMTOSTR(顶乖34B,0)+' '),COLORYELLOW,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,30, NUMTOSTR(顶乖45B,0)+' '),COLORYELLOW,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,30, NUMTOSTR(顶乖56B,0)+' '),COLORYELLOW,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,30, NUMTOSTR(顶乖6B,0)+' '),COLORYELLOW,ALIGN2,SHIFT3;
{}
DRAWTEXT(c>0 and BARSTATUS=2,10,NUMTOSTR(CC,0)+' '),COLORYELLOW,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,10, NUMTOSTR(占比6,2)+' '),COLORYELLOW,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,10, NUMTOSTR(占比65,2)+' '),COLORYELLOW,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,10, NUMTOSTR(占比54,2)+' '),COLORYELLOW,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,10, NUMTOSTR(占比43,2)+' '),COLORYELLOW,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,10, NUMTOSTR(占比32,2)+' '),COLOR00FFAA,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,10, NUMTOSTR(占比21,2)+' '),COLOR00AAFF,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,10, NUMTOSTR(占比10,2)+' '),COLOR00AAFF,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,10, NUMTOSTR(占比01B,2)+' '),COLOR00AAFF,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,10, NUMTOSTR(占比12B,2)+' '),COLOR00AAFF,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,10, NUMTOSTR(占比23B,2)+' '),COLOR00FFAA,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,10, NUMTOSTR(占比34B,2)+' '),COLORYELLOW,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,10, NUMTOSTR(占比45B,2)+' '),COLORYELLOW,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,10, NUMTOSTR(占比56B,2)+' '),COLORYELLOW,ALIGN2,SHIFT3;
DRAWTEXT(c>0 and BARSTATUS=2,10, NUMTOSTR(占比6B,2)+' '),COLORYELLOW,ALIGN2,SHIFT3; |
| |  | |  |
|