通达信趋势量化线副图指标 高成功率 源码附图
{趋势量化线<高胜率>}
SHORT_L1:=5;
SHORT_L2:=20;
SHORT_L3:=15;
LONG_L1:=20;
LONG_L2:=10;
A1_T3:=1;
A:=EMA(CLOSE, SHORT_L1) - EMA(CLOSE, SHORT_L2);
LC:=REF(A,1);
RSI4:=SMA(MAX(A-LC,0),SHORT_L3,1)/SMA(ABS(A-LC),SHORT_L3,1)*100;
B:=EMA(CLOSE, LONG_L1);
LCB:=REF(B,1);
RSI2:=SMA(MAX(B-LCB,0),LONG_L2,1)/SMA(ABS(B-LCB),LONG_L2,1)*100;
SHORT_TERM:=RSI4 - 50;
LONG_TERM:=RSI2 - 50;
STICKLINE(LONG_TERM > 0 AND LONG_TERM > REF(LONG_TERM,1), 0, LONG_TERM, 0, -1), COLORLIRED;
STICKLINE(LONG_TERM > 0 AND LONG_TERM < REF(LONG_TERM,1), 0, LONG_TERM, 0, -1), COLORBLUE;
STICKLINE(LONG_TERM <= 0 AND LONG_TERM > REF(LONG_TERM,1), 0, LONG_TERM, 0, -1), COLORRED;
STICKLINE(LONG_TERM <= 0 AND LONG_TERM < REF(LONG_TERM,1), 0, LONG_TERM, 0, -1), COLORWHITE;
STICKLINE(SHORT_TERM > 0, SHORT_TERM, 0, 1, 0),COLOR000099 ;
STICKLINE(SHORT_TERM <= 0, SHORT_TERM, 0, 1, 0),COLOR005E00;
STICKLINE(SHORT_TERM > 0 AND SHORT_TERM>REF(SHORT_TERM,1), SHORT_TERM, 0, 1, 0),COLORRED ;
STICKLINE(SHORT_TERM <= 0 AND SHORT_TERM>REF(SHORT_TERM,1), SHORT_TERM, 0, 1, 0), COLOR00B000;
MA_SHORT:-A1_T3*A1_T3*A1_T3*EMA(EMA(EMA(EMA(EMA(EMA(SHORT_TERM,5),5),5),5),5),5)+(3*A1_T3*A1_T3+3*A1_T3*A1_T3*A1_T3)*EMA(EMA(EMA(EMA(EMA(SHORT_TERM,5),5),5),5),5)+(-6*A1_T3*A1_T3-3*A1_T3-3*A1_T3*A1_T3*A1_T3)*EMA(EMA(EMA(EMA(SHORT_TERM,5),5),5),5)+(1+3*A1_T3+A1_T3*A1_T3*A1_T3+3*A1_T3*A1_T3)*EMA(EMA(EMA(SHORT_TERM,5),5),5),LINETHICK3,COLORRED;
IF(MA_SHORT<=REF(MA_SHORT,1),MA_SHORT,DRAWNULL),LINETHICK3,COLORBLUE;
李津1:=MA_SHORT>REF(MA_SHORT,1) AND REF(MA_SHORT,1)>REF(MA_SHORT,2);
李津2:=MA_SHORT<REF(MA_SHORT,1) AND REF(MA_SHORT,1)<REF(MA_SHORT,2);
李津3:=TFILTER(李津1,李津2,1);
李津4:=TFILTER(李津3,李津2,2);
DRAWICON(李津3, MA_SHORT, 34);
DRAWICON(李津4, MA_SHORT, 35);
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
{趋势量化线<高胜率>}
SHORT_L1赋值:5
SHORT_L2赋值:20
SHORT_L3赋值:15
LONG_L1赋值:20
LONG_L2赋值:10
A1_T3赋值:1
A赋值:收盘价的 SHORT_L1日指数移动平均 - 收盘价的 SHORT_L2日指数移动平均
LC赋值:1日前的A
RSI4赋值:SMA(A-LC和0较大值,SHORT_L3,1)/SMA(A-LC的绝对值,SHORT_L3,1)*100
B赋值:收盘价的 LONG_L1日指数移动平均
LCB赋值:1日前的B
RSI2赋值:SMA(B-LCB和0较大值,LONG_L2,1)/SMA(B-LCB的绝对值,LONG_L2,1)*100
SHORT_TERM赋值:RSI4 - 50
LONG_TERM赋值:RSI2 - 50
STICKLINE(LONG_TERM > 0 AND LONG_TERM > 1日前的LONG_TERM, 0, LONG_TERM, 0, -1), COLORLIRED
STICKLINE(LONG_TERM > 0 AND LONG_TERM < 1日前的LONG_TERM, 0, LONG_TERM, 0, -1), COLORBLUE
STICKLINE(LONG_TERM <= 0 AND LONG_TERM > 1日前的LONG_TERM, 0, LONG_TERM, 0, -1), 画红色
STICKLINE(LONG_TERM <= 0 AND LONG_TERM < 1日前的LONG_TERM, 0, LONG_TERM, 0, -1), 画白色
当满足条件SHORT_TERM > 0时,在 SHORT_TERM和 0之间画柱状线
当满足条件SHORT_TERM <= 0时,在 SHORT_TERM和 0之间画柱状线
STICKLINE(SHORT_TERM > 0 AND SHORT_TERM>1日前的SHORT_TERM, SHORT_TERM, 0, 1, 0),画红色
STICKLINE(SHORT_TERM <= 0 AND SHORT_TERM>1日前的SHORT_TERM, SHORT_TERM, 0, 1, 0), COLOR00B000
MA_SHORT:-A1_T3*A1_T3*A1_T3*SHORT_TERM的5日指数移动平均,5),5),5),5),5)+(3*A1_T3*A1_T3+3*A1_T3*A1_T3*A1_T3)*SHORT_TERM的5日指数移动平均,5),5),5),5)+(-6*A1_T3*A1_T3-3*A1_T3-3*A1_T3*A1_T3*A1_T3)*SHORT_TERM的5日指数移动平均,5),5),5)+(1+3*A1_T3+A1_T3*A1_T3*A1_T3+3*A1_T3*A1_T3)*SHORT_TERM的5日指数移动平均,5),5), 线宽为3,画红色
IF(MA_SHORT<=1日前的MA_SHORT,MA_SHORT,DRAWNULL), 线宽为3,COLORBLUE
李津1赋值:MA_SHORT>1日前的MA_SHORT AND 1日前的MA_SHORT>2日前的MA_SHORT
李津2赋值:MA_SHORT<1日前的MA_SHORT AND 1日前的MA_SHORT<2日前的MA_SHORT
李津3赋值:TFILTER(李津1,李津2,1)
李津4赋值:TFILTER(李津3,李津2,2)
当满足条件李津3时,在 MA_SHORT和 34之间画图标
当满足条件李津4时,在 MA_SHORT和 35之间画图标