分享多年來(lái)的一個(gè)實(shí)戰(zhàn)指標(biāo),交易的標(biāo)準(zhǔn)!
交易的依據(jù)是什么?
靠感覺(jué)太不靠譜,金叉死叉各種神奇的指示,好像也不行。
我們可靠的是,交易的一致性,給大家分享個(gè)止損止盈的指標(biāo)!
不好意思,參數(shù)補(bǔ)上:參數(shù) N: 1,3,1.5
源碼
{停損止盈}
MTR:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
ATR:=MA(MTR,12);
VAR1:=IF(C>=HHV(C,24) AND L>LLV(L,12),1,0);
VAR2:=IF(C<=LLV(C,24) AND H<HHV(H,12),1,0);
VAR3:=HHV(MA(H,2),24)-N*ATR;
VAR4:=LLV(MA(L,2),24)+N*ATR;
SSTOP:IF(VAR1,VAR3,REF(VAR3,BARSLAST(VAR1=1))),COLORGREEN;
XSTOP:IF(VAR2,VAR4,REF(VAR4,BARSLAST(VAR2=1))),COLORYELLOW;
{K線(xiàn)走向}
STICKLINE(1,H,L,0,1),COLORGRAY;
STICKLINE(C<=O,O,C,-1,0),COLORGRAY;
STICKLINE(C>O,O,C,-1,1),COLORGRAY;
AH:=C>REF(HHV(C,2),1);
STICKLINE(AH,H,L,0,1),COLORRED;
STICKLINE(AH AND C<=O,O,C,-1,0),COLORRED;
STICKLINE(AH AND C>O,O,C,-1,1),COLORRED;
BL:=C<REF(LLV(C,2),1);
STICKLINE(BL,H,L,0,1),COLORBLUE;
STICKLINE(BL AND C<=O,O,C,-1,0),COLORBLUE;
STICKLINE(BL AND C>O,O,C,-1,1),COLORBLUE;
A1:=H<=REF(H,1) AND C<REF(C,1);
A2:=C<REF(C,2);
A3:=L<REF(L,1);
STICKLINE(A1,H,L,0,1),COLORGREEN;
STICKLINE(A1 AND C<=O,O,C,-1,0),COLORGREEN;
STICKLINE(A1 AND C>O,O,C,-1,1),COLORGREEN;
STICKLINE(A1 AND A2,H,L,0,1),COLORCYAN;
STICKLINE(A1 AND A2 AND C<=O,O,C,-1,0),COLORCYAN;
STICKLINE(A1 AND A2 AND C>O,O,C,-1,1),COLORCYAN;
STICKLINE(A1 AND A2 AND A3,H,L,0,1),COLORBLUE;
STICKLINE(A1 AND A2 AND A3 AND C<=O,O,C,-1,0),COLORBLUE;
STICKLINE(A1 AND A2 AND A3 AND C>O,O,C,-1,1),COLORBLUE;
B1:=L>=REF(L,1) AND C>REF(C,1);
B2:=C>REF(C,2);
B3:=H>REF(H,1);
STICKLINE(B1,H,L,0,1),COLORYELLOW;
STICKLINE(B1 AND C<=O,O,C,-1,0),COLORYELLOW;
STICKLINE(B1 AND C>O,O,C,-1,1),COLORYELLOW;
STICKLINE(B1 AND B2,H,L,0,1),COLORMAGENTA;
STICKLINE(B1 AND B2 AND C<=O,O,C,-1,0),COLORMAGENTA;
STICKLINE(B1 AND B2 AND C>O,O,C,-1,1),COLORMAGENTA;
STICKLINE(B1 AND B2 AND B3,H,L,0,1),COLORRED;
STICKLINE(B1 AND B2 AND B3 AND C<=O,O,C,-1,0),COLORRED;
STICKLINE(B1 AND B2 AND B3 AND C>O,O,C,-1,1),COLORRED;
交易線(xiàn):MA(REF((C+O)/2,1),5),COLORDF00DF;
|