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

流金岁月指标 公式 源码[其他软件公式]

指标公式代码分析:

 

该指标是一个基于股票的技术分析工具,用于预测股票价格的走势和判断买卖信号。下面是对该指标源码的简要编程思路和指标使用说明:

编程思路:
1. 首先定义了一系列变量,包括rsi、sma、ema等,用于计算指标的中间结果。
2. 根据给定的公式计算各个中间结果,并将其赋值给相应的变量。
3. 使用stickline函数绘制持仓和空仓的线条,使用fillrgn函数绘制流金和岁月之间的填充区域,使用drawicon函数绘制符号图标。
4. 根据不同条件使用不同的颜色和线条粗细来绘制相应的图形。
5. 使用explain和explainex函数输出相关信息,例如市场平均成本、主力平均成本等。

指标使用说明:
1. 该指标包含了多个子指标,如RSV、MACD等,可以根据实际需求选择使用。
2. 可以通过观察持仓和空仓的线条以及流金和岁月的填充区域来判断股票的买卖信号。持仓表示建议买入,空仓表示建议卖出。
3. MACD指标用于判断股票的短期和长期趋势,当MACD线从负值变为正值时,表示买入信号;当MACD线从正值变为负值时,表示卖出信号。
4. 可以观察神奇线、半年线等指标的变化来判断股票价格的涨跌趋势和买卖信号。
5. 通过输出的各种信息和指标数值,可以帮助分析股票的市场情况和预测价格的走势。

需要注意的是,以上只是对该指标源码的简要分析和说明,具体的使用方法还需要根据实际情况和个人需求进行调整和应用。在使用任何股票分析工具时,都需要结合自己的投资经验和市场情况进行准确分析和判断。

 

源码:

 

 

