tmp:=open-close;
drawline(tmp>0.0001,high,tmp>0.0001,open,colorcyan);
drawline(tmp>0.0001,low,tmp>0.0001,close,colorcyan);
drawline(tmp<-0.0001,high,tmp<-0.0001,close,colorred);
drawline(tmp<-0.0001<close,low,tmp<-0.0001,open,colorred);
drawline(abs(tmp)<0.0001,low,abs(tmp)<0.0001,open,colorwhite);
drawline(abs(tmp)<0.0001,high,abs(tmp)<0.0001,open,colorwhite);
stickline(tmp>0,open,close,colorcyan,0);
stickline(tmp<=0,open,close,colorred,1);
var1:=high>=refx(high,1) && high>=refx(high,2) && high=hhv(high,3);
var2:=low<=refx(low,1) && low<=refx(low,2) && low = llv(low,3);
stickline(var1,open,close,colormagenta,0);
stickline(var2,open,close,colorgreen,0);
stickline(cross(high,ref(high,barslast(var1))),ref(high,barslast(var1)),1.002*ref(high,barslast(var1)),colorwhite,0);
stickline(cross(ref(low,barslast(var2)),low),ref(low,barslast(var2)),0.998*ref(low,barslast(var2)),coloryellow,0);
drawtext(var1,1.02*high,'----');
drawtext(var2,1.02*low,'----');
drawtext(cross(high,ref(high,barslast(var1))),1.004*ref(high,barslast(var1)),'涨');
drawtext(cross(ref(low,barslast(var2)),low),1.004*ref(low,barslast(var2)),'跌');
文华财经用鳄鱼线指标(主图)
var1:=(high+low)/2;
lip:ref(sma(var1,5,1),3),colorgreen;
tooth:ref(sma(var1,8,1),5),colorred;
jaw:ref(sma(var1,13,1),8),colorblue;
//{平衡线}
p1:=ref(high,1)>high and ref(high,1)>jaw;
bbuy:ref(ref(high,1),barslast(p1)),colorwhite;
stickline(cross(high,bbuy) and low>bbuy,(high+low)/2,(high+low)/2,colorwhite,0);
stickline(cross(high,bbuy) and low<=bbuy,bbuy,bbuy,colorwhite,0);
p2:=ref(low,1)<low and ref(low,1)<jaw;
bsell:ref(ref(low,1),barslast(p2)),colormagenta;
stickline(cross(bsell,low) and high<bsell,(high+low)/2,(high+low)/2,colormagenta,0);
stickline(cross(bsell,low) and high>=bsell,bsell,bsell,colormagenta,0);
ho:=high>ref(high,1) and high>ref(high,2) and high>=refx(high,1) and ifelse(high=refx(high,2),high>refx(high,3),high>refx(high,2));
fxh:=cross(ho,0.9);
hh:=ref(high,barslast(fxh));
lo:=low<ref(low,1) and low<ref(low,2) and low<=refx(low,1) and ifelse(low=refx(low,2),low<refx(low,3),low<refx(low,2));
fxl:=cross(lo,0.9);
ll:=ref(low,barslast(fxl));
//drawsl(ll,low,0,2,0, colorgreen);
//drawsl(hh,high,0,2,0, colorred);
//sfx: hh, pointdot,colorea91b5;
stickline(close,hh,hh,colorred,0);
//xfx: ll, pointdot,color3791b5;
stickline(close,ll,ll,coloryellow,0);
y:=(high+low)/2;
//ao:=ma(var1,5)-ma(var1,34);
ac:=ma(y,5)-ma(y,34)-ma(ma(y,5)-ma(y,34),5);
ac1:=ref(ac,1);
//{stickline(ac>ac1,20,ac+20,8,0),colorred;}
//{stickline(ac<ac1,20,ac+20,8,0),colorgreen;}
var1:=(high+low)/2;
ao:=ma(var1,5)-ma(var1,35);
ao1:=ref(ao,1);
//{stickline(ao>ao1,0,ao,8,0),colorred;}
//{stickline(ao<ao1,0,ao,8,0),colorgreen;}
stickline(ac>ac1 and ao>ao1,high,low,colorred,0);
m:=ifelse(close>open,0,1);
stickline(ac>ac1 and ao>ao1 and close<open,close,open,colorred,1);
stickline(ac>ac1 and ao>ao1 and close>open,close,open,colorred,0);
stickline(ac>ac1 and ao<ao1 or ac<ac1 and ao>ao1,high,low,colorlightgrey,0);
stickline((ac>ac1 and ao<ao1 or ac<ac1 and ao>ao1) and close>open,close,open,colorlightgrey,0);
stickline((ac>ac1 and ao<ao1 or ac<ac1 and ao>ao1) and close<open,close,open,colorlightgrey,1);
stickline(ac<ac1 and ao<ao1,high,low,colorgreen,0);
stickline(ac<ac1 and ao<ao1 and close>open,close,open,colorgreen,0);
stickline(ac<ac1 and ao<ao1 and close<open,close,open,colorgreen,1);
r1:=ref(sma(y,8,1),5);
r2:=ifelse(c<r1,0,r1);
r3:=ifelse(c>r1,0,r1);
//{========ao及ac方向========}
drawtext(islastbar and ao>ref(ao,1) and ac>ref(ac,1),1.0004*r1,'↑↑');
drawtext(islastbar and ao<ref(ao,1) and ac<ref(ac,1),1.0004*r1,'↓↓');
drawtext(islastbar and ao>ref(ao,1) and ac<ref(ac,1),1.0004*r1,'↑↓');
drawtext(islastbar and ao<ref(ao,1) and ac>ref(ac,1),1.0004*r1,'↓↑');
文华财经用ac指标(副图)
//{ chaos accelerator/decelerator oscillator }
//{ measures acceleration -ac}
//{ plot as histogram }
y:=(high+low)/2;
ac:=ma(y,5)-ma(y,34)-ma(ma(y,5)-ma(y,34),5);
//{put in the same window and plot green}
acgreen:ifelse(ac>ref( ac,1) ,ac,0 ),colorred;
stickline(ac<ref(ac,1),0,ac,colorgreen,1);
//{put in its on window as a histogram and plot red}
acred:ifelse(ac<ref( ac,1) ,ac,0 ),colorgreen;
stickline(ac>ref(ac,1),0,ac,colorred,1);
ac1:=ref(ac,1);
buy1:=ref(ac,3)<ref(ac1,3) and ref(ac,2)<ref(ac1,2) and ref(ac,2)<ref(ac,3) and ref(ac,1)>ref(ac1,1) and ac>ac1 and count(ac>0,4)=4;// {ref(ac,3)>0 and ref(ac,1)>0 and ref(ac,2)>0 and ac>0};
//drawicon(buy1,ac,4);
drawtext(buy1,ac, 'b'),colorwhite;
buy2:=count(ac<0,4)=4 and ref(ac,3)<ref(ac1,3) and count(ac>ac1,3)=3;
//drawicon(buy2,ac,4);
drawtext(buy2,ac, 'b'),colorwhite;
buy3:=ref(ac,3)<ref(ac1,3) and ref(ac,2)<ref(ac1,2) and ref(ac,2)<ref(ac,3) and count(ac>ac1,2)=2 and ref(ac,1)<0 and ac>0;
//drawicon(buy3,ac,4);
drawtext(buy3,ac, 'b'),colorwhite;
buy4:=ref(ac,4)<ref(ac1,4) and ref(ac,3)<ref(ac1,3) and ref(ac,3)<ref(ac,4) and count(ac>ac1,3)=3 and ref(ac,1)<0 and ac>0;
//drawicon(buy4,ac,4) align0;
drawtext(buy4,ac, 'b'),colorwhite;
s1:=ref(ac,3)>ref(ac1,3) and ref(ac,2)>ref(ac1,2) and ref(ac,2)>ref(ac,3) and ref(ac,1)<ref(ac1,1) and ac<ac1 and count(ac<0,4)=4;// {ref(ac,3)<0 and ref(ac,1)<0 and ref(ac,2)<0 and ac<0};
//drawicon(s1,ac,5);
drawtext(s1,ac, 's'),colorwhite;
s2:=count(ac>0,4)=4 and ref(ac,3)>ref(ac1,3) and count(ac<ac1,3)=3;
//drawicon(s2,ac,5);
drawtext(s2,ac, 's'),colorwhite;
s3:=ref(ac,3)>ref(ac1,3) and ref(ac,2)>ref(ac1,2) and ref(ac,2)>ref(ac,3) and count(ac<ac1,2)=2 and ref(ac,1)>0 and ac<0;
//drawicon(s3,ac,5);
drawtext(s3,ac, 's'),colorwhite;
s4:=ref(ac,4)>ref(ac1,4) and ref(ac,3)>ref(ac1,3) and ref(ac,3)>ref(ac,4) and count(ac<ac1,3)=3 and ref(ac,1)>0 and ac<0;
//drawicon(s4,ac,5) align0;
drawtext(s4,ac, 's'),colorwhite;
文华财经用ao指标(副图)
y:=(high+low)/2;
ao:=ma(y,5)-ma(y,34);
aogreen:ifelse(ao>ref(ao,1),ao,0),colorred;
stickline(ao>=ref(ao,1),0,ao,colorred,1);
aored:ifelse(ao<ref( ao,1),ao,0),colorgreen;
stickline(ao<ref(ao,1),0,ao,colorgreen,1);
signalline:ma(ao,5),colorblue;
s1:=cross(0,ao);
//drawicon(s1,ao,5),align0; //文华此函数绘图不佳
drawtext(s1,ao,'s'),colorwhite;
//----------------------------以上是下穿0信号;
s2:=ao<0 and ref(ao,1)>ref(ao,2) and ao<ref(ao,1);
//drawnumber(1>0,ao,lu2,0);
//drawicon(s2,ao,5),align0;
drawtext(s2,ao,'s'),colorwhite;
//-----------------------------以上碟型卖出信号;
scount:=barslast(ao<0);//上一次ao>0后到现在的周期数;
//drawnumber(1>0,ao-0.1,scount,0);
sd:=hhv(ao,scount);//求上面周期的最大ao;
scountd:=hhvbars(ao,scount);//求最大值到现在的周期数;
//drawnumber(1>0,ao-0.3,scountd,0);
s3:=ao>0 and ref(ao,1)>ref(ao,2) and ao<ref(ao,1);//满足峰的条件;
s31:=count(s3,scountd);//满足上面条件的次数;
//drawnumber(1>0,ao-0.5,s31,0);
//drawicon(s31>=2 and s3,ao,5),align0;
drawtext(s31>=2 and s3,ao,'s'),colorwhite;
//----------------------------以上是双峰卖出信号;
b1:=cross(ao,0);
//drawicon(b1,ao,4),align0;
drawtext(b1,ao,'b'),colorwhite;
//----------------------------以上是上穿0信号;
b2:=ao>0 and ref(ao,1)<ref(ao,2) and ao>ref(ao,1) ;
//drawnumber(1>0,ao,lu2,0);
//drawicon(b2,ao,4),align0;
drawtext(b2,ao,'b'),colorwhite;
//-----------------------------以上碟型买入信号;
bcount:=barslast(ao>0);//上一次ao>0后到现在的周期数;
//drawnumber(1>0,ao-0.1,bcount,0);
bd:=llv(ao,bcount);//求上面周期的最小ao;
bcountd:=llvbars(ao,bcount);//求最小值到现在的周期数;
//drawnumber(1>0,ao-0.3,bcountd,0);
b3:=ao<0 and ref(ao,1)<ref(ao,2) and ao>ref(ao,1);//满足峰的条件;
b31:=count(b3,bcountd);//满足上面条件的次数;
//drawnumber(1>0,ao-0.5,lu31,0);
//drawicon(b31>=2 and b3,ao,4),align0;
drawtext(b31>=2 and b3,ao,'b'),colorwhite;
//----------------------------以上是双峰买进信号;
上一指标公式:文华财经各种顶底背离主图公式 财经底背离指标源码
下一指标公式:不同止损策略编写方法[文华财经]公式 止损编写指标源码
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文以下为本人为文华财经行情分析软件写的混沌交易之基本分形转载公式 混沌公式指标源码仅供学习研究。