大智慧金融终端TRT顺势交易公式、源码,添加了均线系统(公式、源码)[大智慧公式]
相关标签:
TRT没有均线,看起来要MA来回切换十分不便,故增加。希望大家能喜欢!
{p1,5.p2,10.p3,20.p4,30.p5,60.p6,120.p7,250}
variable:a1=0;
c1:=INTPART(cyc(5)*100*0.96)/100;
a2:=intpart(ref(cyc(5),1)*100)/100;
a3:=intpart(ref(cyc(5),1)*0.96*100)/100;
vv:=intpart(min(capital*0.05,ref(ma(vol,34),1))/100);
a40:=intpart(maxcyc*100)/100;
a41:=intpart(ref(MAXCYC,1)*100)/100;
a4:=a1=0 and c>a2 or (ref(vol/100,1)<vv and c>intpart(a2*0.98*100)/100 and vol>min(capital*0.05,ref(ma(vol,34),1)));
a5:=a1=1 and c<min(a3,a41);
a1:=if(a4=1,1,if(a5=1,0,ref(a1,1)));
STICKLINE(a1=1 and c<o,c,o,8,1),color5454ff,layer0;
STICKLINE(a1=1 and c<o,c,o,6,0),colorffff54;
STICKLINE(a1=1 and c<o,c,l,0.5,0),color5454ff;
STICKLINE(a1=1 and c<o,h,o,0.5,0),color5454ff;
STICKLINE(a1=0 and c>o,c,o,8,1),colorffff54;
STICKLINE(a1=0 and c>o,c,h,0.5,0),colorffff54;
STICKLINE(a1=0 and c>o,l,o,0.5,0),colorffff54;
DRAWTEXT(cross(a1,0),l*0.9,'B'),coloryellow,LINETHICK3;
DRAWTEXT(cross(1,a1),h*1.05,'S'),COLORgreen,LINETHICK3;
DRAWFLAGTEXT(a1=0 and (c1*0.98-c)/c>0.1,c,'持币');
DRAWFLAGTEXT(a1=0 and (c1*0.98-c)/c<=0.1 and ref(vol/100,1)<vv,c,'明日收盘价超过'+str(c1)+';或收盘价超过'+str(intpart(c1*0.98*100)/100)+'且成交量大于'+str(vv)+'买入');
DRAWFLAGTEXT(a1=0 and (c1*0.98-c)/c<=0.1 and ref(vol/100,1)>=vv,c,'明日收盘价超过'+str(c1)+'买入');
DRAWFLAGTEXT(a1=1 and (c-min(c1,a40))/min(c1,a40)>0.1 ,c,'持股');
DRAWFLAGTEXT(a1=1 and (c-min(c1,a40))/min(c1,a40)<=0.1 ,c,'明日收盘价跌破'+str(min(c1,a40))+'卖出');
MA5:MA(CLOSE,p1),colorwhite;
MA10:MA(CLOSE,p2),COLORYELLOW;{http://cxh99.com}
MA20:MA(CLOSE,p3),COLORFF00FF;
MA30:MA(CLOSE,p4),COLORGREEN;{http://www.cxh99.com}
ma60:ma(close,p5),colorred;
ma120:ma(close,p6),colorblue;
ma250:ma(close,p7),colorcyan;
【本文仅仅提供源码,请依照下面的编辑录像自己做成公式】
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容