rsv:=(c-llv(l,7))/(hhv(h,7)-llv(l,7))*100;
rsv1:=(c-llv(l,38))/(hhv(h,38)-llv(l,38))*100;
流金:sma(rsv1,5,1),colorff;
岁月:sma(流金,10,1),color66cc33;
fillrgn(流金<=岁月,流金,岁月),color669933;
a:=(3*c+l+o+h)/6;
b:=(20*a+19*ref(a,1)+18*ref(a,2)+17*ref(a,3)+16*ref(a,4)+15*ref(a,5)+14*ref(a,6)+13*ref(a,7)+12*ref(a,8)+11*ref(a,9)+10*ref(a,10)+9*ref(a,11)+8*ref(a,12)+7*ref(a,13)+6*ref(a,14)+5*ref(a,15)+4*ref(a,16)+3*ref(a,17)+2*ref(a,18)+ref(a,20))/210;
d:=ma(b,10);
持仓:stickline(b>d,103,107,6,1),Linethick2,colorff;
空仓:stickline(b<d,103,107,6,1),Linethick2,colorff00;
CXH2q:=ma(c,80)-ma(c,13)/3;
神奇线:=ma((c-CXH2q)/CXH2q,1);
xa:=ema(神奇线,12)*0.7;
xb:=ema(神奇线,3);
底部区域:if(llv(xb-xa,12)>0,0,-5),Linethick2,colorff00;
diff:=(ema(c,17)-ema(c,73))*100;
dea:=ema(diff,73);
macd:=2*(diff-dea);
地利:if(diff<=0 and dea<=diff and ref(diff,1)<ref(dea,1),10,0),stick,color5c32d4;
买入:=stickline(diff<=0 and dea<=diff and ref(diff,1)<ref(dea,1),0,3,40,0);
买入:stickline(diff<=0 and dea<=diff and ref(diff,1)<ref(dea,1),3,6,30,0),Linethick2,colorffff;
stickline(diff<=0 and dea<=diff and ref(diff,1)<ref(dea,1),6,20,5,0),colorffff;
diff:=(ema(c,17)-ema(c,73))*100;
dea:=ema(diff,73);
macd:=2*(diff-dea);
if(diff<=0 and dea<=diff and ref(diff,1)<ref(dea,1),10,0),colorff0000;
卖出:=stickline(diff>=0 and dea>=diff and ref(diff,1)>ref(dea,1),97,100,40,0);
天时:stickline(diff>=0 and dea>=diff and ref(diff,1)>ref(dea,1),94,97,30,0),stick,color5c32d4;
stickline(diff>=0 and dea>=diff and ref(diff,1)>ref(dea,1),80,94,5,0),colorffff;
CXH0:=date>970101;
CXH1:=(c-ref(c,1))/ref(c,1)*100;
CXH2:=(indexc-ref(indexc,1))/ref(indexc,1)*100;
CXH3:=ema(sum(CXH1,10),3);
CXH4:=ema(sum(CXH2,10),3);
CXH5:=(CXH3-CXH4)*CXH0;
drawicon(CXH5<-20 and filter(CXH5>ref(CXH5,2),7),-6,4),colorff;
vertline(CXH5<-20 and filter(CXH5>ref(CXH5,2),7));
drawtext(CXH5<-20 and filter(CXH5>ref(CXH5,2),7),-10,'---参考价'),colorff;
drawnumber(CXH5<-20 and filter(CXH5>ref(CXH5,2),7),-15,ref(c,1)*1.015,2),colorffffff;
drawicon(CXH5>20 and filter(CXH5<ref(CXH5,2),7),17,5),colorffffff;
vertline(CXH5>20 and filter(CXH5<ref(CXH5,2),7));
drawtext(CXH5>20 and filter(CXH5<ref(CXH5,2),7),-10,'---参考价'),colorff00;
drawnumber(CXH5>20 and filter(CXH5<ref(CXH5,2),7),-15,ref(c,1)*0.985,2),colorff00;
stickline(CXH5<-20 and filter(CXH5>ref(CXH5,2),7),0,-4,15,0);
stickline(CXH5>20 and filter(CXH5<ref(CXH5,2),7),0,-4,10,0),colorff;
a1:=ma(c,13);
zx:=ref(a1,13/2+1);
b1:=cross(c,zx);
s1:=cross(zx,c);
drawicon(cross(c,zx),-3,12),colorff00;
drawicon(c>zx and ref(c,1)>ref(zx,1),-3,10);
drawicon(c<zx and ref(c,1)>ref(zx,1),-3,11);
vvv:=9999;
lgl:=c-ref(ma(c,20),11);
wr1:=if(ema(c,5)/ema(ema(c,9),16)<=0.85 and c/ref(c,1)>0.905 and c/ref(c,1)<1.05 and v/capital*100<5,50,0);
wr2:=-(100*(hhv(h,34)-c)/(hhv(h,34)-llv(l,34)))+100*lgl;
wr3:=-(100*(hhv(h,50)-c)/(hhv(h,50)-llv(l,50)))+100;
bias1:=-(100*(hhv(h,70)-c)/(hhv(h,70)-llv(l,70)))+100*lgl;
bias2:=((c-ma(c,34))/ma(c,34)*100+10)*5;
bias3:=((c-ma(c,50))/ma(c,50)*100+10)*5;
sx:=((c-ma(c,70))/ma(c,70)*100+10)*5;
s1:=(wr2+wr3+bias1+bias2+bias3+sx)/6*lgl;
xc1:=ema(s1,3);
ccc:=abs(bias2-sx);
zjz:=(s1+ccc)/2;
lxl:=(-1)*(ema(100*(1-winner(c)),1)-50)+50;
jbj:=lxl+zjz;
ma3:=if(wr1>0 and jbj<0,200,0)*lgl;
c0:=if(zjz<0 and c=llv(c,5) and c/ref(c,1)>0.905 and c/ref(c,1)<1.05 and v/capital*100<5,-50,0);
bot:=if(jbj<0 and c0=-50,100,0)*lgl;
hsl:=ma(c,3);
cxc:=ref(c,2)*0.865;
vmc:=ref(c,13)*0.772;
v93:=min(cxc,vmc);
v90:=100*v/capital*lgl;
半年线:=if((c-v93)/c<3/100 and sum(v90,5)/5<1.8,1,0);
股道卖出价预测:=if(半年线>0 and (c0<0 or wr1>0),10,0);
if(股道卖出价预测>0,30,0);
天涯:if(ma3>0 and bot>0 and sum(v/capital*100,5)/5<1 or 半年线>0 and ref(c,1)/ref(c,2)>0.902 or (ma3>0 and bot>0 and sum(v/capital*100,5)/5<1 or 半年线>0) and (c0<0 or wr1>0) and 股道卖出价预测<10,20,0),Linethick2,colorff;
股道买入价预测:=(ma3>0 and bot>0 and sum(v/capital*100,5)/5<1 or 半年线>0) and (c0<0 or wr1>0);
多空1:=ma3>0 and bot>0 and sum(v/capital*100,5)/5<1 or 半年线>0 and ref(c,1)/ref(c,2)>0.902;
海角:if(股道买入价预测 or 多空1,10,0),Linethick2,colorff;
CXH2q:=ma(c,80)-ma(c,13)/3;
神奇线:=ma((c-CXH2q)/CXH2q,1);
天神:if(cross(神奇线,0) and l/ref(h,1)<1.012 and (c-ref(c,2))/c>0.06,15,0),Linethick2,colorffcc33;
a:=ema(winner(c),10);
b:=ema(winner(c),34);
CXH1:=ma(v,5)>ma(v,60);
地神:if(a<0.15 and abs(a-b)<0.05 and cross(a,b) and CXH1,1,0)*-10,Linethick2,colorffcc33;
介入:if(a>0.9 and c<ma(c,5),1,0)*-10,Linethick2,colorff;
多空2:=ema(c,148);
多空3:=ema(c,250);
出货:explain(c>=多空2,'股价在半年线之上'),Linethick2,colorff00;
explain(c>=多空3,'股价在年线之上 '),colorffff;
explain(c<多空2,'股价在半年线之下 '),colorffff;
explain(c<多空3,'股价在年线之下 '),colorffff00;
explain(多空2>=ref(多空2,1),'半年线趋势向上'),colorffff00;
explain(多空3>=ref(多空3,1),'年线趋势向上 '),colorffff;
explain(多空2<ref(多空2,1),'半年线趋势向下 '),colorffff;
explain(多空3<ref(多空3,1),'年线趋势向下 '),colorffff00;
tr1:=c*2.5/100+c;
hd:=c-c*2.5/100;
explainex(cost(50),'市场平均成本:',cost(50),2,0),colorffff00;
explainex(cost(4),'主力平均成本:',cost(4),2,0),colorffff;
explainex(cost(30),'控盘平均成本:',cost(30),2,0),colorff;
explainex(cost(75),'拉升平均成本:',cost(75),2,0),colorff;
explainex(cost(95),'顶部平均成本:',cost(95),2,0),colorffff;
explainex(cost(0.05),'底部平均成本:',cost(0.05),2,0),colorffff;
explainex(tr1,'股道卖出价预测:',tr1,2,0),colorffff;
explainex(hd,'股道买入价预测:',hd,2,0),color99ff;
explainex(1,'获利盘比例=',winner(c)*100,2,0),color99ff;explain(dmm<ld and dmp>ma(dmp,4),'场内资金有运作行为'),colorffff00;
explain(dmm>ld and dmp<ma(dmp,4),'多空双方激烈争夺中'),colorffff;
explain(dmm>ld and dmp>ma(dmp,4),'场外资金介入(或出局)意愿强烈'),colorffff;
pdi:=sum(max(max(h-l,abs(h-ref(c,1))),abs(l-ref(c,1))),14);
mdi:=h-ref(h,1);
adx:=ref(l,1)-l;
adxr:=sum(if(mdi>0 and mdi>adx,mdi,0),14);
typ:=sum(if(adx>0 and adx>mdi,adx,0),14);
cci:=adxr*100/pdi;
wr:=typ*100/pdi;
mtm:=ma(abs(wr-cci)/(wr+cci)*100,6);
mtmma:=(mtm+ref(mtm,6))/2;
explain(cross(cci,wr),'PDI线从下向上突破MDI线,显示有新多头进场,为买进信号'),color99ff;
explain(cross(wr,cci),'PDI线从上向下跌破MDI线,显示有新空头进场,为卖出信号'),colorff00;
explain(mtm>ref(mtm,1),'ADX值持续高于前一日,行情将维持原趋势'),colorffff00;
explain(mtm<ref(mtm,1) and mtm<20,'ADX值递减,降到20以下,且横向行进时,市场气氛

 

公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程

 

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

怎么收费,代编流程等详情请点击查阅!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

 


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

相关文章

    没有相关内容