在TDX核心上做了一个自己用着很顺手的核心、添加了主图副图指标,组合了各个摸板、设置了实用版面、链接了众多实用网站,在分时上查看9点25分前的竟价图,在指数上查看买卖一和买卖五的资金量差,还很不成熟,特敬拜一位老师帮忙优化!
为答谢学友,并把作业公开:一个主图--黄金分割+阻速线+操做+彩色K线 。标原创是因为在老师们的启发下的自组主图,其实没有什么创新。2个未来函数在阻速线画线中不影响判断,不喜欢可以去掉阻速部分!(有朋友忘记设施参数,因此不能通过。我加个图)
{成竹在胸}主图
{黄金分割}
{参数设置 J:10 9999 150 ; Q: 1 99 3}
顶部:=REF(HHV(H,J),Q);
底部:=REF(LLV(L,J),Q);
A:=顶部-(顶部-底部)*0.191;
B:=顶部-(顶部-底部)*0.382;
Z:=顶部-(顶部-底部)*0.5;
D:=顶部-(顶部-底部)*0.618;
E:=顶部-(顶部-底部)*0.809;
顶:REFDATE(顶部,DATE),POINTDOT,COLORBLUE,LINETHICK3;
A19.1%:REFDATE(A,DATE),POINTDOT,COLORYELLOW,LINETHICK2;
B38.2%:REFDATE(B,DATE),POINTDOT,COLORMAGENTA,LINETHICK2;
C50%:REFDATE(Z,DATE),POINTDOT,COLORLIGRAY,LINETHICK2;
D61.8%:REFDATE(D,DATE),POINTDOT,COLORRED,LINETHICK2;
E80.9%:REFDATE(E,DATE),POINTDOT,COLORCYAN,LINETHICK2;
底:REFDATE(底部,DATE),POINTDOT,COLORYELLOW,LINETHICK3;
{竹林}
X:=6;Y:=6;{参数可以自己调整}
DRAWLINE(H=PEAK(1 ,X ,1 ) ,H ,L=TROUGH(2 ,X ,1 ) ,L , 1),COLORBLUE;
DRAWLINE(H=PEAK(1 ,X ,1 ) ,H ,L=TROUGH(2 ,X ,1 ) ,
L+(PEAK(1 ,X ,1 )-TROUGH(2 ,X ,1 ))/3 , 1),COLORYELLOW;
DRAWLINE(H=PEAK(1 ,X ,1 ) ,H ,L=TROUGH(2 ,X ,1 ) ,
L+(PEAK(1 ,X ,1 )-TROUGH(2 ,X ,1 ))/3*2 , 1),COLOR66BB00;
DRAWLINE(L=TROUGH(2 ,Y,1 ) ,L ,H=PEAK(1 ,Y,1 ) ,H ,1 ),COLORBLUE;
DRAWLINE(L=TROUGH(2 ,Y,1 ) ,L ,H=PEAK(1 ,Y,1 ) ,
H-(PEAK(1 ,Y ,1 )-TROUGH(2 , Y,1 ))/3*2 ,1 ),COLORRED;
DRAWLINE(L=TROUGH(2 ,Y,1 ) ,L ,H=PEAK(1 ,Y,1 ) ,
H-(PEAK(1 ,Y ,1 )-TROUGH(2 , Y,1 ))/3 ,1 ),COLORYELLOW;
{操作}
M3:=EMA(CLOSE,3);
M21:=EMA(CLOSE,21);
DRAWTEXT(CROSS(M3,M21),(LOW * 0.99),'买进'),COLOR00FFFF;
DRAWTEXT(CROSS(M21,M3),(HIGH * 1.02),'出货'),COLOR00FF00;
DRAWTEXT(CROSS(85,RSI),(HIGH * 1.02),'落袋'),COLORCYAN;
{彩色K线}
STICKLINE(CLOSE>REF(CLOSE,1)*1.0985 AND CLOSE=HIGH,CLOSE,OPEN,4,-1),COLORRED;
STICKLINE(CLOSE<REF(CLOSE,1)*0.9015 AND CLOSE=LOW,CLOSE,OPEN,4,-1),COLORGREEN;
STICKLINE(CLOSE> REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORRED;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR000055;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR000077;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR000099;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLOR0000BB;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLOR0000DD;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLOR0000FF;
STICKLINE(CLOSE= REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORWHITE;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR555555;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR777777;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR999999;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORBBBBBB;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORDDDDDD;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORFFFFFF;
STICKLINE(CLOSE< REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORCYAN;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR990000;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLORCC0000;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLORFF4400;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORFF8800;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORFFCC00;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORCYAN; |