公式指标平台 股票指标公式源码分享 登录 注册
公式指标平台
未来函数检测
首 页 金钻指标 通达信公式 大智慧公式 同花顺公式 文华财经公式 操盘手公式 东财通公式 飞狐公式 其他公式 公式解答 股票软件 股票池
当前位置:→ 公式指标平台 > 同花顺公式 > 正文 → 正文

老君骑牛源码附图

发布时间:2015/5/19 5:57:29  浏览次数:

N1:=6;N:=90;

DX:=(C+H+L+O)/4;

短线:((MA(DX,1)+MA(DX,3)+MA(DX,5))/3),LINETHICK2,COLORFFFFFF;

FG:MA(DX,17)+ABS(MA(DX,17)-REF(MA(DX,17),1));

FS:MA(DX,17)+MA(DX,17)-REF(MA(DX,17),1);

搏杀线:=IF(MA(DX,17)<FS,FS,MA(DX,17));

FILLRGN(FG,搏杀线,搏杀线<FG,RGB(100,250,10));

FILLRGN(搏杀线,FS,搏杀线>FS,RGB(100,250,10));

MTM:=C-REF(C,1);

ZLGJ:=100*EMA(EMA(MTM,N1),N1)/EMA(EMA(ABS(MTM),N1),N1);

买1:=IF(LLV(ZLGJ,2)=LLV(ZLGJ,7) AND COUNT(ZLGJ<0,2) AND CROSS(ZLGJ,MA(ZLGJ,2)),1,0);

卖1:=IF(HHV(ZLGJ,2)=HHV(ZLGJ,7) AND COUNT(ZLGJ>50,2) AND CROSS(MA(ZLGJ,2),ZLGJ),1,0);

DRAWTEXT(FILTER(买1=1,5),LOW-0.03,"买"),colorred;

STICKLINE(FILTER(买1=1,5),HIGH,LOW,0,1),colorred,LINETHICK3;

DRAWTEXT(FILTER(卖1=1,1),HIGH*1.02,'卖'),COLOR00FF00;

STICKLINE(FILTER(卖1=1,1),HIGH,LOW,0,1),COLOR00FF00,LINETHICK3;

RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;

K:=SMA(RSV,3,1);

D:=SMA(K,3,1);

J:=3*K-2*D;

BDGD:=HHV(J,2)=HHV(J,8) AND J>80;

卖2:=IF(CROSS(REF(J-0.01,1),J) AND REF(BDGD,1),1,0);

STICKLINE(卖2 AND 卖1<>1,HIGH,LOW,2,1),coloryellow,LINETHICK3;

STICKLINE(卖2 AND 卖1<>1,OPEN,CLOSE,4,1),coloryellow,LINETHICK3;

牛市数值=0;

RSV=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;

a=SMA(RSV,3,1);

b=SMA(a,3,1);

e=3*a-2*b;

生死线:MA(CLOSE,n);

IF(a<0) a=0;

IF(a>100) a=100;

IF(b<0) b=0;

IF(b>100) b=100;

IF(e<0) e=0;

IF(e>100) e=100;

IsNowBuy:=FALSE;

sBUY:=CLOSE<1.2*LLV(LOW,7) AND CLOSE>MA(CLOSE,5) AND a>50 AND CROSS(MA(CLOSE,5),MA(CLOSE,10)); //买入信号

IF(sBUY==1) 牛市数值=1;

DRAWICON (sBUY,LOW,"buy");

//判断现在是否买入状态

IF(sBuy==TRUE OR IsNowBuy[1]==TRUE)

IsNowBuy:=TRUE;

//

keep=BARSLAST(sBuy == TRUE); //买入多少天了

win5=0;win10=0;win15=0;win20=0;Lose3=0;

CanSell:=CROSS(MA(CLOSE,10),MA(CLOSE,5));

IF(IsNowBuy==TRUE)

{

IF(keep > 1)

{

pCost = MONEY[keep-1]/VOL[keep-1];

//5%止盈

IF(win5[1] != 1 AND HIGH/PCost>1.05 )

{

win5=1;

DRAWICON(1,HIGH,"master_sell2"," 5%止盈");

牛市数值=2;

//IsNowBuy=FALSE;

}

ELSE

{

win5=win5[1];

}

//10%止盈

IF(win10[1] != 1 AND HIGH/PCost>1.1 )

{

win10=1;

DRAWICON(1,HIGH,"master_sell4"," 10%止盈");

牛市数值=3;

//IsNowBuy=FALSE;

}

ELSE

{

win10=win10[1];

}

//15%止盈

IF(win15[1] != 1 AND HIGH/PCost>1.15 )

{

win15=1;

DRAWICON(1,HIGH,"master_sell5"," 15%止盈");

牛市数值=4;

//IsNowBuy=FALSE;

}

ELSE

{

win15=win15[1];

}

//5%止损

IF(Lose3[1] != 1 AND (pCost-CLOSE)/PCost>0.05)

{

Lose3=1;

DRAWICON(1,HIGH,"master_sell3"," 5%止损");

牛市数值=5;

IsNowBuy=FALSE;

}

ELSE

{

Lose3=Lose3[1];

}

//卖出

IF(CanSell==TRUE)

{

DRAWICON(1,HIGH,"master_sell1"," 均线卖出");

牛市数值=6;

IsNowBuy=FALSE;

}

}

}

RETURN(牛市数值);
老君骑牛源码附图

资源下载链接   资源大小:unknow
精品资源推荐

手机移动版 - 关于我们 - 联系我们 - 广告合作 - 下载声明 - 网站帮助 - 友情链接 - 网站地图 - TOP
湘ICP备09016573号 增值电信业务经营ICP许可证:湘B2-20210269 湘公网安备43108102000039号
Copyright © GSZB.COM ,All Rights Reserved.
股票公式,股票指标,股票软件,股票知识