加入收藏
 

同花顺孤狼一号指标公式 源码

2018-01-05 10:51:23推荐星级:下载统计()
奇爱股票网提供同花顺孤狼一号指标公式 源码下载,更多精品通达信 大智慧 同花顺 飞狐股票公式 常用股票软件下载请登录www.72gu.com下载!
0
返回首页下载特效 需要: 积分

同花顺孤狼一号指标公式 源码说明

MA1:=MA(C,5),coloryellow,LINETHICK1;

YMA1:(O*3+REF(C,1)+REF(C,2))/5,colorwhite,LINETHICK1,DOTLINE;
OMA1:(O+REF(C,1)+REF(C,2)+REF(C,3)+REF(C,4))/5,colorwhite;
MA2:MA(C,10),COLOR4080FF,LINETHICK1;
MA3:MA(C,20),COLORFF80FF,LINETHICK2;
MA4:IF(PERIODNAME=='月线' OR PERIODNAME=='季线' OR PERIODNAME=='年线',MA3,MA(C,55)),colorcyan,LINETHICK2;
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);//www.72gu.com
MACD:=2*(DIFF-DEA);
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
YCCI:=(CCI-REF(CCI,1))+CCI,nodraw,colorgreen;
上:MA(C,20)+2*STD(C,20),colorgreen,DOTLINE;
下:MA(C,20)-2*STD(C,20),colorred,DOTLINE;
角1:=ATAN((MA1/REF(MA1,1)-1)*100)*180/3.1416,nodraw,colorwhite;
Y角1:=ATAN((YMA1/REF(YMA1,1)-1)*100)*180/3.1416,nodraw,colorwhite;
振幅:=(H-L)/REF(C,1)*100;
均振:=MA(振幅,5);
涨幅:=(C-REF(C,1))/REF(C,1)*100;
开:=(O-REF(C,1))/REF(C,1)*100;
涨:=MACD>0 AND 上>REF(上,1) AND C>MA3;
跌:=MACD<0 AND 下<REF(下,1) AND C<MA3;
震荡:=涨=0 AND 跌=0;
//画K线
STICKLINE(涨,H,L,0,0),colorred;
STICKLINE(涨 AND C>=O,C,O,10,1),colorred;
STICKLINE(涨 AND C<O,C,O,10,0),colorred;
STICKLINE(跌,H,L,0,0),COLORFF6400;
STICKLINE(跌 AND C>=O,C,O,10,1),COLORFF6400;
STICKLINE(跌 AND C<O,C,O,10,0),COLORFF6400;
STICKLINE(震荡,H,L,0,0),coloryellow;
STICKLINE(震荡 AND C>=O,C,O,10,1),coloryellow;
STICKLINE(震荡 AND C<O,C,O,10,0),coloryellow;
加速0:=YMA1-REF(YMA1,1)>REF(YMA1,1)-REF(YMA1,2) AND YMA1-OMA1>REF(YMA1,1)-REF(OMA1,1) AND YMA1>OMA1,nodraw,colorcyan;
加速:加速0 AND (REF(YMA1,1)<REF(OMA1,1) OR REF(YMA1,1)<REF(YMA1,2)),nodraw,colorcyan;
修1:=IF(加速=1,MAX(开,0)*1.5/100,0);
修2:=IF(加速=0,开*0.5/100,0);
修正值:=修1+修2,nodraw;
建仓条件:=YMA1>OMA1 AND YMA1>REF(YMA1,1) AND YMA1=HHV(YMA1,3);
建1:=IF(加速=1 AND 建仓条件,YMA1*(1+修正值),0);
建2:=IF(加速=0 AND 建仓条件,(YMA1+REF(YMA1,1))/2*(1+修正值),0);
建仓价:MIN(建1+建2,O),nodraw,colorred;
低幅:(L-建仓价)/REF(C,1)*100,nodraw,colorgreen;
开幅:(O-建仓价)/REF(C,1)*100,nodraw,colorgreen;
B0:=上>REF(上,1) AND L>MA3 AND L<=建仓价 AND REF(均振,1)>=X;
DRAWICON(B0,L*0.98,100);
B1:=均振>=X OR REF(均振,1)>=X;
B2:=上>REF(上,1) AND C>MA3;
B3:=H=HHV(H,3);
B4:=YMA1<OMA1 OR YMA1<REF(YMA1,1) OR REF(YMA1,1)<REF(OMA1,1);
B5:=涨幅>=2;
B:=B1 AND B2 AND B3 AND B4 AND B5;
DRAWICON(B,L,1);
DRAWTEXT_FIX(ISLASTBAR AND B0,0.8,0.1,0,'建仓价==》'),colorred;
DRAWNUMBER_FIX(ISLASTBAR AND B0,0.87,0.1,0,TOSTRING(建仓价,2)),colorcyan;
DRAWTEXT_FIX(ISLASTBAR AND B0,0.91,0.1,0,'元 下方'),colorcyan;
DRAWTEXT_FIX(ISLASTBAR AND B0,0.8,0.15,0,'当前浮盈=》'),colorred;
DRAWNUMBER_FIX(ISLASTBAR AND B0 AND L<=建仓价,0.87,0.15,0,TOSTRING((C-建仓价)/建仓价*100,2)),colorcyan;
DRAWTEXT_FIX(ISLASTBAR AND B0 AND L<=建仓价,0.91,0.15,0,'%'),colorcyan;
IF(K>=1)
{
平均价:=IF(REF(L,1)<REF(建仓价,1),(REF(C,2)+REF(建仓价,1))/2,REF(C,2));
盈亏1:=(H-平均价)/平均价*100,nodraw;
盈亏2:=(MAX(REF(H,1),H)-平均价)/平均价*100,nodraw;
盈亏:=IF(REF(L,1)<=REF(建仓价,1) AND REF(B,2),盈亏1,盈亏2);
成功:=REF(B,2) AND 盈亏>=Y;
M:=BARSCOUNT(C>0);
止盈率:COUNT(成功,M)/COUNT(B,M)*100,nodraw,colorgreen;
次数:COUNT(B,M),nodraw,colorcyan;
DRAWNUMBER(REF(B,2) AND 盈亏>0,H*1.02,TOSTRING(盈亏,1)),COLORFF80FF;
DRAWNUMBER(REF(B,2) AND 盈亏<=0,H*1.02,TOSTRING(盈亏,1)),colorgreen;
RETURN;
}
最大盈利:=(H-REF(建仓价,1))/REF(建仓价,1)*100;
成功:=REF(B0,1) AND 最大盈利>=Y AND 最大盈利<=100;
M:=BARSCOUNT(C>0),nodraw,colorgreen;
止盈率:COUNT(成功,M)/COUNT(B0,M)*100,nodraw,colorgreen;
次数:COUNT(B0,M),nodraw,colorcyan;
DRAWNUMBER(REF(B0,1) AND 最大盈利>0,H*1.02,TOSTRING(最大盈利,1)),COLORFF80FF;
DRAWNUMBER(REF(B0,1) AND 最大盈利<=0,H*1.02,TOSTRING(最大盈利,1)),colorgreen;

推荐下载

赞助商广告