你好,以下是一个简单的期货分时顶底指标的通达信源码示例:
```{公式名称:分时顶底
公式描述:顶底板块趋势
参数数量:1
参数1:显示顶底线,最小:0,最大:1,缺省:1}
x_1:=(EMA(CLOSE,30)+EMA(CLOSE,72))/2;
DRAWBAND(x_1,RGB(150,30,30),EMA(x_1,60),RGB(0,110,30));
DRAWTEXT_FIX(ISLASTBAR,IF(FROMOPEN<120,0.6,0.01),0.05,0,HYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,IF(FROMOPEN<120,0.6,0.01),0,0,DYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,IF(FROMOPEN<120,0.55,0.01),0.9,0,GNBLOCK),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,IF(FROMOPEN<120,0.55,0.01),0.95,0,FGBLOCK),COLORYELLOW;
x_2:=IF(显示顶底线=1,HHV(HIGH,480),DRAWNULL);
x_3:=IF(显示顶底线=1,LLV(LOW,480),DRAWNULL);
分时顶:IF(x_2=REF(x_2,2),x_2,DRAWNULL),DOTLINE,COLORMAGENTA;
分时底:IF(x_3=REF(x_3,2),x_3,DRAWNULL),DOTLINE,COLORGREEN;
CLOSE,COLORWHITE;
```
注意,智能分析和提示期货行情走势的工具有很多,但并不是每款精度都高,如果你不会甄别,可以加我微信细聊,让你免费验证期货公司内部策略报告、智能量化分析工具,多空一目了然,盈亏比稳定,值得你尝试,加我微信聊就能免费领取。
发布于2024-11-4 08:41 北京