通达信【主力风向标】主副图指标 红线持股绿线持币 源码附图
ABC44:=10;
ABC45:=10;
ABC46:=3;
ABC47:=10;
ABC48:=2.5;
ABC49:=MAX(MAX(HIGH-LOW,ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
ABC50:=(HIGH+LOW)/2+MA(ABC49,ABC47)*ABC48;
ABC51:=(HIGH+LOW)/2-MA(ABC49,ABC47)*ABC48;
ABC52:=REF(ABC50,BARSLAST(ABC50<=REF(ABC50,1)));
ABC53:=LLV(ABC50,ABC45*1.5);
ABC54:=IF(ABC53!=REF(ABC53,1) AND ABC52< REF(ABC52,1),ABC52,IF(ABC52=ABC53,ABC52,ABC53));
ABC55:=BARSLAST(CROSS(0.5,ABC50=ABC54))+1;
ABC56:=CROSS(COUNT(CROSS(CLOSE,ABC54) OR CROSS(CLOSE,REF(ABC54,2)) AND ABC50>ABC54,ABC55),0.5);
ABC57:=BARSLAST(ABC56);
ABC58:=BARSLAST(CROSS(HHV(ABC51,ABC57+1),CLOSE));
ABC59:=CROSS(ABC58,ABC57);
ABC60:=CROSS(ABC57,ABC58);
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
好股网:IF(ABC58>ABC57,HHV(ABC51,BARSLAST(ABC59)+1),LLV(ABC50,BARSLAST(ABC60)+1)),COLORGREEN,LINETHICK6;
庄家成本线:IF(ABC58>ABC57,好股网,DRAWNULL),COLOR0000C8,LINETHICK6;
DRAWICON(CROSS(ABC58,ABC57),好股网,42);
DRAWICON(CROSS(ABC57,ABC58),好股网*1.015,43);
买进:CROSS(ABC58,ABC57)*100,NODRAW,COLORRED;
卖出:CROSS(ABC57,ABC58)*100,NODRAW;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
ABC44赋值:10
ABC45赋值:10
ABC46赋值:3
ABC47赋值:10
ABC48赋值:2.5
ABC49赋值:MAX(MAX(最高价-最低价,1日前的收盘价-最高价的绝对值),ABS(1日前的收盘价-最低价))
ABC50赋值:(最高价+最低价)/2+ABC49的ABC47日简单移动平均*ABC48
ABC51赋值:(最高价+最低价)/2-ABC49的ABC47日简单移动平均*ABC48
ABC52赋值:REF(ABC50,上次ABC50<=REF(ABC50,1距今天数))
ABC53赋值:ABC45*1.5日内ABC50最低值
ABC54赋值:IF(ABC53!=1日前的ABC53 AND ABC52< 1日前的ABC52,ABC52,IF(ABC52=ABC53,ABC52,ABC53))
ABC55赋值:上次0.5上穿ABC50=ABC54距今天数+1
ABC56赋值:CROSS(COUNT(CROSS(收盘价,ABC54) OR CROSS(收盘价,2日前的ABC54) AND ABC50>ABC54,ABC55),0.5)
ABC57赋值:上次ABC56距今天数
ABC58赋值:上次CROSS(ABC57+1日内ABC51最高值,收盘价距今天数)
ABC59赋值:ABC58上穿ABC57
ABC60赋值:ABC57上穿ABC58
DRAWKLINE(最高价,开盘价,最低价,收盘价)
输出好股网:IF(ABC58>ABC57,HHV(ABC51,上次ABC59距今天数+1),LLV(ABC50,BARSLAST(ABC60)+1)),画绿色,LINETHICK6
如果ABC58>ABC57返回好股网否则返回DRAWNULL
DRAWICON(ABC58上穿ABC57,好股网,42)
DRAWICON(ABC57上穿ABC58,好股网*1.015,43)
输出买进:ABC58上穿ABC57*100,NODRAW,画红色
输出卖出:ABC57上穿ABC58*100,NODRAW