把“秘密买卖点”改写为选股公式
2019/12/7 18:54:34
公式编写说明:
这个指标是原来在论坛里看到的(谢谢原作者),源码如下:{N 1 10 7}顶:80,COLORGREEN; 底:20,COLORRED; 熊市顶:70;LC:=REF(CLOSE,1); 趋势:SMA(MAX(CLOSE-LC,0),N,1)/SMA(ABS(CLOSE-LC),N,1)*100,COLORYELLOW; 底1:IF(趋势<20,40,20),COLORRED; 卖出1:IF(趋势>80,60,80),COLORGREEN; 买1:STICKLINE(FILTER(REF(趋势,1)<20AND 趋势>REF(趋势,1),5),20,40,2,0),COLORRED; 趋势↓:STICKLINE(FILTER(REF(趋势,1)>80 AND 趋势<REF(趋势,1),5),60,80,2,0),COLORGREEN; DRAWTEXT(FILTER(REF(趋势,1)<20 AND 趋势>REF(趋势,1),5),40 ,'买入1' ),COLORRED; DRAWTEXT(FILTER(REF(趋势,1)>80 AND 趋势<REF(趋势,1),5),60 ,'卖出2' ),COLORGREEN;底3:IF(趋势<30,40,20),COLORCYAN;买2:STICKLINE(FILTER(REF(趋势,1)<30 AND 趋势>REF(趋势,1),5),20,40,2,0),COLORMAGENTA;DRAWTEXT(FILTER(REF(趋势,1)<30 AND 趋势>REF(趋势,1),5),40 ,'买入2' ),COLORMAGENTA;
公式源码回答:
N:=7;
LC:=REF(CLOSE,1);
趋势:=SMA(MAX(CLOSE-LC,0),N,1)/SMA(ABS(CLOSE-LC),N,1)*100,COLORYELLOW;
xg1:REF(趋势,1)<20 AND 趋势>REF(趋势,1);
N:=7;
LC:=REF(CLOSE,1);
趋势:=SMA(MAX(CLOSE-LC,0),N,1)/SMA(ABS(CLOSE-LC),N,1)*100,COLORYELLOW;
xg2:REF(趋势,1)<30 AND 趋势>REF(趋势,1);
投 股票网 www.to u18.cn
股市公式下载推荐