通达信全盘穿越主图指标 寻找主力攻击方向 源码
{全盘穿越主}
上涨家数:"SZ399002$ADVANCE"+"SH999999$ADVANCE"-"SZ399108$ADVANCE",COLORRED,NODRAW;{仅限於日线周期}
下跌家数:"SZ399002$DECLINE"+"SH999999$DECLINE"-"SZ399108$DECLINE",COLORGREEN,NODRAW;
涨跌比:上涨家数/(上涨家数+下跌家数)*100,NODRAW;
MA5:MA(C,5),COLORRED,LINETHICK2;
MA10:MA(C,10),COLORLICYAN;
MA20:=MA(C,20)COLORLICYAN;
MA30:MA(C,30),COLORYELLOW,LINETHICK2;
MA60:=MA(C,60),COLORMAGENTA,LINETHICK1;
MA120:=MA(C,120),COLORLIBLUE;
变色线1:IF(MA5<=REF(MA5,1),MA5,DRAWNULL),COLORGREEN,LINETHICK2;
变色线2:IF(MA30<=REF(MA30,1),MA30,DRAWNULL),COLORGREEN,LINETHICK2;
DRAWTEXT_FIX(1,0.00,0,0,'所属行业:'),COLOR0080FF;
DRAWTEXT_FIX(1,0.07,0,0,HYBLOCK),COLOR0080FF;
DRAWTEXT_FIX(1,0.14,0,0,'所属地区:'),COLOR00FFFF;
DRAWTEXT_FIX(1,0.36,0,0,'莸利比例:'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.40,0,0,CONST(WINNER(C)*100)),COLORYELLOW;
获利%:WINNER(CLOSE)*100,NODRAW,COLORWHITE;
DRAWTEXT_FIX(获利%>=95 AND ISLASTBAR,0.45,0,0,'高危'),COLORRED;
DRAWTEXT_FIX(获利%>=80 AND 获利%<95 AND ISLASTBAR,0.45,0,0,'风险'),COLORYELLOW;
DRAWTEXT_FIX(获利%>=50 AND 获利%<80 AND ISLASTBAR,0.45,0,0,'安全'),COLORGREEN;
DRAWTEXT_FIX(获利%<50 AND ISLASTBAR,0.45,0,0,'空头'),COLORBLUE;
DRAWTEXT_FIX(1,0.21,0,0,DYBLOCK),COLOR00FFFF;
DRAWTEXT_FIX(1,0.00,0.04,0,'主题投资:'),COLOR0000FF;
DRAWTEXT_FIX(1,0.07,0.04,0,EXTERNSTR(0,1)),COLOR0000FF;
DRAWTEXT_FIX(1,0.00,0.08,0,'主营业务:'),COLORFF00FF;
DRAWTEXT_FIX(1,0.07,0.08,0,EXTERNSTR(0,2)),COLORFF00FF;
DRAWTEXT_FIX(1,0.00,0.12,0,'出千概念:'),COLORFF88FF;
DRAWTEXT_FIX(1,0.07,0.12,0,EXTERNSTR(0,3)),COLORFF88FF;
DRAWTEXT_FIX(1,0.00,0.16,0,'主题概念:'),COLOR00FFFF;
DRAWTEXT_FIX(1,0.09,0.16,0,EXTERNSTR(0,4)),COLOR00FFFF;
STICKLINE(C/REF(C,1)>1.095,C,O,3,0),COLORYELLOW;
STICKLINE(C>REF(C,1) AND C>O AND 100*WINNER(C)-REF(100*WINNER(C),1)>=30,O,C,3,0),COLORRED;
STICKLINE(C>REF(C,1) AND C>O AND 100*WINNER(C)-REF(100*WINNER(C),1)>=30,H,C,0,0),COLORRED;
STICKLINE(C>REF(C,1) AND C>O AND 100*WINNER(C)-REF(100*WINNER(C),1)>=30,L,C,0,0),COLORRED;
STICKLINE(C>REF(C,1) AND C>O AND 100*WINNER(C)-REF(100*WINNER(C),1)>=30,H,C,0,0),COLORRED;
STICKLINE(C>REF(C,1) AND 100*WINNER(C)-REF(100*WINNER(C),1)>=40,O,C-(C-O)/2,3,0),COLORBLUE;
STICKLINE(C>REF(C,1) AND 100*WINNER(C)-REF(100*WINNER(C),1)>=40,H,C,0,0), COLORRED;
STICKLINE(C>REF(C,1) AND 100*WINNER(C)-REF(100*WINNER(C),1)>=40,O,C-(C-O)/2,3,0),COLORBLUE;
STICKLINE(C>REF(C,1) AND 100*WINNER(C)-REF(100*WINNER(C),1)>=40,H,C,0,0), COLORRED;
STICKLINE(C>REF(C,1) AND 100*WINNER(C)-REF(100*WINNER(C),1)>=50,O,C-(C-O)/3,3,0),COLORYELLOW;
STICKLINE(C>REF(C,1) AND 100*WINNER(C)-REF(100*WINNER(C),1)>=50,H,C,0,0), COLORRED;
STICKLINE(C>REF(C,1) AND 100*WINNER(C)-REF(100*WINNER(C),1)>=50,O,C-(C-O)/3,3,0),COLORYELLOW;
STICKLINE(C>REF(C,1) AND 100*WINNER(C)-REF(100*WINNER(C),1)>=50,H,C,0,0), COLORRED;
STICKLINE(C>REF(C,1) AND 100*WINNER(C)-REF(100*WINNER(C),1)>=50,O,C-(C-O)*2/3,3,0),COLORBLUE;
STICKLINE(C<REF(C,1) AND REF(100*WINNER(C),1)-100*WINNER(C)>=30,O,C,3,0),COLORLIBLUE;
STICKLINE(C<REF(C,1) AND REF(100*WINNER(C),1)-100*WINNER(C)>=30,H,O,0,0),COLORLIBLUE;
STICKLINE(C<REF(C,1) AND REF(100*WINNER(C),1)-100*WINNER(C)>=30,L,C,0,0),COLORLIBLUE;
STICKLINE(C>REF(C,1) AND C=O AND (C-REF(C,1))/REF(C,1)>0.0991 AND 100*WINNER(C)-REF(100*WINNER(C),1)>=30,O*0.985,C,2.5,0),COLORRED;
STICKLINE(C>REF(C,1) AND C=O AND (C-REF(C,1))/REF(C,1)>0.0991 AND 100*WINNER(C)-REF(100*WINNER(C),1)>=30,H,C,0,0),COLORRED;
STICKLINE(C>REF(C,1) AND C=O AND (C-REF(C,1))/REF(C,1)>0.0991 AND 100*WINNER(C)-REF(100*WINNER(C),1)>=30,L,C,0,0),COLORRED;
STICKLINE(C>REF(C,1) AND C=O AND (C-REF(C,1))/REF(C,1)>0.0991 AND 100*WINNER(C)-REF(100*WINNER(C),1)>=30,H,C,0,0),COLORRED;
{现价画直线}
现价:DRAWLINE(CURRBARSCOUNT=TOTALBARSCOUNT,CONST(C),CURRBARSCOUNT=1,C,3),DOTLINE,COLORLIGRAY;
未来函数检测结果如下:
该公式包含未来函数:WINNER
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
输出{全盘穿越主}
上涨家数:"SZ399002$ADVANCE"+"SH999999$ADVANCE"-"SZ399108$ADVANCE",画红色,NODRAW
输出{仅限於日线周期}
下跌家数:"SZ399002$DECLINE"+"SH999999$DECLINE"-"SZ399108$DECLINE",画绿色,NODRAW
输出涨跌比:上涨家数/(上涨家数+下跌家数)*100,NODRAW
输出MA5:C的5日简单移动平均,画红色, 线宽为2
输出MA10:C的10日简单移动平均,COLORLICYAN
MA20赋值:C的20日简单移动平均COLORLICYAN
输出MA30:C的30日简单移动平均,画黄色, 线宽为2
MA60赋值:C的60日简单移动平均,画洋红色,LINETHICK1
MA120赋值:C的120日简单移动平均,COLORLIBLUE
输出变色线1:IF(MA5<=1日前的MA5,MA5,DRAWNULL),画绿色, 线宽为2
输出变色线2:IF(MA30<=1日前的MA30,MA30,DRAWNULL),画绿色, 线宽为2
当满足条件1时,在横轴0.00纵轴0位置书写文字
当满足条件1时,在横轴0.07纵轴0位置书写文字
当满足条件1时,在横轴0.14纵轴0位置书写文字
当满足条件1时,在横轴0.36纵轴0位置书写文字
DRAWNUMBER_FIX(1,0.40,0,0,CONST(C计算的获利盘比例*100)),画黄色
输出获利%:收盘价计算的获利盘比例*100,NODRAW,画白色
当满足条件获利%>=95 AND ISLASTBAR时,在横轴0.45纵轴0位置书写文字
当满足条件获利%>=80 AND 获利%<95 AND ISLASTBAR时,在横轴0.45纵轴0位置书写文字
当满足条件获利%>=50 AND 获利%<80 AND ISLASTBAR时,在横轴0.45纵轴0位置书写文字
当满足条件获利%<50 AND ISLASTBAR时,在横轴0.45纵轴0位置书写文字
当满足条件1时,在横轴0.21纵轴0位置书写文字
当满足条件1时,在横轴0.00纵轴0.04位置书写文字
DRAWTEXT_FIX(1,0.07,0.04,0,EXTERNSTR(0,1)),COLOR0000FF
当满足条件1时,在横轴0.00纵轴0.08位置书写文字
DRAWTEXT_FIX(1,0.07,0.08,0,EXTERNSTR(0,2)),COLORFF00FF
当满足条件1时,在横轴0.00纵轴0.12位置书写文字
DRAWTEXT_FIX(1,0.07,0.12,0,EXTERNSTR(0,3)),COLORFF88FF
当满足条件1时,在横轴0.00纵轴0.16位置书写文字
DRAWTEXT_FIX(1,0.09,0.16,0,EXTERNSTR(0,4)),COLOR00FFFF
STICKLINE(C/1日前的C>1.095,C,O,3,0),画黄色
STICKLINE(C>1日前的C AND C>O AND 100*C计算的获利盘比例-REF(100*C计算的获利盘比例,1)>=30,O,C,3,0),画红色
STICKLINE(C>1日前的C AND C>O AND 100*C计算的获利盘比例-REF(100*C计算的获利盘比例,1)>=30,H,C,0,0),画红色
STICKLINE(C>1日前的C AND C>O AND 100*C计算的获利盘比例-REF(100*C计算的获利盘比例,1)>=30,L,C,0,0),画红色
STICKLINE(C>1日前的C AND C>O AND 100*C计算的获利盘比例-REF(100*C计算的获利盘比例,1)>=30,H,C,0,0),画红色
STICKLINE(C>1日前的C AND 100*C计算的获利盘比例-REF(100*C计算的获利盘比例,1)>=40,O,C-(C-O)/2,3,0), 画蓝色
STICKLINE(C>1日前的C AND 100*C计算的获利盘比例-REF(100*C计算的获利盘比例,1)>=40,H,C,0,0), 画红色
STICKLINE(C>1日前的C AND 100*C计算的获利盘比例-REF(100*C计算的获利盘比例,1)>=40,O,C-(C-O)/2,3,0), 画蓝色
STICKLINE(C>1日前的C AND 100*C计算的获利盘比例-REF(100*C计算的获利盘比例,1)>=40,H,C,0,0), 画红色
STICKLINE(C>1日前的C AND 100*C计算的获利盘比例-REF(100*C计算的获利盘比例,1)>=50,O,C-(C-O)/3,3,0),画黄色
STICKLINE(C>1日前的C AND 100*C计算的获利盘比例-REF(100*C计算的获利盘比例,1)>=50,H,C,0,0), 画红色
STICKLINE(C>1日前的C AND 100*C计算的获利盘比例-REF(100*C计算的获利盘比例,1)>=50,O,C-(C-O)/3,3,0),画黄色
STICKLINE(C>1日前的C AND 100*C计算的获利盘比例-REF(100*C计算的获利盘比例,1)>=50,H,C,0,0), 画红色
STICKLINE(C>1日前的C AND 100*C计算的获利盘比例-REF(100*C计算的获利盘比例,1)>=50,O,C-(C-O)*2/3,3,0), 画蓝色
STICKLINE(C<1日前的C AND REF(100*C计算的获利盘比例,1)-100*C计算的获利盘比例>=30,O,C,3,0),COLORLIBLUE
STICKLINE(C<1日前的C AND REF(100*C计算的获利盘比例,1)-100*C计算的获利盘比例>=30,H,O,0,0),COLORLIBLUE
STICKLINE(C<1日前的C AND REF(100*C计算的获利盘比例,1)-100*C计算的获利盘比例>=30,L,C,0,0),COLORLIBLUE
STICKLINE(C>1日前的C AND C=O AND (C-1日前的C)/1日前的C>0.0991 AND 100*C计算的获利盘比例-REF(100*C计算的获利盘比例,1)>=30,O*0.985,C,2.5,0),画红色
STICKLINE(C>1日前的C AND C=O AND (C-1日前的C)/1日前的C>0.0991 AND 100*C计算的获利盘比例-REF(100*C计算的获利盘比例,1)>=30,H,C,0,0),画红色
STICKLINE(C>1日前的C AND C=O AND (C-1日前的C)/1日前的C>0.0991 AND 100*C计算的获利盘比例-REF(100*C计算的获利盘比例,1)>=30,L,C,0,0),画红色
STICKLINE(C>1日前的C AND C=O AND (C-1日前的C)/1日前的C>0.0991 AND 100*C计算的获利盘比例-REF(100*C计算的获利盘比例,1)>=30,H,C,0,0),画红色
输出{现价画直线}
现价:DRAWLINE( 到最后交易的周期=TOTALBARSCOUNT,CONST(C), 到最后交易的周期=1,C,3),DOTLINE,COLORLIGRAY