当前位置:首页 > 免费资源 > 正文

「翔博精选指标」区间成本简版(通达信公式 主图 源码 测试图)

2022-05-03原创 编 辑:翔博软件

 起点:=66;终点:=1;

AA:=起点;BB:=终点;
CYC:=IF(CAPITAL=0,(SUM(C,AA)-SUM(C,BB))/(AA-BB),(SUM(AMOUNT,AA)
-SUM(AMOUNT,BB))/(SUM(VOL,AA)-SUM(VOL,BB))/100); 
计算周期:AA-BB,NODRAW;
区间成本:CONST(CYC),NODRAW; 
......
......部分源码省略
 
STICKLINE(ISLASTBAR,B347 ,B347 ,A47*100 ,0 ),COLORRED;
STICKLINE(ISLASTBAR,B348 ,B348 ,A48*100 ,0 ),COLORRED;
STICKLINE(ISLASTBAR,LB ,LB ,A50*100 ,0 ),COLORBLUE;
{画K线} 
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
HH:=REFDATE(HHV(H,起点),DATE);
LL:=REFDATE(LLV(L,起点),DATE);
N1:=IF(PERIOD=7,1.05,IF(PERIOD=6,1.02,1.01));
N2:=IF(PERIOD=7,0.95,IF(PERIOD=6,0.98,0.99));
STICKLINE(CURRBARSCOUNT<=终点,区间成本*N1,区间成本*N2,5,0),COLOR808080; 
STICKLINE(CURRBARSCOUNT<=终点,区间成本,区间成本,5,0),COLORBROWN;
STICKLINE(CURRBARSCOUNT=起点*1,HH,LL,3,0),COLORMAGENTA;
STICKLINE(CURRBARSCOUNT=终点,HH,LL,3,0),COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=起点,LL,'起点'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=终点,LL,'终点'),COLORWHITE;
DRAWTEXT(YEAR!=REF(YEAR,1),HIGH+0.3,VARCAT(VAR2STR(YEAR,0),' 年 ')),COLORMAGENTA;
STICKLINE(YEAR!=REF(YEAR,1)=1,CONST(HHV(H,0)),CONST(LLV(L,0)),0,-1),COLORMAGENTA;
DRAWTEXT(MONTH!=REF(MONTH,1),LOW-0.2,VARCAT(VAR2STR(MONTH,0),' 月 ')),COLORMAGENTA;
STICKLINE(MONTH!=REF(MONTH,1)=1,CONST(HHV(H,0)),CONST(LLV(L,0)),0,-1),COLORMAGENTA;

DRAWKLINE(HIGH,OPEN,LOW,CLOSE);

大家都爱看
查看更多热点新闻
点击进入翔博软件旗下掌上指标--自助下载指标