一目了然的指标红袖添香通达信副图、源码、贴图
VAR1:=(HHV(HIGH,50)-CLOSE)/(HHV(HIGH,50)-LLV(LOW,50));
VAR2:=SMA(VAR1,47,1)+10;
VAR3:=(CLOSE-LLV(LOW,48))/(HHV(HIGH,48)-LLV(LOW,48));
VAR4:=SMA(VAR3,3,1);
VAR5:=SMA(VAR4,3,1)+10;
DDDD:=VAR5-VAR2;
STICKLINE(REF(DDDD,1)<DDDD,DDDD,REF(DDDD,1),8,1),COLORBLUE;
STICKLINE(REF(DDDD,1)>DDDD,DDDD,REF(DDDD,1),8,1),COLORYELLOW;
DRAWICON(CROSS(DDDD,REF(DDDD,1)),DDDD-0.1,1);
DRAWICON(CROSS(REF(DDDD,1),DDDD),REF(DDDD,1)+0.1,2);
DIFF:(EMA(CLOSE,10)-EMA(CLOSE,20))*0.7,LINETHICK1,COLORRED;
DEAF:EMA(DIFF,8),LINETHICK1,COLORGREEN;MACD1:=(DIFF-DEAF),COLORSTICK;
DRAWBAND(DIFF,RGB(250,100,100),DEAF,RGB(0,0,0));
SHORT:=5;
LONG:=26;
MID:=2;
DIF:(EMA(CLOSE,SHORT)-EMA(CLOSE,LONG)),LINETHICK1,COLORYELLOW;
DEA:EMA(DIF,MID);
DRAWBAND(DIF,RGB(250,0,0),DEA,RGB(200,180,280));
MACD:=(DIF-DEA)*2,COLORSTICK;
向下:=IF(DIF<REF(DIF,1),DIF,DRAWNULL),COLORGREEN,LINETHICK2;
DRAWICON(CROSS(DIF,DEA) AND DIF>REF(DIF,1) AND DEA<0,DIF,0);
趋势线:=MACD1,LINETHICK2,COLORCYAN;
判断:=(SMA(((C+L)/2-LLV(L,21))/(HHV((H+C)/2,21)-LLV(L,21))*100,2,1)-8);
STICKLINE(FILTER(CROSS(判断,趋势线)=1 OR 判断>REF(判断,1),10) AND 判断<25 ,0,0.02,4,0),COLORRED;
STICKLINE(FILTER(判断<REF(判断,1)AND 判断>65,5),0,0.02,4,0),COLORGREEN;
MA5:=EMA(C,3);
MA13:=EMA(C,13);
UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS
(MA13,MA5))+1),H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS
(MA5,MA13))+1),0),COLOR0000FF;
DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS
(MA5,MA13))+1),L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS
(MA13,MA5))+1),0),COLOR00FF00;
HR:=HHV(HIGH,55);
HRY:=LLV(LOW,55);
HRY11:=HR*HRY;
{股票指标网}
HRY33:=SQRT(HRY11);
TJ2:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HRY33;
DRAWTEXT(TJ2,-0.01,'金牛'),COLOR00FFFF;
0;
当前红袖天数:BARSLASTCOUNT(DIF>=DEA),NODRAW;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
VAR1赋值:(50日内最高价最高值-收盘价)/(50日内最高价最高值-50日内最低价最低值)
VAR1的47日[1日权重]移动平均
VAR3赋值:(收盘价-48日内最低价最低值)/(48日内最高价最高值-48日内最低价最低值)
VAR3的3日[1日权重]移动平均
VAR4的3日[1日权重]移动平均
DDDD赋值:VAR5-VAR2
STICKLINE(1日前的DDDD
STICKLINE(1日前的DDDD>DDDD,DDDD,1日前的DDDD,8,1),画黄色
DRAWICON(CROSS(DDDD,1日前的DDDD),DDDD-0.1,1)
DRAWICON(CROSS(1日前的DDDD,DDDD),1日前的DDDD+0.1,2)
输出
DIFF:(收盘价的10日指数移动平均-收盘价的20日指数移动平均)*0.7,LINETHICK1,画红色
输出
DEAF:DIFF的8日指数移动平均,LINETHICK1,画绿色
MACD1赋值:(DIFF-DEAF),COLORSTICK
DRAWBAND(DIFF,RGB(250,100,100),DEAF,RGB(0,0,0))
SHORT赋值:5
LONG赋值:26
MID赋值:2
输出
DIF:(收盘价的SHORT日指数移动平均-收盘价的LONG日指数移动平均),LINETHICK1,画黄色
输出
DEA:DIF的MID日指数移动平均
DRAWBAND(DIF,RGB(250,0,0),DEA,RGB(200,180,280))
MACD赋值:(DIF-DEA)*2,COLORSTICK
向下赋值:IF(DIF<1日前的DIF,DIF,DRAWNULL),画绿色, 线宽为2
DRAWICON(DIF上穿DEA AND DIF>1日前的DIF AND DEA<0,DIF,0)
趋势线赋值:MACD1, 线宽为2,画青色
判断赋值:(SMA(((C+L)/2-21日内L最低值)/(HHV((H+C)/2,21)-21日内L最低值)*100,2,1)-8)
STICKLINE(FILTER(判断上穿趋势线=1 OR 判断>1日前的判断,10) AND 判断<25 ,0,0.02,4,0),画红色
STICKLINE(FILTER(判断<1日前的判断AND 判断>65,5),0,0.02,4,0),画绿色
MA5赋值:C的3日指数移动平均
MA13赋值:C的13日指数移动平均
UP赋值:DRAWLINE(L=LLV(L,上次MA13上穿MA5距今天数+1),LLV(L,BARSLAST(CROSS
(MA13,MA5))+1),H=HHV(H,BARSLAST(MA5上穿MA13)+1),HHV(H,BARSLAST(CROSS
(MA5,MA13))+1),0),COLOR0000FF
DOWN赋值:DRAWLINE(H=HHV(H,上次MA5上穿MA13距今天数+1),HHV(H,BARSLAST(CROSS
(MA5,MA13))+1),L=LLV(L,BARSLAST(MA13上穿MA5)+1),LLV(L,BARSLAST(CROSS
(MA13,MA5))+1),0),COLOR00FF00
HR赋值:55日内最高价最高值
HRY:=55日内最低价最低值
HRY11:=HR*HRY
{股票指标网}
HRY33:=SQRT(HRY11)
TJ2赋值:1日前的DOWN<2日前的DOWN AND UP>1日前的DOWN AND C当满足条件TJ2时,在-0.01和'金牛'位置书写文字
0
输出
当前红袖天数:BARSLASTCOUNT(DIF>=DEA),NODRAW