底部波浪 通达信副图,源码
B1:=(HHV(H,9)-C)/(HHV(H,9)-LLV(LOW,9))*100- 70;B2:=SMA(B1,9,1)+100;B3:=(C-LLV(L,9))/(HHV(H,9)- LLV(L,9))*100;B4:=SMA(B3,3,1);B5:=SMA(B4,3,1)+100;B6:=B5-B2;B7:IF(B6>60,B6-60,0);持有:STICKLINE(REF(B7,1)<B7,B7,REF(B7,1),2,0),COLORMAGENTA;A:0,POINTDOT,COLORMAGENTA,LINETHICK3;{永不倒}获利盘:WINNER(CLOSE)*100,COLORRED,LINETHICK1;买入:CROSS(B7,1),LINETHICK0,COLORMAGENTA;持股:B7>REF(B7,1),LINETHICK0,COLORMAGENTA;卖出:CROSS(REF(B7,1),B7),LINETHICK0,COLORGREEN;
{醒目MACD,LCY编辑}{INPUT:SHORT(12),LONG(26),M(9),N(55);}DIFF:((EMA(CLOSE,12)-EMA(CLOSE,26))),LINETHICK2,COLORGREEN;{IF(DIFF>=REF(DIFF,1),DIFF,DRAWNULL),LINETHICK2,COLORRED;}DEA:EMA(DIFF,9),COLORWHITE;MACD:(DIFF-DEA)*2,COLORSTICK,COLORMAGENTA;{DRAWBAND(MACD,RGB(180,87,22),0,RGB(0,30,255));}{IF(DIFF>0 AND DIFF>DEA AND DIFF>REF(DIFF,1),DIFF,DRAWNULL),LINETHICK2,COLORRED;IF(DIFF<0 AND DIFF>DEA AND DIFF>REF(DIFF,1),DIFF,DRAWNULL),LINETHICK2,COLORYELLOW;}
建仓:=DIFF<0 AND REF(DIFF,1)<REF(DIFF,2) AND (DIFF>REF(DIFF,1)) AND MACD>REF(MACD,1),COLORLIRED,NODRAW;M买:DIFF<0 AND CROSS(DIFF,DEA),COLORYELLOW,NODRAW;M上买:DIFF>=0 AND CROSS(DIFF,DEA),COLORYELLOW,NODRAW;
{加仓:DIFF<0 AND DIFF>DEA AND MACD>REF(MACD,1),NODRAW,COLORYELLOW;持股:DIFF>0 AND DIFF>DEA AND MACD>REF(MACD,1),NODRAW,COLORRED;减仓:MACD>0 AND REF(MACD,1)>REF(MACD,2) AND MACD<REF(MACD,1),NODRAW,COLORGREEN;}M卖:DIFF>0 AND REF(DIFF,1)>REF(DIFF,2) AND DIFF<REF(DIFF,1),COLORGREEN,NODRAW;{持币:DIFF<DEA AND MACD<REF(MACD,1);清仓:DIFF>0 AND CROSS(DEA,DIFF),COLORGREEN,NODRAW;清仓1:DIFF>0 AND REF(DIFF,1)>REF(DIFF,2) AND (DIFF<REF(DIFF,1));}DRAWICON(M买,DIFF*1.06,34);DRAWTEXT(建仓,DIFF*1.25,'M建仓'),COLORLIRED;DRAWTEXT(M买,DEA*1.100,'M买'),COLORYELLOW;DRAWTEXT(M上买,DEA*1.200,'M上买'),COLORYELLOW;DRAWICON(M卖,DIFF*1.10,2);DRAWTEXT(M卖,DEA*1.30,'M卖'),COLORGREEN;{DRAWICON(清仓,DIFF*1.06,35);}
净利润同比:=FINANCE(43),COLORYELLOW,NODRAW;预报净利增长率:=FINVALUE(285),COLORRED,NODRAW;DRAWTEXT_FIX(1,0.000,0.000,0,STRCAT(STRCAT('【净利润同比:】 ',CON2STR(净利润同比,2)),' %')),COLORYELLOW;DRAWTEXT_FIX(1,0.160,0.000,0,STRCAT(STRCAT('【预报净利增长率:】 ',CON2STR(预报净利增长率,2)),' %')),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.00,0,STRCAT(STRCAT('【自由流通市值:】',CON2STR(FINANCE(46)*C/100000000,2)),'亿元'))COLORYELLOW;
DRAWTEXT_FIX(1,0.00,0.78,0,'所属概念:')COLOR00FFFF;DRAWTEXT_FIX(1,0.06,0.78,0,GNBLOCK),COLORYELLOW;DRAWTEXT_FIX(1,0.00,0.86,0,'所属风格:')COLOR00FFFF;DRAWTEXT_FIX(1,0.06,0.86,0,FGBLOCK),COLORYELLOW;
未来函数检测结果如下:
该公式包含未来函数:WINNER
该公式包含未来函数:FINANCE
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
B1赋值:(9日内H最高值-C)/(9日内H最高值-9日内最低价最低值)*100- 70
B1的9日[1日权重]移动平均
B3赋值:(C-9日内L最低值)/(9日内H最高值- 9日内L最低值)*100
B3的3日[1日权重]移动平均
B4的3日[1日权重]移动平均
B6赋值:B5-B2
如果B6>60返回B6-60否则返回0
输出持有:STICKLINE(1日前的B7输出A:0,POINTDOT,COLORMAGENTA, 线宽为3
输出{永不倒}获利盘:收盘价计算的获利盘比例*100,画红色,LINETHICK1
输出买入:B7上穿1,LINETHICK0,COLORMAGENTA
输出持股:B7>1日前的B7,LINETHICK0,COLORMAGENTA
输出卖出:CROSS(1日前的B7,B7),LINETHICK0,画绿色
{醒目MACD,LCY编辑}{INPUT:SHORT(12),LONG(26),M(9),N(55)
输出}DIFF:((收盘价的12日指数移动平均-收盘价的26日指数移动平均)), 线宽为2,画绿色
{IF(DIFF>=1日前的DIFF,DIFF,DRAWNULL), 线宽为2,画红色
}DE输出A:DIFF的9日指数移动平均,画白色
MACD:(DIFF-DEA)*2,COLORSTICK,COLORMAGENTA
{DRAWBAND(MACD,RGB(180,87,22),0,RGB(0,30,255))
}{IF(DIFF>0 AND DIFF>DEA AND DIFF>1日前的DIFF,DIFF,DRAWNULL), 线宽为2,画红色
IF(DIFF<0 AND DIFF>DEA AND DIFF>1日前的DIFF,DIFF,DRAWNULL), 线宽为2,画黄色
}建仓赋值:DIFF<0 AND 1日前的DIFF<2日前的DIFF AND (DIFF>1日前的DIFF) AND MACD>1日前的MACD,COLORLIRED,NODRAW
输出M买:DIFF<0 AND DIFF上穿DEA,画黄色,NODRAW
输出M上买:DIFF>=0 AND DIFF上穿DEA,画黄色,NODRAW
输出{加仓:DIFF<0 AND DIFF>DEA AND MACD>1日前的MACD,NODRAW,画黄色
输出持股:DIFF>0 AND DIFF>DEA AND MACD>1日前的MACD,NODRAW,画红色
输出减仓:MACD>0 AND 1日前的MACD>2日前的MACD AND MACD<1日前的MACD,NODRAW,画绿色
输出}M卖:DIFF>0 AND 1日前的DIFF>2日前的DIFF AND DIFF<1日前的DIFF,画绿色,NODRAW
输出{持币:DIFF输出清仓:DIFF>0 AND DEA上穿DIFF,画绿色,NODRAW
清仓1:DIFF>0 AND 1日前的DIFF>2日前的DIFF AND (DIFF<1日前的DIFF)
当满足条件M买时,在DIFF*1.06和34之间画图标
当满足条件建仓时,在DIFF*1.25和'M建仓'位置书写文字
当满足条件M买时,在DEA*1.100和'M买'位置书写文字
当满足条件M上买时,在DEA*1.200和'M上买'位置书写文字
当满足条件M卖时,在DIFF*1.10和2之间画图标
当满足条件M卖时,在DEA*1.30和'M卖'位置书写文字
当满足条件清仓时,在DIFF*1.06和35之间画图标
}净利润同比赋值:FINANCE(43),画黄色,NODRAW
预报净利增长率赋值:FINVALUE(285),画红色,NODRAW
DRAWTEXT_FIX(1,0.000,0.000,0,STRCAT(STRCAT('【净利润同比:】 ',CON2STR(净利润同比,2)),' %')),画黄色
DRAWTEXT_FIX(1,0.160,0.000,0,STRCAT(STRCAT('【预报净利增长率:】 ',CON2STR(预报净利增长率,2)),' %')),画黄色
DRAWTEXT_FIX(1,0.34,0.00,0,STRCAT(STRCAT('【自由流通市值:】',CON2STR(FINANCE(46)*C/100000000,2)),'亿元'))画黄色
当满足条件1时,在横轴0.00纵轴0.78位置书写文字
当满足条件1时,在横轴0.06纵轴0.78位置书写文字
当满足条件1时,在横轴0.00纵轴0.86位置书写文字
当满足条件1时,在横轴0.06纵轴0.86位置书写文字