大智慧公式源码概况:
指标类别:大智慧公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 主图
一、大智慧分时十字架预警公式
DRAWGBK(1,RGB(0,0,0),RGB(0,0,0),0,'019',0);
资金流入:=SUM(IF(C>REF(C,1),V,0),FROMOPEN),STICK,COLORRED;
资金流出:=-SUM(IF(C<REF(C,1),V,0),FROMOPEN),STICK,COLOR00FF00;
资金出入:=资金流入+资金流出,COLORSTICK;
资金流量:=资金出入,COLORFFFFFF,LINETHICK1;
资金比:=资金出入/SUM(V,FROMOPEN)*100,COLOR00FFFF,LINETHICK1;
资金流量比:=IF(资金比>=0,(资金比+100)/2,100-ABS((资金比-100)/2));
增强流量比:=IF(资金流量比>50,资金流量比,50);
攻击量:=((HSL*0.50+(REF(HSL,1)*0.33))+(REF(HSL,2)*0.17))*SUM(C,FROMOPEN)/FROMOPEN;
攻击量A:=SUM(IF(C>REF(C,1),攻击量*V,0),FROMOPEN),COLOR0000FF,LINETHICK0;
攻击量B:=-SUM(IF(C<REF(C,1),攻击量*V,0),FROMOPEN),COLOR00FF00,LINETHICK0;
攻击流量:=攻击量A+攻击量B,COLORSTICK;
NOTEXT攻击线:=攻击流量,COLORYELLOW,LINETHICK1;
攻击比:=攻击流量/SUM(V,FROMOPEN)*100,COLORRED,LINETHICK1;
资金攻击度:=IF(攻击比>0,(攻击比+50),100-ABS((攻击比-50)));
攻击度限制:=IF(资金攻击度>100,100,IF(资金攻击度<0,0,资金攻击度));
增强攻击度:=IF(资金攻击度>50,资金攻击度,50);
开始攻击:=CROSS(攻击流量,0)AND(C>REF(C,2)OR(资金流量>0AND资金流量>攻击流量));
开始攻击量:=CROSS(攻击流量,0)ANDC>REF(C,2)ANDV>LLV(V,3)*3;
Q:=250;
高点:=HHV(C,Q);
低点:=LLV(C,Q);
最高:=CONST(高点),NODRAW;
最低:=CONST(低点),NODRAW;
轴差:=最高-最低;
中价轴:=(最高+最低)/2;
HL3:=(100-0)/2*1.3;
HL4:=(100-0)/1*1.3;
中间价轴:=(50-HL3)*轴差/HL4+中价轴;
平安轴:=(中价轴+中间价轴)/2;
BGTYU:=IF(DATE<=1150530,1,0);
GHYJKU:=BETWEEN((CLOSE*BGTYU)/(SUM(AMOUNT,BARSCOUNT((CLOSE*BGTYU)))/SUM(VOL*100,BARSCOUNT((CLOSE*BGTYU)))),1.05,0.95);
VBNH:=IF(GHYJKU=0,MA((CLOSE*BGTYU),BARSCOUNT((CLOSE*BGTYU))),(SUM(AMOUNT,BARSCOUNT((CLOSE*BGTYU)))/SUM(VOL*100,BARSCOUNT((CLOSE*BGTYU)))));
起动线:=EXPMA((CLOSE/VBNH),20)*1,COLORYELLOW,POINTDOT;
主力线:=EXPMA((CLOSE/VBNH),60)*1,COLORMAGENTA,LINETHICK2;
散户线:=EXPMA((CLOSE/VBNH),120)*1,COLORGREEN,LINETHICK2;
限制起动线:=起动线*中间价轴;
限制主力线:=主力线*中间价轴;
限制散户线:=散户线*中间价轴;
主散MIN:=MIN(限制主力线,限制散户线);
{分时转强:=主散MIN>金龙线AND((LONGCROSS(限制主力线,金龙线,2)ORCROSS(限制主力线,限制散户线))OR(限制主力线>限制散户线ANDLONGCROSS(牵引线,金龙线,2)));}
DRAWBAND(限制主力线,RGB(250,125,0),限制散户线,RGB(0,100,250));
STICKLINE(起动线<主力线,限制起动线,限制主力线,1.0,0),COLOR00FF00;
STICKLINE(起动线>主力线,限制起动线,限制主力线,1.0,0),COLORFFFFFF;
STICKLINE(VOL>EMA(VOL,60)AND起动线>主力线,限制起动线,限制主力线,1,0),COLORFF00FF;
STICKLINE(VOL>EMA(VOL,30)AND起动线>主力线AND起动线>1.01AND起动线>REF(起动线,1),限制起动线,限制主力线,1,0),COLOR00FFFF;
主力:限制主力线,COLORFFFFFF,LINETHICK1;
分时均价线:SUM(C*V,240)/SUM(V,240),COLORYELLOW,LINETHICK2;
追击涨停:=限制散户线>分时均价线ANDCROSS(C,限制散户线);
拉升量:=IF(C>REF(C,1),VOL,0);
昨拉升最高值:=CONST(FINDHIGH(拉升量,FROMOPEN,240,1)),LINETHICK1,COLORMAGENTA;
今拉升最高值:=CONST(REF(HHV(拉升量,FROMOPEN),0)),COLORYELLOW,NODRAW;
攻击力度:=今拉升最高值/昨拉升最高值,NODRAW;
TT:=BARSCOUNT(C);{取得有效收盘价}
均价黄:=SUM(C*V,TT)/SUM(V,TT);{分时均线的取值}
量两步:=MA(V,5)>REF(MA(V,5),1)ANDREF(MA(V,5),1)>REF(MA(V,5),2);
价两步:=C>=REF(C,1)ANDREF(C,1)>REF(C,2);
价上岗量破5:=C>均价黄ANDV>MA(V,5);
量起爆:=V>=REF(V,1)*1;
价创新高:=C>=HHV(C,0);
量创新高:=V>=HHV(V,0);
对昨日涨幅:=(C/DYNAINFO(3)-1)*100<=2.50;{涨幅控制2个点以内}
每日一点:=量两步AND价两步AND价上岗量破5AND量起爆AND价创新高AND量创新高AND对昨日涨幅;
{计算收益、已爆分钟}
VV:=BARSSINCE(每日一点)+1;
首次起爆价:=REF(C,VV-1),NODRAW;
今天收益:=(DYNAINFO(7)-首次起爆价)/首次起爆价*100,NODRAW;
流通盘:=CAPITAL*100/100000000,NODRAW;
起爆时间:=REF(TIME/10000,VV),NODRAW;
已爆分钟:=VV-1,NODRAW;
{画出底线和红球}
首次起爆量:=REF(VOL,VV-1);
STICKLINE(FILTER(CROSS(拉升量,昨拉升最高值),30),最低+轴差*0.83,最低,1,0),COLORCYAN;
DRAWICON(FILTER(CROSS(拉升量,昨拉升最高值),30),最低+轴差*0.83,27);
DRAWTEXT(FILTER(CROSS(拉升量,昨拉升最高值),30),最低+轴差*0.83,'∠量突破'),COLORCYAN;
STICKLINE(FILTER(每日一点,30),最低+轴差*0.75,最低,1,0),COLORGREEN;
DRAWICON(FILTER(每日一点,30),最低+轴差*0.75,13);
DRAWTEXT(FILTER(每日一点,30),最低+轴差*0.75,'∠起爆'),COLORGREEN;
DRAWNUMBER(FILTER(每日一点,30),最低+(C-最低)/2,首次起爆价),COLORWHITE;
{DRAWTEXT_FIX(每日一点=1,0.00,0.10,0,'当起爆突破时:20线上行+日价K线突破+日K线量起爆更好+估换手小于10%更有效'),COLORMAGENTA;}
TA:=BARSLAST(TIME=100000);
TC:=REF(HHV(C,0),TA+1);
TV:=REF(HHV(V,0),TA+1);
ZF:=C/DYNAINFO(3)<1.05;
XG1:=CROSS(C,TC)ANDV>TVANDZF,COLORWHITE;
TA1:=BARSLAST(TIME=110000);
CC1:=REF(HHV(C,0),TA1+1);
VV1:=REF(HHV(V,0),TA1+1);
ZF1:=CC1/DYNAINFO(3)<1.05;
XG2:=CROSS(C,CC1)ANDV>VV1ANDZF1,COLORYELLOW;
突破:=XG1ORXG2,COLORRED;
STICKLINE(FILTER(突破=1,15),最低+轴差*0.60,最低,1,0),COLORWHITE;
DRAWICON(FILTER(突破=1,15),最低+轴差*0.60,17);
DRAWTEXT(FILTER(突破=1,15),最低+轴差*0.60,'∠分时突破'),COLORWHITE;
STICKLINE(FILTER(开始攻击量=1,15),最低+轴差*0.45,最低,1,0),COLORMAGENTA;
STICKLINE(FILTER(开始攻击=1,30),最低+轴差*0.30,最低,1,0),COLORYELLOW;
STICKLINE(CROSS(EXPMA((CLOSE/VBNH),60),EXPMA((CLOSE/VBNH),120)),最低+轴差*0.15,最低,1,0),COLORCYAN;
DRAWICON(FILTER(开始攻击量=1,15),最低+轴差*0.45,24);
DRAWICON(FILTER(开始攻击,30),最低+轴差*0.30,23);
DRAWTEXT(FILTER(开始攻击量=1,15),最低+轴差*0.45,'∠攻击量'),COLORMAGENTA;
DRAWTEXT(FILTER(开始攻击,30),最低+轴差*0.30,'开始攻'),COLORYELLOW;
DRAWTEXT(FILTER(CROSS(EXPMA((CLOSE/VBNH),60),EXPMA((CLOSE/VBNH),120)),30),最低+轴差*0.15,'★迹'),COLORCYAN;
DRAWICON(FILTER(CROSS(起动线,1.01),30),限制散户线,17);
DRAWTEXT(FILTER(CROSS(起动线,1.01),30),最低,'可能涨停'),COLORMAGENTA;
DRAWTEXT(FILTER(追击涨停,30),分时均价线+(限制散户线-分时均价线)/2,'追击'),COLORRED;
时间:=TIME2=100000;
N:=BARSLAST(时间);
CS1:CONST(IF(N,MAX(REF(HHV(H,0),N),DYNAINFO(4)),HHV(H,0))),DOTLINE,COLORGREEN;
CS2:CONST(IF(N,MIN(REF(LLV(L,0),N),DYNAINFO(4)),LLV(L,0))),DOTLINE,COLORRED;
CS3:(CS1+CS2)/2,DOTLINE,COLORYELLOW;
均价:=AMOUNT/VOL/100,COLORYELLOW,LINETHICK1;
DRAWNUMBER(CURRBARSCOUNT=2,CS1*1.005,VAR2STR(CS1,3)),COLORYELLOW;
DRAWNUMBER(CURRBARSCOUNT=2,CS2*0.995,VAR2STR(CS2,3)),COLORYELLOW;
DRAWTEXT(CS1/CS2<1.03ANDCROSS(C,CS1),CS1*1.005,'买入')COLORRED;
DRAWTEXT(CS1/CS2<1.03ANDCROSS(CS2,C),CS2*0.995,'卖出')COLORGREEN;
DRAWICON(CS1/CS2<1.03ANDCROSS(C,CS1),CS1*1.005,9);
DRAWICON(CS1/CS2<1.03ANDCROSS(CS2,C),CS2*0.9955,2);
STICKLINE(CS1/CS2<1.03ANDCROSS(C,CS1),CS1*1.1,CS2*0.9,1,0),COLORRED;
预警公式条件:第一、PDI大于ADX且同时大于ADXR和MDI;第二、ADX上穿ADXR成金叉第三、PDI数值大于25;以上条件同时满足的预警公式,望解答。DMI源码如下:参数:N=29014M=2606TR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);HD:=HIGH-REF(HIGH,1);LD:=REF(LOW,1)-LOW;DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);PDI:DMP*100/TR;MDI:DMM*100/TR;ADX:EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M);ADXR:EXPMEMA(ADX,M);
MTR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),14);
HD:=HIGH-REF(HIGH,1);
LD:=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),14);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),14);
PDI:=DMP*100/MTR;
CV:=CROSS(PDI,14);
C1:=((MA(C,30)-L)/MA(C,60))*200;
PDI值金叉:COUNT(CV,10)>=2ANDPDI<30ANDCVANDC1>12;
[源码注释]大智慧公式动态翻译结果
BIAS1赋值:(收盘价-收盘价的5日简单移动平均)/收盘价的5日简单移动平均*100
1日前的乖离率<-5
每日大智慧公式解答:
公式编写要求:
昨天的5日乖离率bias5小于-5如何编写
公式编写方法:
BIAS1:=(CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100;
REF(BIAS,1)<-5;
评论(0)