通达信仓位多空对比副图指标 源码 贴图
2022-05-24 09:28:00来源:本站整理浏览:1073
通达信仓位多空对比副图指标 源码 贴图
RSV:=(CLOSE-LLV(LOW,7))/(HHV(HIGH,7)-LLV(LOW,7))*100;
短多:SMA(RSV,3,1),COLORYELLOW,LINETHICK1;
短空:SMA(短多,3,1),COLORFFFF00,LINETHICK1;
RSV1:=(CLOSE-LLV(LOW,38))/(HHV(HIGH,38)-LLV(LOW,38))*100;
中多:SMA(RSV1,5,1),COLORRED,LINETHICK1;
中空:SMA(中多,10,1),COLORGREEN,LINETHICK1;
DRAWBAND(中多,RGB(255,0,0),中空,RGB(0,255,0));
DRAWBAND(短多,RGB(255,255,0),短空,RGB(0,150,255));
短期:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5)),COLORWHITE,LINETHICK2;
中期:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10)),COLORYELLOW;
中长期:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20)),COLORMAGENTA;
长期:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30)),COLOR0000FF,LINETHICK1;
长强势区:=IF((EVERY(短多>=REF(短多,1),1)AND 短多<短空),5,0)COLOR0000FF,LINETHICK2;
低买:IF((CROSS(长强势区,0.1)),10,0),NODRAW,COLORFF00FF,LINETHICK1;
长强势区1:=IF((EVERY(中多>=REF(中多,1),1)AND 中多<18),5,0)COLOR0000FF,LINETHICK2;
低买1:IF((CROSS(长强势区1,0.1)),5,0),NODRAW,COLORFF00FF,LINETHICK1;
长强势区11:=IF((EVERY(中多<=REF(中多,1),1)AND 中多>85),5,0)COLOR0000FF,LINETHICK2;
高卖:IF((CROSS(长强势区11,0.1)),105,110)NODRAW,COLOR6A6A00,LINETHICK1;
长强势区2:=IF((EVERY(短多<=REF(短多,1),1)AND 短多>短空),5,0)COLOR0000FF,LINETHICK2;
高卖1:IF((CROSS(长强势区2,0.1)),100,110)NODRAW,COLOR6A6A00;
短期1:100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5)),COLORFFFFFF,LINETHICK1;
中期1:100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10)),NODRAW ,COLORC0C0C0;
中长期1:100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20)),NODRAW ,COLOR00A8A8;
长期1:100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30)),COLOR1111FF,LINETHICK2;
强市线:80,DOTLINE,COLOR000079;
弱市线:20,DOTLINE,COLOR000079;
分水岭:50,POINTDOT,COLORFFFFFF;
低点:IF(CURRBARSCOUNT<=N, CONST(IF(ISLASTBAR=1,LLV(L, BARSLAST(CURRBARSCOUNT=45)),1)),DRAWNULL),COLORRED,NODRAW;
L45:=CONST(LLVBARS(L,45))+1=CURRBARSCOUNT;
止损位:=IF(CURRBARSCOUNT<=N, CONST(IF(ISLASTBAR=1,LLV(低点*(100-承担风险)/100, BARSLAST(CURRBARSCOUNT=45)),1)),DRAWNULL),COLORFF8000,LINETHICK3;
止损幅度:=((低点-低点*0.01)/C-1)*100;
DRAWTEXT_FIX(C>0,0.32,0,0,STRCAT(STRCAT('承担风险:',CON2STR( -承担风险,2)),'%')),NODRAW,COLORYELLOW;
计划仓位:=IF(承担风险/ABS(止损幅度)*100>=100,100-ABS(止损幅度),承担风险/ABS(止损幅度)*100),NODRAW,COLORRED;
空仓:=ISLASTBAR AND 计划仓位<=6;{WWW.GPXIAZAI.COM}
一仓:=ISLASTBAR AND 6<计划仓位 AND 计划仓位<15;
二仓:=ISLASTBAR AND 15<计划仓位 AND 计划仓位<25;
三仓:=ISLASTBAR AND 25<计划仓位 AND 计划仓位<35;
四仓:=ISLASTBAR AND 35<计划仓位 AND 计划仓位<45;
五仓:=ISLASTBAR AND 45<计划仓位 AND 计划仓位<55;
六仓:=ISLASTBAR AND 55<计划仓位 AND 计划仓位<65;
七仓:=ISLASTBAR AND 65<计划仓位 AND 计划仓位<75;
八仓:=ISLASTBAR AND 75<计划仓位 AND 计划仓位<85;
九仓:=ISLASTBAR AND 85<计划仓位 AND 计划仓位<95;
满仓:=ISLASTBAR AND 95<计划仓位;
DRAWGBK(空仓=1,0,0,0,'空仓',0);
DRAWGBK(一仓=1,0,0,0,'1仓',0);
DRAWGBK(二仓=1,0,0,0,'2仓',0);
DRAWGBK(三仓=1,0,0,0,'3仓',0);
DRAWGBK(四仓=1,0,0,0,'4仓',0);
DRAWGBK(五仓=1,0,0,0,'5仓',0);
DRAWGBK(六仓=1,0,0,0,'6仓',0);
DRAWGBK(七仓=1,0,0,0,'7仓',0);
DRAWGBK(八仓=1,0,0,0,'8仓',0);
DRAWGBK(九仓=1,0,0,0,'9仓',0);
DRAWGBK(满仓=1,0,0,0,'满仓',0);
买线:=EMA(C,1);
卖线:=EMA(SLOPE(C,10)*10+C,20);
DRAWICON(CROSS(买线,卖线),L,42);
DRAWICON(CROSS(卖线,买线),H,43);
- 上一篇公式:通达信波段掏金副图指标 源码 贴图
- 下一篇公式:通达信龙凤呈祥升级主图指标 源码 贴图