通达信顺势黑马主副图指标 判断K线所在位置的参考 源码
{顺势黑马成交源码如下}
VVOL:IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,VVOL,0,-1,-1),COLOR00C0C0;
VOLUME:VOL,VOLSTICK;
AA:=VOL>REF(V,1)*1.9;
AA1:=VOL< REF(LLV(VOL,13),1);
AA2:=VOL< REF(LLV(VOL,55),1);
ACB7:EMA(C,7),COLORYELLOW,LINETHICK2;
ACB14:EMA(C,14),COLOR7FF00F,LINETHICK1 DOTLINE;
ABC:=ACB7>ACB14;
STICKLINE(AA1,0,V,1,0),COLORGREEN;
STICKLINE(AA2,0,V,1,0),COLORMAGENTA;
ABC1:=COUNT(V>REF(V,1)*1.9,4)=1;
ABC2:=COUNT(V< REF(V,1) AND L>MIN(L,4) AND L>REF(L,1),3)=3 ;
ABC3:=ABC1 AND ABC2;
STICKLINE(CROSS(ACB7,ACB14)AND ABC,0,V,1,0),COLORYELLOW;
STICKLINE(ABC3,0,V,1,0),COLORRED;
DRAWICON(CROSS(ACB7,ACB14)AND ABC,V,9);
MV5:MA(V,100);
MV10:MA(V,100);
MV40:MA(V,100);
{顺势黑马主图源码如下}
ABC7:=EMA(C,7),COLORYELLOW,LINETHICK2;
ABC14:=EMA(C,14),COLOR7FF00F,LINETHICK1 DOTLINE;
ABC25:=EMA(C,25),COLORFF7F00,LINETHICK1 DOTLINE;
ABCMA45:=EMA(C,45),COLORF00FFF,LINETHICK1 DOTLINE;
MA5:=MA(C,5);
MA10:=MA(C,10);
MA20:=MA(C,20);
ABC:=ABC7>ABC14;
STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORYELLOW;
DRAWTEXT(C/REF(C,1)>1.095,L*0.96,' ★强'),COLORLIRED;
STICKLINE(HIGH< REF(LOW,0),HIGH,REF(LOW,0),10,0);
STICKLINE(LOW>REF(HIGH,0) ,LOW,REF(HIGH,0),10,0);
STICKLINE(C=O,H,L,0,0);
STICKLINE((C=O)AND(C>REF(C,0)),C,O,8,0);
STICKLINE((C=O)AND(C< REF(C,0)),C,O,8,0);
STICKLINE(CROSS(ABC7,ABC14) AND ABC,CLOSE,OPEN,2,0),COLORMAGENTA;
DRAWICON(CROSS(ABC7,ABC14) AND ABC,L*1.002,9);
DRAWTEXT(CROSS(ABC7,ABC14) AND ABC,L*0.98,' ★买'),COLORMAGENTA;
STICKLINE(CROSS(ABC25,ABC7),CLOSE,OPEN,2,0),COLORBLUE;
CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
DD:=DMA(CLOSE,CC);
上轨:(1+7/100)*DD,DOTLINE,COLORGREEN;
下轨:(1-7/100)*DD,DOTLINE,COLORGREEN;
中轨:(上轨+下轨)/2,DOTLINE,COLORGREEN;
FK:(1+14/100)*DD,DOTLINE,COLORGRAY;
CD:(1-14/100)*DD,DOTLINE,COLORGRAY;
DRAWNUMBER(ISLASTBAR,上轨,上轨),COLOR00FFFF;
DRAWNUMBER(ISLASTBAR,下轨,下轨),COLORFFFF00;
DRAWNUMBER(ISLASTBAR,中轨,中轨),COLOR00FF00;
DRAWNUMBER(ISLASTBAR,FK,FK),COLOR0000FF;
DRAWNUMBER(ISLASTBAR,CD,CD),COLORWHITE;
上轨绿:IF(上轨>=REF(上轨,1),上轨,DRAWNULL),DOTLINE,COLORGREEN,LINETHICK1;
上轨红:IF(上轨>=REF(上轨,1),上轨,DRAWNULL),DOTLINE COLORRED,LINETHICK1;
中轨绿:IF(中轨>=REF(中轨,1), 中轨,DRAWNULL),DOTLINE,COLORGREEN,LINETHICK1;
中轨红:IF(中轨>=REF(中轨,1), 中轨,DRAWNULL),DOTLINE COLORRED, LINETHICK1;
下轨绿:IF(下轨>=REF(下轨,1), 下轨,DRAWNULL),DOTLINE,COLORGREEN,LINETHICK1;
下轨红:IF(下轨>=REF(下轨,1), 下轨,DRAWNULL),DOTLINE COLORRED,LINETHICK1;
IF(ABC7>REF(ABC7,1),ABC7,DRAWNULL),COLORRED,LINETHICK2;
IF(ABC7< REF(ABC7,1),ABC7,DRAWNULL),COLORGREEN,LINETHICK2;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
如果 到最后交易的周期=1 AND PERIOD=5返回成交量*240/FROM开盘价否则返回DRAWNULL
当满足条件 到最后交易的周期=1 AND PERIOD=5时,在V成交量和0之间画柱状线
输出VOLUME:成交量,成交量STICK
AA赋值:成交量>1日前的V*1.9
AA1:=成交量< REF(13日内成交量最低值,1)
AA2:=成交量< REF(55日内成交量最低值,1)
输出ACB7:C的7日指数移动平均,画黄色, 线宽为2
输出ACB14:C的14日指数移动平均,COLOR7FF00F,LINETHICK1 DOTLINE
ABC赋值:ACB7>ACB14
当满足条件AA1时,在0和V之间画柱状线
当满足条件AA2时,在0和V之间画柱状线
ABC1:=COUNT(V>1日前的V*1.9,4)=1
ABC2:=COUNT(V< 1日前的V AND L>L和4的较小值 AND L>1日前的L,3)=3
ABC3:=ABC1 AND ABC2
STICKLINE(ACB7上穿ACB14AND ABC,0,V,1,0),画黄色
当满足条件ABC3时,在0和V之间画柱状线
DRAWICON(ACB7上穿ACB14AND ABC,V,9)
输出MV5:V的100日简单移动平均
输出MV10:V的100日简单移动平均
输出MV40:V的100日简单移动平均
{顺势黑马主图源码如下}ABC7:=C的7日指数移动平均,画黄色, 线宽为2
ABC14:=C的14日指数移动平均,COLOR7FF00F,LINETHICK1 DOTLINE
ABC25:=C的25日指数移动平均,COLORFF7F00,LINETHICK1 DOTLINE
ABCMA45:=C的45日指数移动平均,COLORF00FFF,LINETHICK1 DOTLINE
MA5赋值:C的5日简单移动平均
MA10赋值:C的10日简单移动平均
MA20赋值:C的20日简单移动平均
ABC赋值:ABC7>ABC14
STICKLINE(C/1日前的C>1.095,C,O,2,0),画黄色
DRAWTEXT(C/1日前的C>1.095,L*0.96,' ★强'),COLORLIRED
STICKLINE(最高价< 0日前的最低价,最高价,0日前的最低价,10,0)
STICKLINE(最低价>0日前的最高价 ,最低价,0日前的最高价,10,0)
当满足条件C=O时,在H和L之间画柱状线
STICKLINE((C=O)AND(C>0日前的C),C,O,8,0)
STICKLINE((C=O)AND(C< 0日前的C),C,O,8,0)
STICKLINE(ABC7上穿ABC14 AND ABC,收盘价,开盘价,2,0),画洋红色
DRAWICON(ABC7上穿ABC14 AND ABC,L*1.002,9)
DRAWTEXT(ABC7上穿ABC14 AND ABC,L*0.98,' ★买'),画洋红色
STICKLINE(ABC25上穿ABC7,收盘价,开盘价,2,0), 画蓝色
CC赋值:(2*收盘价+最高价+最低价的绝对值/4-收盘价的20日简单移动平均)/收盘价的20日简单移动平均
DD赋值:D收盘价的CC日简单移动平均
输出上轨:(1+7/100)*DD,DOTLINE,画绿色
输出下轨:(1-7/100)*DD,DOTLINE,画绿色
输出中轨:(上轨+下轨)/2,DOTLINE,画绿色
输出FK:(1+14/100)*DD,DOTLINE,COLORGRAY
输出CD:(1-14/100)*DD,DOTLINE,COLORGRAY
DRAWNUMBER(ISLASTBAR,上轨,上轨),COLOR00FFFF
DRAWNUMBER(ISLASTBAR,下轨,下轨),COLORFFFF00
DRAWNUMBER(ISLASTBAR,中轨,中轨),COLOR00FF00
DRAWNUMBER(ISLASTBAR,FK,FK),COLOR0000FF
DRAWNUMBER(ISLASTBAR,CD,CD),画白色
上轨绿:IF(上轨>=1日前的上轨,上轨,DRAWNULL),DOTLINE,画绿色,LINETHICK1
上轨红:IF(上轨>=1日前的上轨,上轨,DRAWNULL),DOTLINE 画红色,LINETHICK1
中轨绿:IF(中轨>=1日前的中轨, 中轨,DRAWNULL),DOTLINE,画绿色,LINETHICK1
中轨红:IF(中轨>=1日前的中轨, 中轨,DRAWNULL),DOTLINE 画红色, LINETHICK1
下轨绿:IF(下轨>=1日前的下轨, 下轨,DRAWNULL),DOTLINE,画绿色,LINETHICK1
下轨红:IF(下轨>=1日前的下轨, 下轨,DRAWNULL),DOTLINE 画红色,LINETHICK1
IF(ABC7>1日前的ABC7,ABC7,DRAWNULL),画红色, 线宽为2
IF(ABC7< 1日前的ABC7,ABC7,DRAWNULL),画绿色, 线宽为2