单阳不破指标倍量发出单阳不破信号
2020/2/16 18:53:16
公式编写说明:
要求如下图,就是在日线情况下当出现倍量并且涨幅大于6%时发出单阳不破信号,而当60分钟线时倍量并且涨幅大于3%时发出信号。十分感谢。短线:MA(C,5);中线:((MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4+EXPMA(CLOSE,10))/2;密码线:((EMA(C,6)+EMA(C,18)+EMA(C,54)+EMA(C,162))/4+EXPMA(CLOSE,24)+MA(C,25))/3; 神奇线:(MA(C,35)+EXPMA(CLOSE,50))/2;阳涨幅:=3.5;阳倍量:=1.9;单阳收:=C;单阳开:=O;单阳:=单阳收>=REF(C,1)*(1+阳涨幅/100)AND VOL>REF(VOL,1)*阳倍量;DRAWTEXT(CURRBARSCOUNT<100 AND 单阳,L*0.98,'阳'),COLOR00FFFF;高不破价:=REF(C,BARSLAST(单阳));低不破价:=REF(L,BARSLAST(单阳));单阳不破:=CURRBARSCOUNT<100 AND BARSLAST(单阳)<11 AND (LLV(L,BARSLAST(单阳))>低不破价 OR LLV(L,BARSLAST(单阳))=低不破价);STICKLINE(单阳不破,低不破价-低不破价*0.0005,低不破价,4,0),COLORGREEN;STICKLINE(单阳不破,高不破价,高不破价,4,0),COLORRED;STICKLINE(单阳,单阳开,单阳收,2,0),COLORYELLOW;DRAWTEXT(BARSLAST(单阳)=1 AND 单阳不破,低不破价*0.98,'1'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=2 AND 单阳不破,低不破价*0.98,'2'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=3 AND 单阳不破,低不破价*0.98,'3'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=4 AND 单阳不破,低不破价*0.98,'4'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=5 AND 单阳不破,低不破价*0.98,'5'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=6 AND 单阳不破,低不破价*0.98,'6'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=7 AND 单阳不破,低不破价*0.98,'7'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=8 AND 单阳不破,低不破价*0.98,'8'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=9 AND 单阳不破,低不破价*0.98,'9'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=10 AND 单阳不破,低不破价*0.98,'10'),COLORGREEN;
公式源码回答:
短线:MA(C,5);
中线:((MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4+EXPMA(CLOSE,10))/2;
密码线:((EMA(C,6)+EMA(C,18)+EMA(C,54)+EMA(C,162))/4+EXPMA(CLOSE,24)+MA(C,25))/3;
神奇线:(MA(C,35)+EXPMA(CLOSE,50))/2;
阳涨幅:=IF(PERIOD=5,6,3);
阳倍量:=1.9;
单阳收:=C;
单阳开:=O;
单阳:=单阳收>=REF(C,1)*(1+阳涨幅/100)AND VOL>REF(VOL,1)*阳倍量;
DRAWTEXT(CURRBARSCOUNT<100 AND 单阳,L*0.98,'阳'),COLOR00FFFF;
高不破价:=REF(C,BARSLAST(单阳));
低不破价:=REF(L,BARSLAST(单阳));
单阳不破:=CURRBARSCOUNT<100 AND BARSLAST(单阳)<11 AND (LLV(L,BARSLAST(单阳))>低不破价 OR LLV(L,BARSLAST(单阳))=低不破价);
STICKLINE(单阳不破,低不破价-低不破价*0.0005,低不破价,4,0),COLORGREEN;
STICKLINE(单阳不破,高不破价,高不破价,4,0),COLORRED;
STICKLINE(单阳,单阳开,单阳收,2,0),COLORYELLOW;
DRAWTEXT(BARSLAST(单阳)=1 AND 单阳不破,低不破价*0.98,'1'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=2 AND 单阳不破,低不破价*0.98,'2'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=3 AND 单阳不破,低不破价*0.98,'3'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=4 AND 单阳不破,低不破价*0.98,'4'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=5 AND 单阳不破,低不破价*0.98,'5'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=6 AND 单阳不破,低不破价*0.98,'6'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=7 AND 单阳不破,低不破价*0.98,'7'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=8 AND 单阳不破,低不破价*0.98,'8'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=9 AND 单阳不破,低不破价*0.98,'9'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=10 AND 单阳不破,低不破价*0.98,'10'),COLORGREEN;
投股票 网 w ww.tou18.cn
股市公式下载推荐