您现在的位置:程序化交易>> 股票公式>> 其他>> 其他软件公式>>正文内容

十八层宝塔公式公式、源码[其他软件公式]

相关标签: 乐王选股公式源码 、 短线暴利指标公式源码 、 atr自适应公式源码 、 牛熊线指标公式源码 、 股票指标公式源码大全 、 大智慧指标公式源码 、 通达信指标公式源码 、 选股公式源码 、 同花顺指标公式源码 、

 

飞狐十八层宝塔公式源码如下:
draWGBK(1,COLORRGB(633,33,0),COLORRGB(33,33,0),0),colorFF0000;
ZH:=HHV(H,22);
ZHH:=H;
ZGF1:=ZHH/1.0809;ZGF2:=ZHH/1.1618;
ZL:=LLV(L,22);
ZLL:=L;
ZGFB1:=ZLL*1.0809;ZGFB2:=ZLL*1.1618;
STICKLINE(ISLASTBAR and ZGF1,ZGF1,ZGF2,40,0),SHIFT3,Color8BB2CA;
STICKLINE(ISLASTBAR and ZGFB1,ZGFB1,ZGFB2,40,0),SHIFT3,Color000080;
DRAWNUMBER(ISLASTBAR and ZGFB1,ZGFB1,ZGFB1,2),COLORRED,SHIFT1;
DRAWNUMBER(ISLASTBAR and ZGF1,ZGF1,ZGF1,2),COLORBLUE,SHIFT1;

