编写要求:
公式指标网解答:
网友求助:
这是 选股公式
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=MA(RSV,3);
D:=MA(K,3);
xg1:=cross(k,d);
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
XG2:=MACD>REF(MACD,1) AND REF(MACD,1)<REF(MACD,2) AND REF(MACD,1)>0;
短期:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5));
中期:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10));
中长期:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20));
长期:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30));
A1:=H-L;
B1:=C-O;
C1:=(B1/A1);
DX:=V*C1/10000;
DX1:=EMA(EMA(DX,20),3);
DX2:=MA(DX1,5);
xg1 and xg2 and 短期>ref(短期,1) and 中期>ref(中期,1) and 中长期>ref(中长期,1) and 长期>ref(长期,1) and cross(dx1,dx2);
这是量力而为公式
A1:=H-L;
B1:=C-O;
C1:=(B1/A1);
DX:=V*C1/10000;
DX1:EMA(EMA(DX,20),3)*20,COLORYELLOW;
DX2:MA(DX1,5),COLORFF00FF;
DX3:MA(DX1,10),COLORCYAN;
STICKLINE(DX>0,0,DX,2,0),COLORRED;
STICKLINE(DX<0,0,DX,2,0),COLORGREEN;
这是多空对比公式
短期:100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5)),COLORWHITE;
中期:100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10)),COLORYELLOW;
中长期:100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20)),COLORMAGENTA;
长期:100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30)),COLORRED,LINETHICK2;
20,POINTDOT;
50,POINTDOT;
80,POINTDOT;