编写要求:
www.gszx.com.cn网解答:
网友求助:
LC:=REF(CLOSE,1);
RS1:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100;
ATR:=MA(MAX(MAX((RS1-RS1),ABS(REF(RS1,1)-RS1)),ABS(REF(RS1,1)-RS1)),15);
VM:=MA(RS1,6);
VU:VM+2.3*ATR,PRECISION1,ColorFFFFFF,LINETHICK0;
VD:VM-2.1*ATR,PRECISION1,ColorFFFFFF,LINETHICK0;
SM:MA(RS1,20),PRECISION1,Color00FF00,LINETHICK0;
SU:SM+2*STD(RS1,20),PRECISION1,Coloraaee00,LINETHICK0;
SD:SM-2*STD(RS1,20),PRECISION1,Coloraaee00,LINETHICK0;
DRAWGBK(C>0,Colorrgb(0,150,180),Colorrgb(0,150,180),0);
FILLRGN(C>0,SU,SD),Colorbbcc00,PRECISION1;
FILLRGN(C>0,VU,VD),Colorffffff,PRECISION1;
MA1:VM,PRECISION1,Colorff0000;
MA2:MA(RS1,3),PRECISION1,Color007a00;
RSI:RS1,PRECISION1,Color0000ee,LINETHICK2;
麻烦老师帮忙用上面的公式写2个选股公式:
1,RSI值高于昨天的RSI值。
2,RSI值大于MA1值10以上。
解答如下:
LC:=REF(CLOSE,1);
RS1:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100;
ATR:=MA(MAX(MAX((RS1-RS1),ABS(REF(RS1,1)-RS1)),ABS(REF(RS1,1)-RS1)),15);
VM:=MA(RS1,6);
VU:VM+2.3*ATR,PRECISION1,ColorFFFFFF,LINETHICK0;
VD:VM-2.1*ATR,PRECISION1,ColorFFFFFF,LINETHICK0;
SM:MA(RS1,20),PRECISION1,Color00FF00,LINETHICK0;
SU:SM+2*STD(RS1,20),PRECISION1,Coloraaee00,LINETHICK0;
SD:SM-2*STD(RS1,20),PRECISION1,Coloraaee00,LINETHICK0;
DRAWGBK(C>0,Colorrgb(0,150,180),Colorrgb(0,150,180),0);
FILLRGN(C>0,SU,SD),Colorbbcc00,PRECISION1;
FILLRGN(C>0,VU,VD),Colorffffff,PRECISION1;
MA1:VM,PRECISION1,Colorff0000;
MA2:MA(RS1,3),PRECISION1,Color007a00;
RSI:RS1,PRECISION1,Color0000ee,LINETHICK2;
麻烦老师帮忙用上面的公式写2个选股公式:
1,RSI值高于昨天的RSI值。
2,RSI值大于MA1值10以上。