在三线粘合处编写个符号
在三线粘合处编写个符号
编写条件:
编写方法:
网友求助:
input:N(1,1,9999),M(1,1,9999);
A1:=BARSTATUS=2 ;
C1:=BACKSET(a1,n);
D1:=FILTER(C1,n-1);
VERTLINE( d1,1 );
A2:=BARSTATUS=2 ;
C2:=BACKSET(a2,m);
D2:=FILTER(C2,m-1);
VERTLINE( d2,1 );
周期:abs(n-m) + 1,linethick0;
结束点:=if(n>m,d2,d1);
成交额:=if(结束点,sum(amount,周期),0);
成交量:=if(结束点,sum(vol,周期),0);
区间均价:=if(CATEGORY=1, 成交额/成交量/100,ref(ma(c,abs(n-m)+1),min(m,n)-1));
区间换手和:=成交量/CAPITAL*100;
N1:=IF(DATATYPE=10,1.05,IF(DATATYPE=9,1.02,1.01));
N2:=IF(DATATYPE=10,0.95,IF(DATATYPE=9,0.98,0.99));
区间换手:REF(区间换手和,BARSLAST(结束点)),linethick0;
区间成本:REF(区间均价,BARSLAST(结束点));
上界:REF(区间均价*n1,BARSLAST(结束点)),DOTLINE;
下界:REF(区间均价*n2,BARSLAST(结束点)),DOTLINE;
DRAWTEXTABS(588,20,'成本区间:'+NUMTOSTRN(下界,2)+' - ' +NUMTOSTRN(区间成本,2)
+' - ' + NUMTOSTRN(上界,2)),LAYER0,ColorFFC000;
DRAWTEXTABS(588,40,'区间换手:'+NUMTOSTRN(区间换手,2)),LAYER0,ColorFFC000;
A1:=BARSTATUS=2 ;
C1:=BACKSET(a1,n);
D1:=FILTER(C1,n-1);
VERTLINE( d1,1 );
A2:=BARSTATUS=2 ;
C2:=BACKSET(a2,m);
D2:=FILTER(C2,m-1);
VERTLINE( d2,1 );
周期:abs(n-m) + 1,linethick0;
结束点:=if(n>m,d2,d1);
成交额:=if(结束点,sum(amount,周期),0);
成交量:=if(结束点,sum(vol,周期),0);
区间均价:=if(CATEGORY=1, 成交额/成交量/100,ref(ma(c,abs(n-m)+1),min(m,n)-1));
区间换手和:=成交量/CAPITAL*100;
N1:=IF(DATATYPE=10,1.05,IF(DATATYPE=9,1.02,1.01));
N2:=IF(DATATYPE=10,0.95,IF(DATATYPE=9,0.98,0.99));
区间换手:REF(区间换手和,BARSLAST(结束点)),linethick0;
区间成本:REF(区间均价,BARSLAST(结束点));
上界:REF(区间均价*n1,BARSLAST(结束点)),DOTLINE;
下界:REF(区间均价*n2,BARSLAST(结束点)),DOTLINE;
DRAWTEXTABS(588,20,'成本区间:'+NUMTOSTRN(下界,2)+' - ' +NUMTOSTRN(区间成本,2)
+' - ' + NUMTOSTRN(上界,2)),LAYER0,ColorFFC000;
DRAWTEXTABS(588,40,'区间换手:'+NUMTOSTRN(区间换手,2)),LAYER0,ColorFFC000;
解答如下:
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);
区间成本:CONST(CYC),NODRAW;
区间换手:(SUM(VOL,AA)-SUM(VOL,BB))/CAPITAL*100,NODRAW;
计算周期:AA-BB,NODRAW;
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),COLORWHITE;
STICKLINE(CURRBARSCOUNT=起点,HH,LL,0,-1),COLORYELLOW;
STICKLINE(CURRBARSCOUNT=终点,HH,LL,0,-1),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=起点,LL,'起点'),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=终点,LL,'终点'),COLORWHITE;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
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);
区间成本:CONST(CYC),NODRAW;
区间换手:(SUM(VOL,AA)-SUM(VOL,BB))/CAPITAL*100,NODRAW;
计算周期:AA-BB,NODRAW;
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),COLORWHITE;
STICKLINE(CURRBARSCOUNT=起点,HH,LL,0,-1),COLORYELLOW;
STICKLINE(CURRBARSCOUNT=终点,HH,LL,0,-1),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=起点,LL,'起点'),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=终点,LL,'终点'),COLORWHITE;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
以上是正文
参数设置 起点 0 9999 1
终点 0 9999 0
{股票资源馆:www.lixiangluntan.com专业和谐高端炒股软件--公式编写交流--加QQ751161480--}
【股票资源馆】通达信,大智慧,同花顺,飞狐,股票指标公式,股票公式大全,道迪拓金,K线图,k线图经典图解,k线图怎么看,k线图分析,股票k线图,大智慧策略破解版。/p>
COSTEX()这个函数的用途
COSTEX()这个函数的用途