涨跌停板代码使用长时间包满意通达信主图 源码 图
FUDU:=IF(INBLOCK('科创板') OR INBLOCK('创业板'),0.2,IF(INBLOCK('ST板块'),0.05,0.1));
ZHANGTING:=REF(CLOSE,1)*(1+FUDU);
DIETING:=REF(CLOSE,1)*(1-FUDU);
涨停:=IF(FRACPART(ZHANGTING*100)>=0.45,(INTPART(ZHANGTING*100)+1)/100,INTPART(ZHANGTING*100)/100);
跌停:=IF(FRACPART(DIETING*100)>=0.45,(INTPART(DIETING*100)+1)/100,INTPART(DIETING*100)/100);
ZHANGTING1:=REF(CLOSE,1)*1.1;
DIETING1:=REF(CLOSE,1)*0.9;
涨停1:=IF(FRACPART(ZHANGTING1*100)>=0.45,(INTPART(ZHANGTING1*100)+1)/100,INTPART(ZHANGTING1*100)/100);
跌停1:=IF(FRACPART(DIETING1*100)>=0.45,(INTPART(DIETING1*100)+1)/100,INTPART(DIETING1*100)/100);
STICKLINE(ISLASTBAR,CLOSE,IF(CLOSE>OPEN,涨停,跌停),2.5,-1),COLORYELLOW;
DRAWNUMBER(ISLASTBAR AND CLOSE>OPEN,涨停,涨停),COLOR808080,DRAWABOVE;
DRAWNUMBER(ISLASTBAR AND CLOSE<OPEN,跌停,跌停),COLOR808080;
{第4部分(二) :涨跌停颜色 股票指标网70822点com}
STICKLINE(PERIOD=5 AND CLOSE>=涨停,CLOSE,OPEN,3.1,0),COLORYELLOW;
STICKLINE(PERIOD=5 AND CLOSE>=涨停,CLOSE,OPEN,1.5,0),COLORRED;
STICKLINE(PERIOD=5 AND CLOSE<=跌停,CLOSE,OPEN,3.1,0),COLORFFFF00;
STICKLINE(PERIOD=5 AND CLOSE<=跌停,CLOSE,OPEN,1.5,0),COLORFF0000;
STICKLINE(PERIOD=5 AND CLOSE>=涨停1 AND INBLOCK('创业板') AND DATE<1200823,CLOSE,OPEN,3.1,0),COLORYELLOW;
STICKLINE(PERIOD=5 AND CLOSE>=涨停1 AND INBLOCK('创业板') AND DATE<1200823,CLOSE,OPEN,1.5,0),COLORRED;
STICKLINE(PERIOD=5 AND CLOSE<=跌停1 AND INBLOCK('创业板') AND DATE<1200823,CLOSE,OPEN,3.1,0),COLORYELLOW;
STICKLINE(PERIOD=5 AND CLOSE<=跌停1 AND INBLOCK('创业板') AND DATE<1200823,CLOSE,OPEN,1.2,0),COLOR00FF00;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
FUDU赋值:IF(INBLOCK('科创板') OR INBLOCK('创业板'),0.2,IF(INBLOCK('ST板块'),0.05,0.1))
ZHANGTING赋值:1日前的收盘价*(1+FUDU)
DIETING赋值:1日前的收盘价*(1-FUDU)
涨停赋值:IF(FRACPART(ZHANGTING*100)>=0.45,(INTPART(ZHANGTING*100)+1)/100,INTPART(ZHANGTING*100)/100)
跌停赋值:IF(FRACPART(DIETING*100)>=0.45,(INTPART(DIETING*100)+1)/100,INTPART(DIETING*100)/100)
ZHANGTING1:=1日前的收盘价*1.1
DIETING1:=1日前的收盘价*0.9
涨停1:=IF(FRACPART(ZHANGTING1*100)>=0.45,(INTPART(ZHANGTING1*100)+1)/100,INTPART(ZHANGTING1*100)/100)
跌停1:=IF(FRACPART(DIETING1*100)>=0.45,(INTPART(DIETING1*100)+1)/100,INTPART(DIETING1*100)/100)
如果收盘价>开盘价返回涨停否则返回跌停
DRAWNUMBER(ISLASTBAR AND 收盘价>开盘价,涨停,涨停),COLOR808080,DRAWABOVE
DRAWNUMBER(ISLASTBAR AND 收盘价<开盘价,跌停,跌停),COLOR808080
当满足条件PERIOD=5 AND 收盘价>=涨停时,在收盘价和开盘价之间画柱状线
当满足条件PERIOD=5 AND 收盘价>=涨停时,在收盘价和开盘价之间画柱状线
当满足条件PERIOD=5 AND 收盘价<=跌停时,在收盘价和开盘价之间画柱状线
当满足条件PERIOD=5 AND 收盘价<=跌停时,在收盘价和开盘价之间画柱状线
STICKLINE(PERIOD=5 AND 收盘价>=涨停1 AND INBLOCK('创业板') AND DATE<1200823,收盘价,开盘价,3.1,0),画黄色
STICKLINE(PERIOD=5 AND 收盘价>=涨停1 AND INBLOCK('创业板') AND DATE<1200823,收盘价,开盘价,1.5,0),画红色
STICKLINE(PERIOD=5 AND 收盘价<=跌停1 AND INBLOCK('创业板') AND DATE<1200823,收盘价,开盘价,3.1,0),画黄色
STICKLINE(PERIOD=5 AND 收盘价<=跌停1 AND INBLOCK('创业板') AND DATE<1200823,收盘价,开盘价,1.2,0),COLOR00FF00