相關標簽:
?
{期貨交易J}
input:N(10,2,12);
DIRECTION:=(CLOSE - REF(CLOSE,n));
XX:=ABS((CLOSE - REF(CLOSE,1)));
VOLATILITY:=SUM(XX,n);
ER:=ABS((DIRECTION / VOLATILITY));
FASTC:=(2 / (2 + 1));
SLOWC:=(2 / (30 + 1));
SSC:=((ER * (FASTC - SLOWC)) + SLOWC);
CONSTANT:=(SSC * SSC);
CC:=CLOSE;
YY:=(REF(CLOSE,1) + (CONSTANT * (CLOSE - REF(CLOSE,1))));
IF DATACOUNT > N THEN
DD[N]:=CC[(N + 1)];
FOR I=N + 1 to DATACOUNT DO
DD:=(DD[(I - 1)] + (CONSTANT * (CC - DD[(I - 1)])));
止損線:=(DD),LINETHICK2,colorFFFF;
FFILTER:=((15 / 100) * STD((止損線 - REF(止損線,1)),n));
XA:=IF((止損線 < REF(止損線,1)),止損線,0);
XN:=BARSLAST((XA > 0));
AMALOW:=REF(止損線,XN);
YA:=IF((止損線> REF(止損線,1)),止損線,0);
YN:=BARSLAST((YA > 0));
AMAHIGH:=REF(止損線,YN);
RR:=IF(((AMAHIGH - 止損線) > FFILTER),(0 - 1),0);
TT:=IF(((止損線 - AMALOW) > FFILTER),1,RR);
TJ:=((CLOSE > OPEN) OR ((CLOSE = OPEN) AND (CLOSE > REF(CLOSE,1))));
多頭持倉:STICKLINE((TT = 1),LOW,HIGH,0.8,0),COLORRED;
STICKLINE((TT = 1),OPEN,CLOSE,7,0),COLORRED;
STICKLINE((TT = 1),OPEN,CLOSE,5,0),COLORRED;
STICKLINE((TT = 1),OPEN,CLOSE,2,0),COLORRED;
STICKLINE((TT = 1),OPEN,CLOSE,1,0),COLORRED;
空頭持倉:STICKLINE((TT = (0 - 1)),LOW,HIGH,0.8,0),COLORBLUE;
STICKLINE((TT = (0 - 1)),OPEN,CLOSE,7,0),COLORBLUE;
STICKLINE((TT = (0 - 1)),OPEN,CLOSE,5,0),COLORBLUE;
STICKLINE((TT = (0 - 1)),OPEN,CLOSE,2,0),COLORBLUE;
STICKLINE((TT = (0 - 1)),OPEN,CLOSE,1,0),COLORBLUE;
持幣觀望:STICKLINE((TT = 0),LOW,HIGH,0.8,0),COLORMAGENTA;
STICKLINE((TT = 0),OPEN,CLOSE,7,0),COLORMAGENTA;
STICKLINE((TT = 0),OPEN,CLOSE,5,0),COLORMAGENTA;
STICKLINE((TT = 0),OPEN,CLOSE,2,0),COLORMAGENTA;
STICKLINE((TT = 0),OPEN,CLOSE,1,0),COLORMAGENTA;
?
公式導入教程: 【通達信公式源碼導入方法教程】 【同花順公式源碼導入方法教程】 【大智慧新一代公式源碼導入方法教程】

?