股资源-股票学习站-学炒股-股票课程-炒股教程-分析选股指标-入门基础知识

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信趋势量化线指标公式源码


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2024-6-3 14:10:59

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|

GMT+8, 2024-11-16 20:22

快速回复 返回顶部 返回列表