价格笼子警示源码随板块、新股、涨跌停价调整
STB:=IF(INBLOCK('ST板块'),1,0);
TSB:=IF(INBLOCK('ST板块') AND CODELIKE('30') AND DATE>1200823,1,0);{2020月8月24日创业板ST开始20%涨跌幅}
BK:=IF(CODELIKE('68'),0.2,IF(CODELIKE('30') AND DATE>1200823,0.2 ,IF(CODELIKE('43') OR CODELIKE('83') OR CODELIKE('47'),0.3, IF(TSB,0.2,IF(STB,0.05,0.1)))));
ZTJ:=ZTPRICE(DYNAINFO(3),BK);
DTJ:=DTPRICE(DYNAINFO(3),BK);
上:=IF( FINANCE(42) >5,IF(DYNAINFO(7)*1.02<ZTJ,DYNAINFO(7)*1.02-0.01,ZTJ),DYNAINFO(7)*1.02-0.01);
下:=IF( FINANCE(42) >5,IF(DYNAINFO(7)*0.98>DTJ,DYNAINFO(7)*0.98+0.01,DTJ),DYNAINFO(7)*0.98+0.01);
DRAWTEXT_FIX(1,0.93,0.053,0,STRCAT('上: ',VAR2STR(上,2)))COLORGREEN;
DRAWTEXT_FIX(1,0.93,0.093,0,STRCAT('下: ',VAR2STR(下,2)))COLORRED;
未来函数检测结果如下:
该公式包含未来函数:DYNAINFO
该公式包含未来函数:FINANCE
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
STB赋值:IF(INBLOCK('ST板块'),1,0)
TSB赋值:IF(INBLOCK('ST板块') AND CODELIKE('30') AND DATE>1200823,1,0)
{2020月8月24日创业板ST开始20%涨跌幅}
BK赋值:IF(CODELIKE('68'),0.2,IF(CODELIKE('30') AND DATE>1200823,0.2 ,IF(CODELIKE('43') OR CODELIKE('83') OR CODELIKE('47'),0.3, IF(TSB,0.2,IF(STB,0.05,0.1)))))
ZTJ赋值:ZTPRICE(DYNAINFO(3),BK)
DTJ赋值:DTPRICE(DYNAINFO(3),BK)
上赋值:IF( FINANCE(42) >5,IF(现价*1.02
下赋值:IF( FINANCE(42) >5,IF(现价*0.98>DTJ,现价*0.98+0.01,DTJ),现价*0.98+0.01)
DRAWTEXT_FIX(1,0.93,0.053,0,STRCAT('输出上: ',VAR2STR(上,2)))画绿色
DRAWTEXT_FIX(1,0.93,0.093,0,STRCAT('输出下: ',VAR2STR(下,2)))画红色