通达信【探测金矿】副图/选股 金和吸考虑建仓 源码
多方趋势:((7)*(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(30),4,1))-(3)*(SMA(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(30),4,1),3,1))-SMA(SMA(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(30),4,1),3,1),2,1)),COLOR0000FF;
空方趋势:(EMA(MA(多方趋势,5),7)),30,0,COLORF0F000;
STICKLINE((多方趋势>78) AND (多方趋势>=空方趋势),78,多方趋势,5/3,1),COLOR00FF00;
STICKLINE((空方趋势<=多方趋势),空方趋势,多方趋势,3/3,0),COLOR0000FF;
STICKLINE((空方趋势>多方趋势),多方趋势,空方趋势,3/3,0),COLORF0F000;
STICKLINE((空方趋势<14) AND (空方趋势>多方趋势),多方趋势,20,3/3,0),COLOR00FFFF;
TJ:=FILTER((空方趋势<14) AND (空方趋势>多方趋势),6);
DRAWTEXT(TJ,40,'吸'),COLORFFFFFF;
探测金矿:(空方趋势<12) AND (空方趋势<=多方趋势),COLOR00FFFF;
选金股:IF(CROSS(多方趋势,空方趋势) AND (空方趋势<22),30,0),COLORRED;
DRAWTEXT(CROSS(多方趋势,空方趋势) AND (空方趋势<22),30,'金'),COLOR00FFFF;
TJ1:=CROSS(探测金矿 OR 选金股,0.5);
TJ2:=CROSS(空方趋势,多方趋势);
TJ3:=COUNT(TJ2,BARSLAST(TJ1));
卖点:IF(TJ2 AND TJ3=1,70,100),COLORGREEN;
DRAWICON(TJ1,空方趋势*0.85,'BUY'),COLOR0000FF;
DRAWICON(TJ2 AND TJ3=1,空方趋势*1.15,'SELL'),COLOR0000FF,;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
输出多方趋势:((7)*(SMA(((收盘价-27日内最低价最低值)/(27日内最高价最高值-27日内最低价最低值))*(30),4,1))-(3)*(SMA(SMA(((收盘价-27日内最低价最低值)/(27日内最高价最高值-27日内最低价最低值))*(30),4,1),3,1))-SMA(SMA(SMA(((收盘价-27日内最低价最低值)/(27日内最高价最高值-27日内最低价最低值))*(30),4,1),3,1),2,1)),COLOR0000FF
输出空方趋势:(E多方趋势的5日简单移动平均,7)),30,0,COLORF0F000
STICKLINE((多方趋势>78) AND (多方趋势>=空方趋势),78,多方趋势,5/3,1),COLOR00FF00
STICKLINE((空方趋势<=多方趋势),空方趋势,多方趋势,3/3,0),COLOR0000FF
STICKLINE((空方趋势>多方趋势),多方趋势,空方趋势,3/3,0),COLORF0F000
STICKLINE((空方趋势<14) AND (空方趋势>多方趋势),多方趋势,20,3/3,0),COLOR00FFFF
TJ赋值:FILTER((空方趋势<14) AND (空方趋势>多方趋势),6)
当满足条件TJ时,在40和'吸'位置书写文字
输出探测金矿:(空方趋势<12) AND (空方趋势<=多方趋势),COLOR00FFFF
输出选金股:IF(多方趋势上穿空方趋势 AND (空方趋势<22),30,0),画红色
DRAWTEXT(多方趋势上穿空方趋势 AND (空方趋势<22),30,'金'),COLOR00FFFF
TJ1:=探测金矿 OR 选金股上穿0.5
TJ2:=空方趋势上穿多方趋势
TJ3:=COUNT(TJ2,上次TJ1距今天数)
如果TJ2 AND TJ3=1返回70否则返回100
当满足条件TJ1时,在空方趋势*0.85和'BUY'之间画图标
当满足条件TJ2 AND TJ3=1时,在空方趋势*1.15和'SELL'之间画图标