这是一个不但能在k线图的付图上显示各个周期的技术参数,如果你把它放在分时技术指标里,那么它还能在分时付图上显示各个不同周期的技术参数,是不是很方便呀?
源代码:
DRAwrECTAbs(2,19,935,168,RGB(100,50,50)),COLORFFFFFF;
DRAWTEXTABS(15,3,'沙吾提制作'),COLOR00FFFF,LINETHICK2;
DRAWTEXTABS(250,0,'不 同 周 期 技 术 参 数'),COLOR0000FF,LINETHICK3;
DRAWTEXTABS(500,0,''+STKNAME+'('+STKLABEL+')'),COLORFF9933,LINETHICK3; {股票名称、代码}
DRAWTEXTABS(10,25,'数据分类'),COLOR0066FF,LINETHICK2;
DRAWTEXTABS(10,45,'月 线 图'),COLORFFFFFF,LINETHICK2;
DRAWTEXTABS(10,65,'周 线 图'),COLOR00FFFF,LINETHICK2;
DRAWTEXTABS(10,85,'日 线 图'),COLORFF00FF,LINETHICK2;
DRAWTEXTABS(10,105,'60分钟图'),COLOR39FF00,LINETHICK2;
DRAWTEXTABS(10,125,'30分钟图'),COLORFF0033,LINETHICK2;
DRAWTEXTABS(10,145,'15分钟图'),COLORFFCC00,LINETHICK2;
月MA5:="MA.MA1#MONTH";
月MA10:="MA.MA2#MONTH";
月MA20:="MA.MA3#MONTH";
月MA30:="MA.MA4#MONTH";
月MA60:="MA.MA5#MONTH";
月MA120:="MA.MA6#MONTH";
周MA5:= "MA.MA1#WEEK";
周MA10:= "MA.MA2#WEEK";
周MA20:= "MA.MA3#WEEK";
周MA30:= "MA.MA4#WEEK";
周MA60:= "MA.MA5#WEEK";
周MA120:= "MA.MA6#WEEK";
MA5:=MA(C,5);
MA10:=MA(C,10);
MA20:=MA(C,20);
MA30:=MA(C,30);
MA60:=MA(C,60);
MA120:=MA(C,120);
FZ605:="MA.MA1#MIN60";
FZ6010:="MA.MA2#MIN60";
FZ6020:="MA.MA3#MIN60";
FZ6030:="MA.MA4#MIN60";
FZ6060:="MA.MA5#MIN60";
FZ60120:="MA.MA6#MIN60";
FZ305:="MA.MA1#MIN30";
FZ3010:="MA.MA2#MIN30";
FZ3020:="MA.MA3#MIN30";
FZ3030:="MA.MA4#MIN30";
FZ3060:="MA.MA5#MIN30";
FZ30120:="MA.MA6#MIN30";
FZ155:="MA.MA1#MIN15";
FZ1510:="MA.MA2#MIN15";
FZ1520:="MA.MA3#MIN15";
FZ1530:="MA.MA4#MIN15";
FZ1560:="MA.MA5#MIN15";
FZ15120:="MA.MA6#MIN15";
DRAWTEXTABS(105,25,' MA5'),COLOR0066FF,LINETHICK2;
DRAWTEXTABS(100,45,STRRIGHT(' '+NUMTOSTRN(月MA5,3),6)),COLORFFFFFF,LINETHICK2;
DRAWTEXTABS(100,65,STRRIGHT(' '+NUMTOSTRN(周MA5,3),6)),COLOR00FFFF,LINETHICK2;
DRAWTEXTABS(100,85,STRRIGHT(' '+NUMTOSTRN(MA5,3),6)),COLORFF00FF,LINETHICK2;
DRAWTEXTABS(100,105,STRRIGHT(' '+NUMTOSTRN(FZ605,3),6)),COLOR39FF00,LINETHICK2;
DRAWTEXTABS(100,125,STRRIGHT(' '+NUMTOSTRN(FZ305,3),6)),COLORFF0033,LINETHICK2;
DRAWTEXTABS(100,145,STRRIGHT(' '+NUMTOSTRN(FZ155,3),6)),COLORFFCC00,LINETHICK2;
DRAWTEXTABS(170,25,' MA10'),COLOR0066FF,LINETHICK2;
DRAWTEXTABS(170,45,STRRIGHT(' '+NUMTOSTRN(月MA10,3),6)),COLORFFFFFF,LINETHICK2;
DRAWTEXTABS(170,65,STRRIGHT(' '+NUMTOSTRN(周MA10,3),6)),COLOR00FFFF,LINETHICK2;
DRAWTEXTABS(170,85,STRRIGHT(' '+NUMTOSTRN(MA10,3),6)),COLORFF00FF,LINETHICK2;
DRAWTEXTABS(170,105,STRRIGHT(' '+NUMTOSTRN(FZ6010,3),6)),COLOR39FF00,LINETHICK2;
DRAWTEXTABS(170,125,STRRIGHT(' '+NUMTOSTRN(FZ3010,3),6)),COLORFF0033,LINETHICK2;
DRAWTEXTABS(170,145,STRRIGHT(' '+NUMTOSTRN(FZ1510,3),6)),COLORFFCC00,LINETHICK2;
DRAWTEXTABS(240,25,' MA20'),COLOR0066FF,LINETHICK2;
DRAWTEXTABS(240,45,STRRIGHT(' '+NUMTOSTRN(月MA20,3),6)),COLORFFFFFF,LINETHICK2;
DRAWTEXTABS(240,65,STRRIGHT(' '+NUMTOSTRN(周MA20,3),6)),COLOR00FFFF,LINETHICK2;
DRAWTEXTABS(240,85,STRRIGHT(' '+NUMTOSTRN(MA20,3),6)),COLORFF00FF,LINETHICK2;
DRAWTEXTABS(240,105,STRRIGHT(' '+NUMTOSTRN(FZ6020,3),6)),COLOR39FF00,LINETHICK2;
DRAWTEXTABS(240,125,STRRIGHT(' '+NUMTOSTRN(FZ3020,3),6)),COLORFF0033,LINETHICK2;
DRAWTEXTABS(240,145,STRRIGHT(' '+NUMTOSTRN(FZ1520,3),6)),COLORFFCC00,LINETHICK2;
DRAWTEXTABS(310,25,' MA30'),COLOR0066FF,LINETHICK2;
DRAWTEXTABS(310,45,STRRIGHT(' '+NUMTOSTRN(月MA30,3),6)),COLORFFFFFF,LINETHICK2;
DRAWTEXTABS(310,65,STRRIGHT(' '+NUMTOSTRN(周MA30,3),6)),COLOR00FFFF,LINETHICK2;
DRAWTEXTABS(310,85,STRRIGHT(' '+NUMTOSTRN(MA30,3),6)),COLORFF00FF,LINETHICK2;
DRAWTEXTABS(310,105,STRRIGHT(' '+NUMTOSTRN(FZ6030,3),6)),COLOR39FF00,LINETHICK2;
DRAWTEXTABS(310,125,STRRIGHT(' '+NUMTOSTRN(FZ3030,3),6)),COLORFF0033,LINETHICK2;
DRAWTEXTABS(310,145,STRRIGHT(' '+NUMTOSTRN(FZ1530,3),6)),COLORFFCC00,LINETHICK2;
DRAWTEXTABS(380,25,' MA60'),COLOR0066FF,LINETHICK2;
DRAWTEXTABS(380,45,STRRIGHT(' '+NUMTOSTRN(月MA60,3),6)),COLORFFFFFF,LINETHICK2;
DRAWTEXTABS(380,65,STRRIGHT(' '+NUMTOSTRN(周MA60,3),6)),COLOR00FFFF,LINETHICK2;
DRAWTEXTABS(380,85,STRRIGHT(' '+NUMTOSTRN(MA60,3),6)),COLORFF00FF,LINETHICK2;
DRAWTEXTABS(380,105,STRRIGHT(' '+NUMTOSTRN(FZ6060,3),6)),COLOR39FF00,LINETHICK2;
DRAWTEXTABS(380,125,STRRIGHT(' '+NUMTOSTRN(FZ3060,3),6)),COLORFF0033,LINETHICK2;
DRAWTEXTABS(380,145,STRRIGHT(' '+NUMTOSTRN(FZ1560,3),6)),COLORFFCC00,LINETHICK2;
DRAWTEXTABS(450,25,' MA120'),COLOR0066FF,LINETHICK2;
DRAWTEXTABS(450,45,STRRIGHT(' '+NUMTOSTRN(月MA120,3),6)),COLORFFFFFF,LINETHICK2;
DRAWTEXTABS(450,65,STRRIGHT(' '+NUMTOSTRN(周MA120,3),6)),COLOR00FFFF,LINETHICK2;
DRAWTEXTABS(450,85,STRRIGHT(' '+NUMTOSTRN(MA120,3),6)),COLORFF00FF,LINETHICK2;
DRAWTEXTABS(450,105,STRRIGHT(' '+NUMTOSTRN(FZ60120,3),6)),COLOR39FF00,LINETHICK2;
DRAWTEXTABS(450,125,STRRIGHT(' '+NUMTOSTRN(FZ30120,3),6)),COLORFF0033,LINETHICK2;
DRAWTEXTABS(450,145,STRRIGHT(' '+NUMTOSTRN(FZ15120,3),6)),COLORFFCC00,LINETHICK2;
月DIFF:= "macd.DIFF#MONTH";
周DIFF:= "MACD.DIFF# WEEK";
DIFF:= "MACD.DIFF";
FZ60DIFF:= "MACD.DIFF# MIN60";
FZ30DIFF:= "MACD.DIFF# MIN30";
FZ15DIFF:= "MACD.DIFF# MIN15";
月DEA:= "MACD.DEA# MONTH";
周DEA:= "MACD.DEA# WEEK";
DEA:= "MACD.DEA";
FZ60DEA:= "MACD.DEA# MIN60";
FZ30DEA:= "MACD.DEA# MIN30";
FZ15DEA:= "MACD.DEA# MIN15";
月MACD:= "MACD.MACD#MONTH";
周MACD:= "MACD.MACD#WEEK";
MACD:="MACD.MACD";
FZ60MACD:= "MACD.MACD#MIN60 ";
FZ30MACD:= "MACD.MACD#MIN30";
FZ15MACD:= "MACD.MACD#MIN15";
DRAWTEXTABS(525,25,' DIFF'),COLOR0066FF,LINETHICK2;
DRAWTEXTABS(515,45,STRRIGHT(' '+NUMTOSTRN(月DIFF,3),8)),COLORFFFFFF,LINETHICK2;
DRAWTEXTABS(515,65,STRRIGHT(' '+NUMTOSTRN(周DIFF,3),8)),COLOR00FFFF,LINETHICK2;
DRAWTEXTABS(515,85,STRRIGHT(' '+NUMTOSTRN(DIFF,3),8)),COLORFF00FF,LINETHICK2;
DRAWTEXTABS(515,105,STRRIGHT(' '+NUMTOSTRN(FZ60DIFF,3),8)),COLOR39FF00,LINETHICK2;
DRAWTEXTABS(515,125,STRRIGHT(' '+NUMTOSTRN(FZ30DIFF,3),8)),COLORFF0033,LINETHICK2;
DRAWTEXTABS(515,145,STRRIGHT(' '+NUMTOSTRN(FZ15DIFF,3),8)),COLORFFCC00,LINETHICK2;
DRAWTEXTABS(595,25,' DEA '),COLOR0066FF,LINETHICK2;
DRAWTEXTABS(585,45,STRRIGHT(' '+NUMTOSTRN(月DEA,3),8)),COLORFFFFFF,LINETHICK2;
DRAWTEXTABS(585,65,STRRIGHT(' '+NUMTOSTRN(周DEA,3),8)),COLOR00FFFF,LINETHICK2;
DRAWTEXTABS(585,85,STRRIGHT(' '+NUMTOSTRN(DEA,3),8)),COLORFF00FF,LINETHICK2;
DRAWTEXTABS(585,105,STRRIGHT(' '+NUMTOSTRN(FZ60DEA,3),8)),COLOR39FF00,LINETHICK2;
DRAWTEXTABS(585,125,STRRIGHT(' '+NUMTOSTRN(FZ30DEA,3),8)),COLORFF0033,LINETHICK2;
DRAWTEXTABS(585,145,STRRIGHT(' '+NUMTOSTRN(FZ15DEA,3),8)),COLORFFCC00,LINETHICK2;
DRAWTEXTABS(665,25,' MACD '),COLOR0066FF,LINETHICK2;
DRAWTEXTABS(655,45,STRRIGHT(' '+NUMTOSTRN(月MACD,3),8)),COLORFFFFFF,LINETHICK2;
DRAWTEXTABS(655,65,STRRIGHT(' '+NUMTOSTRN(周MACD,3),8)),COLOR00FFFF,LINETHICK2;
DRAWTEXTABS(655,85,STRRIGHT(' '+NUMTOSTRN(MACD,3),8)),COLORFF00FF,LINETHICK2;
DRAWTEXTABS(655,105,STRRIGHT(' '+NUMTOSTRN(FZ60MACD,3),8)),COLOR39FF00,LINETHICK2;
DRAWTEXTABS(655,125,STRRIGHT(' '+NUMTOSTRN(FZ30MACD,3),8)),COLORFF0033,LINETHICK2;
DRAWTEXTABS(655,145,STRRIGHT(' '+NUMTOSTRN(FZ15MACD,3),8)),COLORFFCC00,LINETHICK2;
月K:= "kdj.K#MONTH";
周K:= "kdJ.K#WEEK";
K:= "KDJ.K";
FZ60K:= "KDJ.K#MIN60";
FZ30K:= "KDJ.K#MIN30";
FZ15K:= "KDJ.K#MIN15";
月D:= "KDJ.D#MONTH";
周D:= "KDJ.D#WEEK";
D:= "KDJ.D";
FZ60D:= "KDJ.D#MIN60";
FZ30D:= "KDJ.D#MIN30";
FZ15D:= "KDJ.D#MIN15";
月J:= "KDJ.J#MONTH";
周J:= "KDJ.J#WEEK";
J:="KDJ.J";
FZ60J:= "KDJ.J#MIN60 ";
FZ30J:= "KDJ.J#MIN30";
FZ15J:= "KDJ.J#MIN15";
DRAWTEXTABS(730,25,' K'),COLOR0066FF,LINETHICK2;
DRAWTEXTABS(725,45,STRRIGHT(' '+NUMTOSTRN(月K,3),8)),COLORFFFFFF,LINETHICK2;
DRAWTEXTABS(725,65,STRRIGHT(' '+NUMTOSTRN(周K,3),8)),COLOR00FFFF,LINETHICK2;
DRAWTEXTABS(725,85,STRRIGHT(' '+NUMTOSTRN(K,3),8)),COLORFF00FF,LINETHICK2;
DRAWTEXTABS(725,105,STRRIGHT(' '+NUMTOSTRN(FZ60K,3),8)),COLOR39FF00,LINETHICK2;
DRAWTEXTABS(725,125,STRRIGHT(' '+NUMTOSTRN(FZ30K,3),8)),COLORFF0033,LINETHICK2;
DRAWTEXTABS(725,145,STRRIGHT(' '+NUMTOSTRN(FZ15K,3),8)),COLORFFCC00,LINETHICK2;
DRAWTEXTABS(800,25,' D '),COLOR0066FF,LINETHICK2;
DRAWTEXTABS(795,45,STRRIGHT(' '+NUMTOSTRN(月D,3),8)),COLORFFFFFF,LINETHICK2;
DRAWTEXTABS(795,65,STRRIGHT(' '+NUMTOSTRN(周D,3),8)),COLOR00FFFF,LINETHICK2;
DRAWTEXTABS(795,85,STRRIGHT(' '+NUMTOSTRN(D,3),8)),COLORFF00FF,LINETHICK2;
DRAWTEXTABS(795,105,STRRIGHT(' '+NUMTOSTRN(FZ60D,3),8)),COLOR39FF00,LINETHICK2;
DRAWTEXTABS(795,125,STRRIGHT(' '+NUMTOSTRN(FZ30D,3),8)),COLORFF0033,LINETHICK2;
DRAWTEXTABS(795,145,STRRIGHT(' '+NUMTOSTRN(FZ15D,3),8)),COLORFFCC00,LINETHICK2;
DRAWTEXTABS(870,25,' J '),COLOR0066FF,LINETHICK2;
DRAWTEXTABS(865,45,STRRIGHT(' '+NUMTOSTRN(月J,3),8)),COLORFFFFFF,LINETHICK2;
DRAWTEXTABS(865,65,STRRIGHT(' '+NUMTOSTRN(周J,3),8)),COLOR00FFFF,LINETHICK2;
DRAWTEXTABS(865,85,STRRIGHT(' '+NUMTOSTRN(J,3),8)),COLORFF00FF,LINETHICK2;
DRAWTEXTABS(865,105,STRRIGHT(' '+NUMTOSTRN(FZ60J,3),8)),COLOR39FF00,LINETHICK2;
DRAWTEXTABS(865,125,STRRIGHT(' '+NUMTOSTRN(FZ30J,3),8)),COLORFF0033,LINETHICK2;
DRAWTEXTABS(865,145,STRRIGHT(' '+NUMTOSTRN(FZ15J,3),8)),COLORFFCC00,LINETHICK2;