仓位比例提示(通达信公式 副图 源码 测试图)
通达信免费指标
10-03
阅读:522
评论:0
{仓位比例提示}
DRAWRECTREL(0,5,1000,1,RGB(200,300,500));
DRAWRECTREL(0,202,1000,195,RGB(0,50,50));
DRAWRECTREL(0,498,1000,495,RGB(100,500,300));
DRAWRECTREL(0,808,1000,800,RGB(00,50,50));
DRAWRECTREL(0,1000,1000,995,RGB(200,300,500));
N:=100000;
历史最高价:=HHV(H,0),COLORRED;
A:=历史最高价;
建仓百分之:=(A-C)/A*100*1,COLORWHITE;
分仓后每份资金:=N,COLORMAGENTA;
本份资金应买额:=(N*(A-C)/A)*1,COLORGREEN;
本份资金应买股:=INTPART((本份资金应买额/C)/100)*100,COLORYELLOW;
仓位比例:INTPART(EMA(建仓百分之,15)/2.5)*2.5,COLORRED,LINETHICK3;
{持仓比例:=STRCAT(STRCAT('仓位比例:
',CON2STR(仓位比例,2)),'%');
DRAWTEXT_FIX(ISLASTBAR,0.3,0.001,0,持仓比例),COLORWHITE;}
DRAWTEXT_FIX(ISLASTBAR=1,0.01,0,0,STKNAME),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR=1,0.09,0,0,CODE),COLORWHITE;
{黄金分割
普通 等系坐标}
DRAWRECTREL(990,2,998,188,RGB(0,150,180)),NOFRAME;
DRAWRECTREL(990,188,998,375,RGB(200,200,0)),NOFRAME;
DRAWRECTREL(990,375,998,491,RGB(100,200,0)),NOFRAME;
DRAWRECTREL(990,491,998,607,RGB(200,10,80)),NOFRAME;
DRAWRECTREL(990,607,998,794,RGB(150,0,0)),NOFRAME;
DRAWRECTREL(990,794,998,982,RGB(150,150,150)),NOFRAME;
版权声明
本文版权归掌上指标所有。
未经许可,不得转载,转载请注明出处!