通达信K线倒计时主图指标 分钟周期下次K线出现倒计时提示 源码附图
DRAWTEXT_FIX(1,0.745,0.02,1,'年'),COLORRED;
DRAWTEXT_FIX(1,0.78,0.02,1,'月'),COLORRED;
DRAWTEXT_FIX(1,0.815,0.02,1,'日'),COLORRED;
DRAWTEXT_FIX(1,0.845,0.02,1,'星期'),COLORRED;
DRAWTEXT_FIX(1,0.92,0.02,1,'时'),COLORRED;
DRAWTEXT_FIX(1,0.95,0.02,1,'分'),COLORRED;
DRAWTEXT_FIX(1,0.98,0.02,1,'秒'),COLORRED;
时:=INTPART(MACHINETIME/10000);
分:=FRACPART(INTPART(MACHINETIME/100)/100)*100;
秒:=INTPART(FRACPART(MACHINETIME/100)*100);
类:PERIOD,NODRAW;
DRAWTEXT_FIX(RANGE(PERIOD,-1,5) OR PERIOD=14,0.95,1,1,'距离下K还有:'),COLORRED;
DRAWTEXT_FIX(PERIOD=0,0.985,1,1,'秒'),COLORRED;
DRAWTEXT_FIX(RANGE(PERIOD,0.99,5) OR PERIOD=14,0.985,1,1,'分'),COLORRED;
DRAWNUMBER_FIX(PERIOD=0,0.96,1,0,60-秒);
DRAWNUMBER_FIX(PERIOD=1,0.96,1,0,IF(MOD((60-分),5)=0,5,MOD((60-分),5)));
DRAWNUMBER_FIX(PERIOD=2,0.96,1,0,IF(MOD((60-分),15)=0,15,MOD((60-分),15)));
DRAWNUMBER_FIX(PERIOD=3,0.96,1,0,IF(MOD((60-分),30)=0,30,MOD((60-分),30)));
DRAWNUMBER_FIX(PERIOD=4,0.96,1,0,IF(MOD((60-分),60)=0,60,MOD((60-分),60)));
DRAWNUMBER_FIX(PERIOD=14,0.955,1,0,IF(MOD((60-分),120)=0,120,120-MOD((60-分),120)));
DRAWNUMBER_FIX(1,0.70,0.02,0,YEAR);
DRAWNUMBER_FIX(1,0.75,0.02,0,MONTH);
DRAWNUMBER_FIX(1,0.785,0.02,0,DAY);
DRAWNUMBER_FIX(1,0.85,0.02,0,WEEKDAY);
DRAWNUMBER_FIX(1,0.89,0.02,0,时);
DRAWNUMBER_FIX(1,0.925,0.02,0,分);
DRAWNUMBER_FIX(1,0.955,0.02,0,秒);
时间:MACHINETIME,NODRAW;
M5:MA(C,5),COLORWHITE;
M10:MA(C,10),COLORYELLOW;
M20:MA(C,20),COLORMAGENTA;
M40:MA(C,40),COLORLIRED;
M60:MA(C,60),COLORGREEN;
{本文为理想论坛博主「阿D1688」的帖子,转载请注明出处。
原文链接: HTTPS://WWW.55188.COM/THREAD-15878260-1-1.HTML};
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
当满足条件1时,在横轴0.745纵轴0.02位置书写文字
当满足条件1时,在横轴0.78纵轴0.02位置书写文字
当满足条件1时,在横轴0.815纵轴0.02位置书写文字
当满足条件1时,在横轴0.845纵轴0.02位置书写文字
当满足条件1时,在横轴0.92纵轴0.02位置书写文字
当满足条件1时,在横轴0.95纵轴0.02位置书写文字
当满足条件1时,在横轴0.98纵轴0.02位置书写文字
时赋值:INTPART(MACHINETIME/10000)
分赋值:FRACPART(INTPART(MACHINETIME/100)/100)*100
秒赋值:INTPART(FRACPART(MACHINETIME/100)*100)
输出类:PERIOD,NODRAW
输出DRAWTEXT_FIX(RANGE(PERIOD,-1,5) OR PERIOD=14,0.95,1,1,'距离下K还有:'),画红色
当满足条件PERIOD=0时,在横轴0.985纵轴1位置书写文字
DRAWTEXT_FIX(RANGE(PERIOD,0.99,5) OR PERIOD=14,0.985,1,1,'分'),画红色
当满足条件PERIOD=0时,在横轴0.96纵轴1位置书写数字
DRAWNUMBER_FIX(PERIOD=1,0.96,1,0,IF(MOD((60-分),5)=0,5,MOD((60-分),5)))
DRAWNUMBER_FIX(PERIOD=2,0.96,1,0,IF(MOD((60-分),15)=0,15,MOD((60-分),15)))
DRAWNUMBER_FIX(PERIOD=3,0.96,1,0,IF(MOD((60-分),30)=0,30,MOD((60-分),30)))
DRAWNUMBER_FIX(PERIOD=4,0.96,1,0,IF(MOD((60-分),60)=0,60,MOD((60-分),60)))
DRAWNUMBER_FIX(PERIOD=14,0.955,1,0,IF(MOD((60-分),120)=0,120,120-MOD((60-分),120)))
当满足条件1时,在横轴0.70纵轴0.02位置书写数字
当满足条件1时,在横轴0.75纵轴0.02位置书写数字
当满足条件1时,在横轴0.785纵轴0.02位置书写数字
当满足条件1时,在横轴0.85纵轴0.02位置书写数字
当满足条件1时,在横轴0.89纵轴0.02位置书写数字
当满足条件1时,在横轴0.925纵轴0.02位置书写数字
当满足条件1时,在横轴0.955纵轴0.02位置书写数字
时间:MACHINETIME,NODRAW
输出M5:C的5日简单移动平均,画白色
输出M10:C的10日简单移动平均,画黄色
输出M20:C的20日简单移动平均,画洋红色
输出M40:C的40日简单移动平均,COLORLIRED
输出M60:C的60日简单移动平均,画绿色
{本文为理想论坛博主「阿D1688」的帖子,转载请注明出处。原文链接: HTTPS://WWW.55188.COM/THREAD-15878260-1-1.HTML}