同花順牛市操盤線波段操盤指標公式
- 指標類別: 同花順指標公式
- 授權方式: 免費版
- 指標評級: ★★★★★
- 指標分類: 趨勢
- 畫線方法: 主圖
- 日期:2019-06-12 來源:互聯網
同花順牛市操盤線波段操盤指標公式:
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(牛市數值);
同花順牛市操盤線波段操盤指標公式實例圖解:
同花順牛市操盤線波段操盤指標公式