徐文明点金明日之文字提示系统(源码、注释、副图)介绍
徐文明点金明日之文字提示系统(源码、注释、副图)
感谢番茄2000提供的徐文明老师短线决策系统点金明日的操盘思想,尝试着编成文字版,看起来更加清晰,由于通达信没有大智慧诸如drawflagtext的功能,只能做成附图。请大家不断完善,形成简单易懂,一目了然的提示系统。
代码如下:复制内容到剪贴板代码:
{静态显示昨日、今日、明日操盘提示}
{-----------背景---------------------}
STICKLINE(CURRBARSCOUNT=10,100,50,450,0),COLORRED;
STICKLINE(CURRBARSCOUNT=10,50,0,450,0),COLORGREEN;
STICKLINE(CURRBARSCOUNT=54,100,0,60,0),COLORWHITE;
{均线}
MA1:=MA(C,5),NODRAW;
{----------判断因子-----}
均价:=(OPEN+HIGH+LOW+CLOSE*2)/5,NODRAW;
突破:=均价+HIGH-LOW,NODRAW;
阻力:=均价*2-LOW,NODRAW;
支撑:=均价*2-HIGH,NODRAW;
下降:=均价-HIGH+LOW,NODRAW;
明心价:=(均价+突破+阻力+支撑+下降)/5,NODRAW;
今保价:=(REF(CLOSE,2)+REF(CLOSE,1)+OPEN)/3,NODRAW;
PP:=明心价*100-INTPART(明心价*100);{取小数点后第三位开始往后的数值然后四舍五入}
QQ:=今保价*100-INTPART(今保价*100);
十倍明日心理价:(INTPART(PP*10))*0.01+INTPART(明心价*100)*0.1,NODRAW;
十倍近日保护价:(INTPART(QQ*10))*0.01+INTPART(今保价*100)*0.1,NODRAW;{由于通达信默认四舍五入,故放大十倍,查看原始数据}
明日心理价:(INTPART(PP*10))*0.001+INTPART(明心价*100)*0.01,NODRAW;
今日保护价:(INTPART(QQ*10))*0.001+INTPART(今保价*100)*0.01,NODRAW;
昨天均价:=(REF(OPEN,1)+REF(HIGH,1)+REF(LOW,1)+REF(CLOSE,1)*2)/5,NODRAW;
昨天突破:=昨天均价+REF(HIGH,1)-REF(LOW,1),NODRAW;
昨天阻力:=昨天均价*2-REF(LOW,1),NODRAW;
昨天支撑:=昨天均价*2-REF(HIGH,1),NODRAW;
昨天下降:=昨天均价-REF(HIGH,1)+REF(LOW,1),NODRAW;
昨明心价:=(昨天均价+昨天突破+昨天阻力+昨天支撑+昨天下降)/5,NODRAW;
昨今保价:=(REF(CLOSE,3)+REF(CLOSE,2)+REF(OPEN,1))/3,NODRAW;
昨PP:=昨明心价*100-INTPART(昨明心价*100);{取小数点后第三位开始往后的数值然后四舍五入}
昨QQ:=昨今保价*100-INTPART(昨今保价*100);
昨天明日心理价:=(INTPART(昨PP*10))*0.001+INTPART(昨明心价*100)*0.01,NODRAW;
昨天今日保护价:=(INTPART(昨QQ*10))*0.001+INTPART(昨今保价*100)*0.01,NODRAW;
{判断过程}
A1:=CONST(IF(CLOSE<明日心理价 ,1,0));{高开}
A2:=CONST(IF(CLOSE>明日心理价 ,1,0));{低开}
A3:=CONST(IF(CLOSE=明日心理价 ,1,0));
B1:=CONST(IF(OPEN<REF(CLOSE,1),1,0));{实际今日低开}
B2:=CONST(IF(OPEN>REF(CLOSE,1),1,0));{实际今日高开}
B3:=CONST(IF(OPEN=REF(CLOSE,1),1,0));{实际今日平开}
C1:=CONST(IF(REF(CLOSE,1)>昨天明日心理价,1,0));{昨日预测今日低开}
C2:=CONST(IF(REF(CLOSE,1)<昨天明日心理价,1,0));{昨日预测今日高开}
C3:=CONST(IF(REF(CLOSE,1)=昨天明日心理价,1,0));{两值相同}
{今日提示}
{K线上行通道策略}
DRAWTEXT( CURRBARSCOUNT=45,93,'若判断方向是向上的时间窗口,今日采取以下策略:'),COLORWHITE;
DRAWTEXT(B1=1 AND C1=1 AND B3=0 AND CURRBARSCOUNT=45,84,'1、可能低开高走,可逢低吸纳。只有股价连续站上开盘价30分钟,才能确认不会再下探。'),COLORWHITE;{预测低开,低开策略}
DRAWTEXT(B2=1 AND C1=1 AND B3=0 AND CURRBARSCOUNT=45,84,'1、可能高开低走,不追高,等回探逢低吸纳。只有股价连续站上开盘价30分钟,才能确认不会再下探。'),COLORWHITE;{预测低开,高开策略}
DRAWTEXT(B1=1 AND C2=1 AND B3=0 AND CURRBARSCOUNT=45,84,'1、可能低开高走,必然冲高,可以逢低吸纳。'),COLORWHITE;{预测高开,低开策略}
DRAWTEXT(B2=1 AND C2=1 AND B3=0 AND CURRBARSCOUNT=45,84,'1、可能高开高走,择机加仓。'),COLORWHITE;{预测高开,高开策略}
DRAWTEXT(B3=1 AND CURRBARSCOUNT=45 AND ( C2=1 OR C1=1 ) ,84,'1、可能平开高走,择机加仓'),COLORWHITE;{平开策略}
DRAWTEXT( L>明日心理价 AND REF(L,1)>REF(明日心理价,1) AND CURRBARSCOUNT=45,68,'3、已连续两日运行在心理价之上,必然回抽5日线'),COLORWHITE;
DRAWTEXT( CONST(IF(L>明日心理价,1,0))=1 AND CURRBARSCOUNT=45,60,'4、如果强势行情中出现了全天运行在心理价之上的情况,一定要逢高离场。'),COLORWHITE;
DRAWTEXT( CONST(IF(L>明日心理价,1,0))=1 AND CURRBARSCOUNT=45,56,'因为无论多么强势第二天也会回抽心理价;'),COLORWHITE;
DRAWTEXT( CONST(IF(DYNAINFO(7)>今日保护价,1,0))=1 AND CURRBARSCOUNT=45,76,'2、目前股价运行在今日保护价之上,不宜追涨。'),COLORWHITE;
DRAWTEXT( CONST(IF(DYNAINFO(7)<今日保护价,1,0))=1 AND CURRBARSCOUNT=45,76,'2、目前股价运行在今日保护价之下,可结合其他几条逢低吸纳。'),COLORWHITE;
{K线下行通道策略}
DRAWTEXT( CURRBARSCOUNT=45,43,'若判断方向是向下的时间窗口,今日采取以下策略:'),COLORBLACK;
DRAWTEXT(B1=1 AND C1=1 AND B3=0 AND CURRBARSCOUNT=45,34,'1、可能低开低走,迅速离场,若股价连续击破开盘价30分钟,则大势已去。'),COLORBLACK;{预测低开,低开策略}
DRAWTEXT(B2=1 AND C1=1 AND B3=0 AND CURRBARSCOUNT=45,34,'1、可能高开低走,逢高离场,若股价连续击破开盘价30分钟,则大势已去。'),COLORBLACK;{预测低开,高开策略}
DRAWTEXT(B1=1 AND C2=1 AND B3=0 AND CURRBARSCOUNT=45,34,'1、可能低开高走,必然会冲高,甚至可能改变时间窗口方向。若股价连续击破开盘价30分钟,则大势已去。'),COLORBLACK;{预测高开,低开策略}
DRAWTEXT(B2=1 AND C2=1 AND B3=0 AND CURRBARSCOUNT=45,34,'1、可能高开高走,一旦下破开盘价连续三十分钟,则大势已去,可以卖出。'),COLORBLACK;{预测高开,高开策略}
DRAWTEXT(B3=1 AND( C2=1 OR C1=1 ) AND CURRBARSCOUNT=45,34,'1、可能平开低走,逢高离场。若股价连续击破开盘价30分钟,则大势已去。'),COLORBLACK;{平开策略}
DRAWTEXT( H<明日心理价 AND REF(H,1)<REF(明日心理价,1) AND CURRBARSCOUNT=45,16,'2、已连续两日运行在心理价之下,必然会向上突破5日线'),COLORBLACK;
{DRAWTEXT( CONST(IF(DYNAINFO(7)>今日保护价,1,0))=1 AND CURRBARSCOUNT=45,26,'2、目前股价运行在今日保护价之上,不宜追涨。'),COLORBLACK;
DRAWTEXT( CONST(IF(DYNAINFO(7)<今日保护价,1,0))=1 AND CURRBARSCOUNT=45,26,'2、目前股价运行在今日保护价之下,可结合其他几条逢低吸纳。'),COLORBLACK;}
{左侧预测栏}
{明日提示}
DRAWTEXT( CURRBARSCOUNT=58,93,'明日提示:'),COLORRED;
DRAWTEXT(A1=1 AND A3=0 AND CURRBARSCOUNT=58,84,'预测明日高开'),COLORRED;
DRAWTEXT(A2=1 AND A3=0 AND CURRBARSCOUNT=58,84,'预测明日低开'),COLORRED;
DRAWTEXT(A3=1 AND CURRBARSCOUNT=58,84,'两值相同,不做预测'),COLORRED;
{今日提示}
DRAWTEXT(CURRBARSCOUNT=58,64,'今日结果验证:'),COLORBLACK;{低开}
DRAWTEXT(B1=1 AND C1=1 AND B3=0 AND CURRBARSCOUNT=58,56,'预测成功,今日低开。'),COLORBLACK;
DRAWTEXT(B2=1 AND C1=1 AND B3=0 AND CURRBARSCOUNT=58,56,'预测错误,今日高开。'),COLORBLACK;{低开}
DRAWTEXT(B1=1 AND C2=1 AND B3=0 AND CURRBARSCOUNT=58,56,'预测错误,今日低开。'),COLORBLACK;
DRAWTEXT(B2=1 AND C2=1 AND B3=0 AND CURRBARSCOUNT=58,56,'预测正确,今日高开。'),COLORBLACK;{高开}
DRAWTEXT(B3=1 AND( C2=1 OR C1=1 ) AND CURRBARSCOUNT=58,56,'预测错误,今日平开。'),COLORBLACK;{平开}
{昨日提示}
DRAWTEXT( CURRBARSCOUNT=58,36,'昨日提示:'),COLORBLUE;
DRAWTEXT(C1=1 AND C3=0 AND CURRBARSCOUNT=58,28,'预测今日低开'),COLORBLUE;
DRAWTEXT(C2=1 AND C3=0 AND CURRBARSCOUNT=58,28,'预测今日高开'),COLORBLUE;
DRAWTEXT(C3=1 AND CURRBARSCOUNT=58,28,'两值相同,不做预测'),COLORBLUE;
gd13916