sj:=dataCOUNT-sysparam(1);
{drawnumber(BARPOS+4=sysparam(1),l,sj,0),align5,COLORWHITE;//交易日}
涨跌:=(DYNAINFO(7)-C)/C*100,COLORYELLOW,LINETHICK0;
{drawnumber(BARPOS+4=sysparam(1),l,sj,0),align5,COLORWHITE;//交易日}

HZC:=(2*CLOSE+LOW+HIGH)/4;
HZE:=EMA(HZC,2);
HZD:=EMA(HZE,2);
HD1:=EMA(HZC,3);
//18线开花
a1:=EMA(CLOSE,5)>EMA(CLOSE,6) and EMA(CLOSE,6)>EMA(CLOSE,7) and EMA(CLOSE,7)>EMA(CLOSE,8) and EMA(CLOSE,8)>EMA(CLOSE,9)
and EMA(CLOSE,9)>EMA(CLOSE,10) and EMA(CLOSE,10)>EMA(CLOSE,11) and EMA(CLOSE,11)>EMA(CLOSE,12)
and EMA(CLOSE,12)>EMA(CLOSE,13) and EMA(CLOSE,13)>EMA(CLOSE,14) and EMA(CLOSE,14)>EMA(CLOSE,15)
and EMA(CLOSE,15)>EMA(CLOSE,20) and EMA(CLOSE,20)>EMA(CLOSE,30) and EMA(CLOSE,30)>EMA(CLOSE,60) and EMA(CLOSE,60)>EMA(CLOSE,90)
and EMA(CLOSE,90)>EMA(CLOSE,120) and EMA(CLOSE,120)>EMA(CLOSE,250);

a2:=EMA(CLOSE,5)>EMA(CLOSE,6) and EMA(CLOSE,6)>EMA(CLOSE,7) and EMA(CLOSE,7)>EMA(CLOSE,8) and EMA(CLOSE,8)>EMA(CLOSE,9)
and EMA(CLOSE,9)>EMA(CLOSE,10) and EMA(CLOSE,10)>EMA(CLOSE,11) and EMA(CLOSE,11)>EMA(CLOSE,12)
and EMA(CLOSE,12)>EMA(CLOSE,13) and EMA(CLOSE,13)>EMA(CLOSE,14);
b1:=IF(a1,1,2);
//DD=HD1:=EMA(HZC,3);
PARTLINE(b1=2,EMA(HD1,14)),ColorBLUE;PARTLINE(b1=2,EMA(HD1,15)),ColorBLUE;PARTLINE(b1=2,EMA(HD1,16)),ColorBLUE;
PARTLINE(b1=2,EMA(HD1,17)),ColorBLUE;PARTLINE(b1=2,EMA(HD1,18)),ColorBLUE;PARTLINE(b1=2,EMA(HD1,19)),ColorBLUE;
PARTLINE(b1=2,EMA(HD1,20)),ColorBLUE;PARTLINE(b1=2,EMA(HD1,21)),ColorBLUE;PARTLINE(b1=2,EMA(HD1,22)),ColorBLUE;
PARTLINE(b1=2,EMA(HD1,23)),ColorBLUE;PARTLINE(b1=2,EMA(HD1,24)),ColorBLUE;PARTLINE(b1=2,EMA(HD1,25)),ColorBLUE;

PARTLINE(a2,EMA(HD1,14)),Color2277ee; PARTLINE(a2,EMA(HD1,15)),Color2277ee; PARTLINE(a2,EMA(HD1,16)),Color2277ee;
PARTLINE(a2,EMA(HD1,17)),Color2277ee; PARTLINE(a2,EMA(HD1,18)),Color2277ee; PARTLINE(a2,EMA(HD1,19)),Color2277ee;
PARTLINE(a2,EMA(HD1,20)),Color2277ee; PARTLINE(a2,EMA(HD1,21)),Color2277ee; PARTLINE(a2,EMA(HD1,22)),Color2277ee;
PARTLINE(a2,EMA(HD1,23)),Color2277ee; PARTLINE(a2,EMA(HD1,24)),Color2277ee; PARTLINE(a2,EMA(HD1,25)),Color2277ee; {文章来至程序化交易网 cxh99.com}

PARTLINE(a1,EMA(HD1,14)),ColorRED; PARTLINE(a1,EMA(HD1,15)),ColorRED; PARTLINE(a1,EMA(HD1,16)),ColorRED;
PARTLINE(a1,EMA(HD1,17)),ColorRED; PARTLINE(a1,EMA(HD1,18)),ColorRED; PARTLINE(a1,EMA(HD1,19)),ColorRED;
PARTLINE(a1,EMA(HD1,20)),ColorRED; PARTLINE(a1,EMA(HD1,21)),ColorRED; PARTLINE(a1,EMA(HD1,22)),ColorRED;
PARTLINE(a1,EMA(HD1,23)),ColorRED; PARTLINE(a1,EMA(HD1,24)),ColorRED; PARTLINE(a1,EMA(HD1,25)),ColorRED;
//HH
PARTLINE(b1=2,EMA(HZD,2)),COLORCYAN; PARTLINE(b1=2,EMA(HZD,3)),COLORCYAN;
PARTLINE(b1=2,EMA(HZD,4)),COLORCYAN; PARTLINE(b1=2,EMA(HZD,5)),COLORCYAN;
PARTLINE(b1=2,EMA(HZD,6)),COLORCYAN; PARTLINE(b1=2,EMA(HZD,7)),COLORCYAN;
PARTLINE(b1=2,EMA(HZD,8)),COLORCYAN; PARTLINE(b1=2,EMA(HZD,9)),COLORCYAN;
PARTLINE(b1=2,EMA(HZD,10)),COLORCYAN; PARTLINE(b1=2,EMA(HZD,11)),COLORCYAN;
PARTLINE(b1=2,EMA(HZD,12)),COLORCYAN; PARTLINE(b1=2,EMA(HZD,13)),COLORCYAN; {内容来至程序化交易网 CXH99.COM}

PARTLINE(EMA(HZD,2)>ref(EMA(HZD,2),1),EMA(HZD,2)),COLORFFFFFF;
PARTLINE(EMA(HZD,3)>ref(EMA(HZD,3),1),EMA(HZD,3)),COLORFFFFFF;
PARTLINE(EMA(HZD,4)>ref(EMA(HZD,4),1),EMA(HZD,4)),COLORFFFFFF;
PARTLINE(EMA(HZD,5)>ref(EMA(HZD,5),1),EMA(HZD,5)),COLORFFFFFF;
PARTLINE(EMA(HZD,6)>ref(EMA(HZD,6),1),EMA(HZD,6)),COLORFFFFFF;
PARTLINE(EMA(HZD,7)>ref(EMA(HZD,7),1),EMA(HZD,7)),COLORFFFFFF;
PARTLINE(EMA(HZD,8)>ref(EMA(HZD,8),1),EMA(HZD,8)),COLORFFFFFF;
PARTLINE(EMA(HZD,9)>ref(EMA(HZD,9),1),EMA(HZD,9)),COLORFFFFFF;
PARTLINE(EMA(HZD,10)>ref(EMA(HZD,10),1),EMA(HZD,10)),COLORFFFFFF;
PARTLINE(EMA(HZD,11)>ref(EMA(HZD,11),1),EMA(HZD,11)),COLORFFFFFF;
PARTLINE(EMA(HZD,12)>ref(EMA(HZD,12),1),EMA(HZD,12)),COLORFFFFFF;
PARTLINE(EMA(HZD,13)>ref(EMA(HZD,13),1),EMA(HZD,13)),COLORFFFFFF;

PARTLINE(a2,EMA(HZD,2)),ColorYELLOW; PARTLINE(a2,EMA(HZD,3)),ColorYELLOW;
PARTLINE(a2,EMA(HZD,4)),ColorYELLOW; PARTLINE(a2,EMA(HZD,5)),ColorYELLOW;
PARTLINE(a2,EMA(HZD,6)),ColorYELLOW; PARTLINE(a2,EMA(HZD,7)),ColorYELLOW;
PARTLINE(a2,EMA(HZD,8)),ColorYELLOW; PARTLINE(a2,EMA(HZD,9)),ColorYELLOW;
PARTLINE(a2,EMA(HZD,10)),ColorYELLOW; PARTLINE(a2,EMA(HZD,11)),ColorYELLOW;
PARTLINE(a2,EMA(HZD,12)),ColorYELLOW; PARTLINE(a2,EMA(HZD,13)),ColorYELLOW; {本文来至CXH99.COM}

PARTLINE(a1,EMA(HZD,2)),ColorMAGENTA; PARTLINE(a1,EMA(HZD,3)),ColorMAGENTA;
PARTLINE(a1,EMA(HZD,4)),ColorMAGENTA; PARTLINE(a1,EMA(HZD,5)),ColorMAGENTA;
PARTLINE(a1,EMA(HZD,6)),ColorMAGENTA; PARTLINE(a1,EMA(HZD,7)),ColorMAGENTA;
PARTLINE(a1,EMA(HZD,8)),ColorMAGENTA; PARTLINE(a1,EMA(HZD,9)),ColorMAGENTA;
PARTLINE(a1,EMA(HZD,10)),ColorMAGENTA; PARTLINE(a1,EMA(HZD,11)),ColorMAGENTA;
PARTLINE(a1,EMA(HZD,12)),ColorMAGENTA; PARTLINE(a1,EMA(HZD,13)),ColorMAGENTA;

BDDD:=CLOSE=LLV(CLOSE,6),LINETHICK0;
N20:=BARSLAST(BDDD);
低:IF(N20,ref(CLOSE,N20),ref(CLOSE,N20))*0.99,COLORRED,LINETHICK0;
启动:CLOSE>低 AND ref(CLOSE=低,1),COLOR00FF00,POINTDOT,LINETHICK0;
PARTLINE(低=ref(低,1),低),COLORRED,LINETHICK1;
{以下设置副图显示方式}
IF(CLOSE,CLOSE,CLOSE),COLORFF00FF,LINETHICK0;
DRAWTEXT(启动,LOW*0.98,'↑'),COLORRED, ALIGN0;
PARTLINE(低<ref(低,1),低),COLORBLACK; {文章来至程序化交易网 cxh99.com}

Var1:=CLOSE>ref(CLOSE,1) AND CLOSE>ref(CLOSE,2);
Var2:=ref(Var1,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
Var3:=ref(Var2,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
Var4:=ref(Var3,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
Var5:=ref(Var4,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
Var6:=ref(Var5,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
Var7:=ref(Var6,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
Var8:=ref(Var7,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
Var9:=ref(Var8,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
VarA:=ref(Var9,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
VarB:=ref(VarA,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
VarC:=ref(VarB,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
STICKLINE(Var1 OR Var2 OR Var3 OR Var4 OR Var5 OR Var6 OR Var7 OR Var8 OR Var9 OR VarA OR VarB OR VarC,CLOSE,ref(CLOSE,1),8,1),COLORWHITE;
VarD:=CLOSE<ref(CLOSE,1) AND CLOSE<ref(CLOSE,2);
VarE:=ref(VarD,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
VarF:=ref(VarE,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
Var10:=ref(VarF,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
Var11:=ref(Var10,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
Var12:=ref(Var11,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
Var13:=ref(Var12,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
Var14:=ref(Var13,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
Var15:=ref(Var14,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
Var16:=ref(Var15,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
Var17:=ref(Var16,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
Var18:=ref(Var17,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
STICKLINE(VarD OR VarE OR VarF OR Var10 OR Var11 OR Var12 OR Var13 OR Var14 OR Var15 OR Var16 OR Var17 OR Var18,CLOSE,ref(CLOSE,1),8,0),COLORYELLOW;
Var19:=ref(VarD OR VarE OR VarF OR Var10 OR Var11 OR Var12 OR Var13 OR Var14 OR Var15 OR Var16 OR Var17 OR Var18,1) AND Var1;
STICKLINE(Var19,ref(CLOSE,1),ref(CLOSE,2),8,0),COLORRED;
Var1A:=ref(Var1 OR Var2 OR Var3 OR Var4 OR Var5 OR Var6 OR Var7 OR Var8 OR Var9 OR VarA OR VarB OR VarC,1) AND VarD;
STICKLINE(Var1A,ref(CLOSE,1),ref(CLOSE,2),8,1),COLORGREEN;

天数:'+NUMTOSTR(主力吸筹区,0)+'天'),ColorFFFFFC,LINETHICK1;

MA30:=EMA(CLOSE,30);
MA60:=EMA(CLOSE,60);
MA125:=EMA(CLOSE,125);
MA250:=EMA(CLOSE,250);
A1:=MA30[SYSPARAM(1)];
RA1:=MA30[SYSPARAM(1)-1];
jt1:=IF(A1>RA1,'↑','↓');
DRAWTEXTEX(1,0,10,110,'MA30: '+NUMTOSTR(MA30[SYSPARAM(1)],2)+jt1),COLORWHITE;
A2:=MA60[SYSPARAM(1)];
RA2:=MA60[SYSPARAM(1)-1];
jt2:=IF(A2>RA2,'↑','↓');
DRAWTEXTEX(1,0,10,130,'MA60: '+NUMTOSTR(MA60[SYSPARAM(1)],2)+jt2),COLORWHITE;
A3:=MA125[SYSPARAM(1)];
RA3:=MA125[SYSPARAM(1)-1];
jt3:=IF(A3>RA3,'↑','↓');
DRAWTEXTEX(1,0,10,150,'MA125:'+NUMTOSTR(MA125[SYSPARAM(1)],2)+jt3),COLORWHITE;
A4:=MA250[SYSPARAM(1)];
RA4:=MA250[SYSPARAM(1)-1];
jt4:=IF(A4>RA4,'↑','↓');
DRAWTEXTEX(1,0,10,170,'MA250:'+NUMTOSTR(MA250[SYSPARAM(1)],2)+jt4),COLORWHITE; {内容来至程序化交易网 CXH99.COM}

{换手100%}
svol:=INTPART(SUM(V,0)/CAPITAL);
tj0:=svol>ref(svol,1) or BARSSINCE(CLOSE)=0;
S1:=BARSLAST(tj0)+1,PRECISION,COLORWHITE;//时间1
tj2:=S1<ref(S1,1);//取点
S2:=if(tj2,ref(S1,1)+1,S1),PRECISION,COLORMAGENTA;//时间2
S3:=SUM(tj2,0),COLORMAGENTA;
阶段总额(万元):=SUM(AMOUNT/10000,S2)*100,PRECISION,LINETHICK,Color008BFA;//换手100%成交额
阶段总量(手):=SUM(V,S2)*100,PRECISION,LINETHICK,COLORCYAN;//换手100%成交量
阶段成本(元):=(阶段总额(万元)/(阶段总量(手)/100)),LINETHICK,PRECISION2,COLORRED;
DRAWTEXTex(1,0,10,75,'阶段平均成本:'+NUMTOSTR(阶段成本(元)[SYSPARAM(1)],2)+'(元)'),align4,COLORCYAN;
Aa3:=SUMBARS(VOL,CAPITAL);
换手成本:=IF(CAPITAL>0,SUM(AMOUNT,Aa3)/SUM(VOL,Aa3)/100,EMA(CLOSE,120));{100%换手平均成本线};
DRAWTEXTEX(1,0,10,90,'换手成本:'+NUMTOSTR(换手成本,2)),COLORYELLOW;

BB:=BARPOS=SYSPARAM(1);
variable:wday[7]='星期六';
wday[1]:='星期日';
wday[2]:='星期一';
wday[3]:='星期二';
wday[4]:='星期三';
wday[5]:='星期四';
wday[6]:='星期五';
fy:=YEAR;
fm:=MONTH;
fd:=DAY;
wd:=WEEKDAY;
pd:=SYSPARAM(1);
DRAWTEXTEX(c,1,0,840,'■今日: '+NUMTOSTR(fy[pd],0)+'年'+NUMTOSTR(fm[pd],0)+'月'+NUMTOSTR(fd[pd],0)+'日 '+wday[wd[pd]+1]),COLORYELLOW;

yyzq:=(sysparam(3)-sysparam(2))/1.8;
picl:=refx(llv(sysparam(5),yyzq),yyzq);
当天换手率:=((VOL / CAPITAL) * 100);
b:=DATACOUNT-BARPOS+1;
Wb:=BARSLAST(SYSPARAM(1)=BARPOS)+1;
换手率1:=SUM(当天换手率,Wb);
累计换手:=refX(换手率1,Wb[DATACOUNT]-1);
DRAWTEXT(SYSPARAM(1)=BARPOS,picl,NUMTOSTR(b[SYSPARAM(1)],0)+'天'+'换手: '+NUMTOSTR(累计换手[SYSPARAM(1)],2)+'% '),align2,COLORYELLOW;
VERTLINE(SYSPARAM(1)=BARPOS),LINEDOT,COLORGREEN;
VERTLINE(SYSPARAM(3)=BARPOS and b),LINEDOT,COLORRED; {内容来至程序化交易网 CXH99.COM}

sj:=dataCOUNT-sysparam(1);
涨跌:=(DYNAINFO(7)-C)/C*100,COLORYELLOW,LINETHICK0;
{drawnumber(BARPOS+4=sysparam(1),l,sj,0),align5,COLORWHITE;//交易日}
DRAWTEXTex(1,0,10,250,'距今涨跌:'+NUMTOSTR(涨跌[SYSPARAM(1)],2)+'%'),align4,

{本文来至程序化交易网 cxh99.com}

{本文来至程序化交易网 cxh99.com}

(责任编辑:程序化交易网整理)

 

 

有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流进行 有偿 编写!不贵!点击查看价格!

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容