【小广主图】
{-----【小广主图】---首个采用数理化模型对传统ma均线进行精确优化的指标!-----}
{---------------------------分时主图+自动画线------------------------------}
画线取值:=intpart(3*8/5);
aaa:=ref(h,画线取值)=hhv(h,2*画线取值+1);
qyy:=backset(aaa,画线取值+1);
ccc:=filter(qyy,画线取值) and h=hhv(h,画线取值+1);
dddd:=barslast(ccc),nodraw;
gdtss:=if(ccc,currbarscount,0);
dingbutss:=if(dddd,ref(gdtss,dddd),gdtss);
gdcs11:=const(dingbutss);
dingbuts11:=ref(dingbutss,dddd+1);
gdcs22:=const(dingbuts11);
aa11:=ref(l,画线取值)=llv(l,2*画线取值+1);
qy11:=backset(aa11,画线取值+1);
cc11:=filter(qy11,画线取值) and l=llv(l,画线取值+1);
dd11:=barslast(cc11);
ddtss:=if(cc11,currbarscount,0);
ddts11:=if(dd11,ref(ddtss,dd11),ddtss);
ddcs11:=const(ddts11);
ddts22:=ref(ddts11,dd11+1);
ddcs22:=const(ddts22);
支撑:=drawline(currbarscount=ddcs22,l,currbarscount=ddcs11,l,1),color00cccc;
{-------------------------通达信新分时源码广哥深度优化版--------------------}
a:=currbarscount;
a1:=day!=ref(day,1);
a2:=barslast(a1)+1;
a3:=ma(c,a2);
a4:=sum(amo,a2)/sum(vol,a2)/100;
a5:=if(capital>0,a4,a3);
均价线:=if(a<=const(a2),a5,drawnull);
分钟有效周期:=if(period=2,15,if(period=3,30,if(period=4,60,if(period=5,240,drawnull))));
分时价:=tfilt(close,currbarscount,00,currbarscount,00);
分时判断:=if(分时价=drawnull,1,if(分钟有效周期=drawnull,drawnull,1));
k线隐藏:stickline(c>0 and 分时判断=drawnull,h,l,3,1),color000000;
{--------------------------盘面资金----------------------------------------}
rc:=if(分时价>0.01 and 分时判断=drawnull,dynainfo( 3),drawnull);
s2:=sma(c,2,1);
s6:=sma(c,6,1);
dk:=2*(s2-s6);
买量:stickline(dk>0 and 分时判断=drawnull,rc,rc+dk,0.01,0),color000040;
卖量:stickline(dk<0 and 分时判断=drawnull,rc,rc+dk,0.01,0),color004000;
历史收盘价:=if(分时价>0.01 and 分钟有效周期=drawnull and a>=const(a2),c,drawnull),color8800ff;
前收盘价:=if(历史收盘价>0.01,dynainfo(3),drawnull),colorred,color404080;
前收盘价画线:drawband(前收盘价,rgb(64,64,64),前收盘价,rgb(128,128,128));
历史价:=if(分时判断=drawnull and a>=const(a2),c,drawnull),color8800ff;
昨收:if(a<=const(a2) and 分时判断=drawnull,dynainfo(3),drawnull),linethick2,color404080;
现价:=if(a<=const(a2) and 分时判断=drawnull,close,drawnull),colorffffff;
均价:=if(a<=const(a2) and 分时判断=drawnull,a5,drawnull),color80ffff;
{牛熊线原码----------z.自然数时权均线,用于tdx等 无wma(c,n)函数之股软------}
m:=c;
zl91:=(90*m+89*ref(m,1)+88*ref(m,2)+87*ref(m,3)+86*ref(m,4)+85*ref(m,5)+84*ref(m,6)+83*ref(m,7)+82*ref(m,8)+81*ref(m,9)+80*ref(m,10)+79*ref(m,11)+
78*ref(m,12)+77*ref(m,13)+76*ref(m,14)+75*ref(m,15)+74*ref(m,16)+73*ref(m,17)+72*ref(m,18)+71*ref(m,19));
zl92:=(70*ref(m,20)+69*ref(m,21)+68*ref(m,22)+67*ref(m,23)+66*ref(m,24)+65*ref(m,25)+64*ref(m,26)+63*ref(m,27)+62*ref(m,28)+61*ref(m,29)+60*ref(m,30)+
59*ref(m,31)+58*ref(m,32)+57*ref(m,33)+56*ref(m,34)+55*ref(m,35)+54*ref(m,36)+53*ref(m,37)+52*ref(m,38)+51*ref(m,39));
zl93:=(50*ref(m,40)+49*ref(m,41)+48*ref(m,42)+47*ref(m,43)+46*ref(m,44)+45*ref(m,45)+44*ref(m,46)+43*ref(m,47)+42*ref(m,48)+41*ref(m,49)+40*ref(m,50)+
39*ref(m,51)+38*ref(m,52)+37*ref(m,53)+36*ref(m,54)+35*ref(m,55)+34*ref(m,56)+33*ref(m,57)+32*ref(m,58)+31*ref(m,59));
zl94:=(30*ref(m,60)+29*ref(m,61)+28*ref(m,62)+27*ref(m,63)+26*ref(m,64)+25*ref(m,65)+
24*ref(m,66)+23*ref(m,67)+22*ref(m,68)+21*ref(m,69)+20*ref(m,70)+19*ref(m,71)+18*ref(m,72)+17*ref(m,73)+16*ref(m,74)+15*ref(m,75)+14*ref(m,76)+13*ref(m,77)+
12*ref(m,78)+11*ref(m,79));
zl95:=10*ref(m,80)+9*ref(m,81)+8*ref(m,82)+7*ref(m,83)+6*ref(m,84)+5*ref(m,85)+4*ref(m,86)+3*ref(m,87)+2*ref(m,88)+ref(m,89);
③号线:=(zl91+zl92+zl93+zl94+zl95)/4095;{wma90a}
{------------------------z.自然数时权均线之--牛熊线原码--------------------}
zl13:=(120*m+119*ref(m,1)+118*ref(m,2)+117*ref(m,3)+116*ref(m,4)+115*ref(m,5)+114*ref(m,6)+113*ref(m,7)+112*ref(m,8)+111*ref(m,9)+110*ref(m,10)+109*ref(m,11)+
108*ref(m,12)+107*ref(m,13)+106*ref(m,14)+105*ref(m,15)+104*ref(m,16)+103*ref(m,17)+
102*ref(m,18)+101*ref(m,19));
zl14:=(100*ref(m,20)+99*ref(m,21)+98*ref(m,22)+97*ref(m,23)+96*ref(m,24)+95*ref(m,25)+94*ref(m,26)+93*ref(m,27)+92*ref(m,28)+91*ref(m,29)+90*ref(m,30)+
89*ref(m,31)+88*ref(m,32)+87*ref(m,33)+86*ref(m,34)+85*ref(m,35)+84*ref(m,36)+83*ref(m,37)+82*ref(m,38)+81*ref(m,39));
zl15:=(80*ref(m,40)+79*ref(m,41)+78*ref(m,42)+77*ref(m,43)+76*ref(m,44)+75*ref(m,45)+74*ref(m,46)+73*ref(m,47)+72*ref(m,48)+71*ref(m,49)+70*ref(m,50)+
69*ref(m,51)+68*ref(m,52)+67*ref(m,53)+66*ref(m,54)+65*ref(m,55)+64*ref(m,56)+63*ref(m,57)+62*ref(m,58)+61*ref(m,59));
zl16:=(60*ref(m,60)+59*ref(m,61)+58*ref(m,62)+57*ref(m,63)+56*ref(m,64)+55*ref(m,65)+
54*ref(m,66)+53*ref(m,67)+52*ref(m,68)+51*ref(m,69)+50*ref(m,70)+49*ref(m,71)+48*ref(m,72)+47*ref(m,73)+46*ref(m,74)+45*ref(m,75)+44*ref(m,76)+43*ref(m,77)+
42*ref(m,78)+41*ref(m,79));
zl17:=(40*ref(m,80)+39*ref(m,81)+38*ref(m,82)+37*ref(m,83)+36*ref(m,84)+35*ref(m,85)+34*ref(m,86)+33*ref(m,87)+32*ref(m,88)+31*ref(m,89)+30*ref(m,90)+
29*ref(m,91)+28*ref(m,92)+27*ref(m,93)+26*ref(m,94)+25*ref(m,95)+24*ref(m,96)+23*ref(m,97)+22*ref(m,98)+21*ref(m,99));
zl18:=(20*ref(m,100)+19*ref(m,101)+18*ref(m,102)+17*ref(m,103)+16*ref(m,104)+15*ref(m,105)+14*ref(m,106)+13*ref(m,107)+12*ref(m,108)+11*ref(m,109)+10*ref(m,110)+
9*ref(m,111)+8*ref(m,112)+7*ref(m,113)+6*ref(m,114)+5*ref(m,115)+4*ref(m,116)+3*ref(m,117)+2*ref(m,118)+ref(m,119));
牛熊线:=(zl13+zl14+zl15+zl16+zl17+zl18)/7260,color808040,colorff8080;{wma120a}
{---------------k线的简单微积分技术与黄金分割均线整合优化------------------}
ed1:=(-2*ref(c,2)+ref(c,1)+2*c);{5点平滑二导右半支};
jf1:=sma(sma(ed1,3,1),3,1);
⑤日◆分时现价:if(分时判断=1,sma(jf1,3,2),现价),colorffffff;
⑩日◆分时均价:if(分时判断=1,sma(jf1,8,2),均价),color00ffff;
月线修正a:=if(sma(jf1,21,2)>ma(c,20) or ma(c,20)=drawnull,sma(jf1,21,2),ma(c,20));
月线修正b:=if(月线修正a>=sma(jf1,34,2),月线修正a,sma(jf1,34,2)),color990099;
月◆昨分时价:if(分时判断=1,月线修正b,历史价),color990099;
{----------------------------短期均线多空趋势彩带--------------------------}
5日均线:=if(分时价=drawnull,sma(jf1,3,2),if(分钟有效周期=drawnull,drawnull,sma(jf1,3,2))),colorffffff;
10日均线:=if(分时价=drawnull,sma(jf1,8,2),if(分钟有效周期=drawnull,drawnull,sma(jf1,8,2))),color00ffff;
均线多空趋势:drawband(5日均线,rgb(128,128,51),10日均线,rgb(51,153,102));
{--------------------------60日,半年,年线优化修正------------------------}
60日线起点:=barssince(cross(牛熊线,ma(c,60)));
传统60日线:=if(60日线起点>=1,ma(c,60),牛熊线),color00ff00;
60日线修正:=if(sma(jf1,55,2)>③号线,③号线,sma(jf1,55,2)),colorff8080;
60日:if(60日线修正<传统60日线 or 传统60日线=drawnull,60日线修正,传统60日线),color008000;
半年:if(牛熊线>sma(jf1,144,2),sma(jf1,144,2),牛熊线),colorc08080;
年:sma(jf1,233,2),colorcc0000;
{--------创幻论坛‘131488’会员提供的通达信■新宝塔线■-----原码-----------}
最高价:=high; 最低价:=low; 收盘价:=close; 开盘价:=open;
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);
红色持股区:=(var1 or var2 or var3 or var4 or var5 or var6 or var7 or var8 or var9 or vara or varb or varc)
and 分时判断=1;
vard:=close<ref(close,1) and close<ref(close,2);
三平顶翻绿:=(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 and 分时判断=1;
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);
兰色观望区:=(vard or vare or varf or var10 or var11 or var12 or var13 or var14 or var15 or var16 or var17 or var18)
and 分时判断=1;
三平底翻金:=(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 and 分时判断=1;
持股区上色:=(三平底翻金 or 收盘价<开盘价);
观望区上色:=(三平顶翻绿 or 收盘价<开盘价);
{----------由‘往事如风-小广’原创的--常规k线与宝塔线整合优化--------------}
红色实体1:stickline(红色持股区 and 持股区上色,close,ref(close,1),3,0),color330077;
兰色实体1:stickline(兰色观望区,close,ref(close,1),3,0),coloraa5500;
金色实体1:stickline(三平底翻金,ref(close,1),ref(close,2),3,0),color2288cc;
绿色实体1:stickline(三平顶翻绿,ref(close,1),ref(close,2),3,0),color007300;
阴线实体:stickline(收盘价<开盘价 and 分时判断=1,收盘价,开盘价,3,0 ),colorcyan;
阳线实体:stickline(收盘价>开盘价 and 分时判断=1,收盘价,开盘价,3.0,0 ),color3232ff;
{----------------------------------收阳兰色区域----------------------------}
本日收阴1:stickline(收盘价<开盘价 and 分时判断=1,收盘价,开盘价,2.0,0),colordd3c00;
本日收阴2:stickline(收盘价<开盘价 and 分时判断=1,收盘价,开盘价,1.25,0),coloree4000;
本日收阴3:stickline(收盘价<开盘价 and 分时判断=1,收盘价,开盘价,0.40,0),colorff4c00;
{----------------------------------收阳红色区域----------------------------}
本日收阳2:stickline(收盘价>开盘价 and 分时判断=1,close,o,2.0,0),color440088;
本日收阳3:stickline(收盘价>开盘价 and 分时判断=1,close,o,1.25,0),color550099;
本日收阳4:stickline(收盘价>开盘价 and 分时判断=1,close,o,0.40,0),color6600aa;
{-----------------------红色区域,真阳宝塔,持股待涨-------------------------}
红色中心2:stickline(红色持股区 and 持股区上色,close,ref(close,1),2.0,0),color440088;
红色中心3:stickline(红色持股区 and 持股区上色,close,ref(close,1),1.25,0),color550099;
红色中心4:stickline(红色持股区 and 持股区上色,close,ref(close,1),0.4,0),color6600aa;
{-----------------------兰色区域,真阴宝塔,空仓观望-------------------------}
兰色中心2:stickline(兰色观望区,close,ref(close,1),2.0,0),coloraa6600;
兰色中心3:stickline(兰色观望区,close,ref(close,1),1.25,0),colorbb7700;
兰色中心4:stickline(兰色观望区,close,ref(close,1),0.40,0),colorcc8800;
{-----------------------三平底翻金,阴转阳宝塔,买进-------------------------}
金色中心2:stickline(三平底翻金,ref(close,1),ref(close,2),2.0,0),color3599dd;
金色中心3:stickline(三平底翻金,ref(close,1),ref(close,2),1.25,0),color45aaee;
金色中心4:stickline(三平底翻金,ref(close,1),ref(close,2),0.40,0),color55bbff;
{-----------------------三平顶翻绿-阳转阴宝塔,卖出-------------------------}
绿色中心2:stickline(三平顶翻绿,ref(close,1),ref(close,2),2.0,0),color008600;
绿色中心3:stickline(三平顶翻绿,ref(close,1),ref(close,2),0.7,0),color009900;
{-----------------5日,10日,月线,60日线,半年线,年线重画----------------}
阻力:=drawline(currbarscount=gdcs22,h,currbarscount=gdcs11,h,1),color808040;
支撑重画:=drawband(昨收,rgb(102,0,204),昨收,rgb(204,204,0));
年线:=drawband(年,rgb(0,0,204),年,rgb(0,0,204));
半年线:drawband(半年,rgb(128,128,192),半年,rgb(128,128,192));
60日线:drawband(60日,rgb(0,128,0),60日,rgb(0,128,0));
月线:drawband(月◆昨分时价,rgb(153,0,153),月◆昨分时价,rgb(153,0,153));
10日线:drawband(⑩日◆分时均价,rgb(255,255,0),⑩日◆分时均价,rgb(255,255,0));
5日线:drawband(⑤日◆分时现价,rgb(255,255,255),⑤日◆分时现价,rgb(255,255,255));
{-------------------k线收平,k线实体,开盘与收盘线,重画线--------------------}
收平实体:stickline(收盘价=开盘价 and 分时判断=1,开盘价,开盘价,2,0),colorwhite;{白色}
收平影线:stickline(收盘价=开盘价 and 分时判断=1,最低价,最高价,0,0),colorwhite;{白色}
收阳开盘:stickline(收盘价>开盘价 and 分时判断=1,开盘价,开盘价,2.0,0 ),color3232ff;{橙红色}
收阳收盘:stickline(收盘价>开盘价 and 分时判断=1,收盘价,收盘价,2.0,0 ),color3232ff;{橙红色}
收阴开盘:stickline(收盘价<开盘价 and 分时判断=1,开盘价,开盘价,2,0 ),colorcyan;{亮兰色}
收阴收盘:stickline(收盘价<开盘价 and 分时判断=1,收盘价,收盘价,2,0 ),colorcyan;{亮兰色};
{-----------------------------上下影线重画---------------------------------}
阳线上影:stickline(收盘价>开盘价 and 分时判断=1,收盘价,最高价,0,0 ),color3232ff;{橙红色}
阳线下影:stickline(收盘价>开盘价 and 分时判断=1,开盘价,最低价,0,0 ),color3232ff;{橙红色}
阴线上影:stickline(收盘价<开盘价 and 分时判断=1,开盘价,最高价,0,0 ),colorcyan;{亮兰色}
阴线下影:stickline(收盘价<开盘价 and 分时判断=1,收盘价,最低价,0,0 ),colorcyan;{亮兰色};
上一指标公式:保证准指标详解 通达信源码
下一指标公式:买卖黄金线指标详解 通达信买卖黄金
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文小广主图指标详解 通达信小广主图仅供学习研究。