网友求助:
请老师帮忙写一个多空比里的买入点选股公式。
Var2:=(3*CLOSE+LOW+OPEN+HIGH)/6;
Var3:=(20*Var2+19*REF(Var2,1)+18*REF(Var2,2)+17*REF(Var2,3)+16*REF(Var2,4)+15*REF(Var2,5)+14*REF(Var2,6)+13*REF(Var2,7)+12*REF(Var2,8)+11*REF(Var2,9)+10*REF(Var2,10)+9*REF(Var2,11)+8*REF(Var2,12)+7*REF(Var2,13)+6*REF(Var2,14)+5*REF(Var2,15)+4*REF(Var2,16)+3*REF(Var2,17)+2*REF(Var2,18)+REF(Var2,20))/210;
Var4:=MA(Var3,13);
Var5:=EMA(MA(CLOSE,3),34);
Var6:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
Var7:=MA(Var6,5);
Var8:=MA(Var6,10);
〖空头市场〗: STICKLINE(IF(Var3<Var5,Var3<=1.015*Var4,Var3<=1.005*Var4),Var3,Var4,10,1),COLOR006600 ;
〖多头市场〗: STICKLINE(Var3>1.005*Var4,Var3,Var4,10,1), COLOR003366;
『脑电波上升』: DRAWTEXT(FILTER(MA(Var6,10)<Var7,1),Var8,'↑') , COLORRED;
『脑电波下跌』: DRAWTEXT(FILTER(MA(Var6,10)>=Var6,1),Var8,'↓') , COLORGREEN;
『多空安全线』: Var5, COLORWHITE;
〖关注点〗: STICKLINE(COUNT(Var3>1.005*Var4 AND Var3<=REF(Var3,1),2)=2 OR COUNT(IF(Var3<Var5,Var3<=1.015*Var4,Var3<=1.005*Var4) AND Var3>=REF(Var3,1),2)=2,Var3,Var4,10,0) , COLORYELLOW;
★买入点: DRAWTEXT(REF(CROSS(Var3,Var4),2) AND Var3>1.005*Var4,Var4,'★买入点'),COLOR999966 ;
『多空争夺点』: DRAWTEXT(CROSS(Var6,Var7) AND Var7<Var8,Var3*0.99,'▲') , COLORBLUE;
DRAWTEXT(CROSS(Var7,Var6) AND Var7>Var8,Var3*1.01,'▼'), COLORBLUE;
Var9:=1/WINNER(CLOSE);
VarA:=MA(CLOSE,13);
VarB:=100-ABS((CLOSE-VarA)/VarA*100);
VarC:=LLV(LOW,75);
VarD:=HHV(HIGH,75);
VarE:=(VarD-VarC)/100;
VarF:=SMA((CLOSE-VarC)/VarE,20,1);
Var10:=SMA((OPEN-VarC)/VarE,20,1);
Var11:=3*VarF-2*SMA(VarF,15,1);
Var12:=3*Var10-2*SMA(Var10,15,1);
Var13:=100-Var12;
Var14:=100-Var11;
Var15:=MA(WINNER(CLOSE*0.95)*100,3);
Var16:=100-IF(Var9>5,IF(Var9<100,Var9,VarB-10),0);
Var17:=Var15>VarB;
Var18:=REF(LOW,1)*0.9;
Var19:=LOW*0.9;
Var1A:=(Var19*VOL+Var18*(CAPITAL-VOL))/CAPITAL;
Var1B:=EMA(Var1A,30);
Var1C:=CLOSE-REF(CLOSE,1);
Var1D:=MAX(Var1C,0);
Var1E:=ABS(Var1C);
Var1F:=SMA(Var1D,7,1)/SMA(Var1E,7,1)*100;
Var20:=SMA(Var1D,13,1)/SMA(Var1E,13,1)*100;
Var21:=BARSCOUNT(CLOSE);
Var22:=SMA(MAX(Var1C,0),6,1)/SMA(ABS(Var1C),6,1)*100;
Var23:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100;
Var24:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
Var25:=SMA((SMA(Var24,4,1)-50)*2,3,1);
Var26:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100;
Var27:=SMA(Var26,4,1);
Var28:=SMA(Var27,3,1);
Var29:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;
Var2A:=Var22<=25 AND Var23<-95 AND Var29>20 AND Var25<-30 AND Var28<30 AND Var1B-CLOSE>=-0.25 AND Var1F<22 AND Var20<28 AND Var21>50;
解答如下:
Var2:=(3*CLOSE+LOW+OPEN+HIGH)/6;
Var3:=(20*Var2+19*REF(Var2,1)+18*REF(Var2,2)+17*REF(Var2,3)+16*REF(Var2,4)+15*REF(Var2,5)+14*REF(Var2,6)+13*REF(Var2,7)+12*REF(Var2,8)+11*REF(Var2,9)+10*REF(Var2,10)+9*REF(Var2,11)+8*REF(Var2,12)+7*REF(Var2,13)+6*REF(Var2,14)+5*REF(Var2,15)+4*REF(Var2,16)+3*REF(Var2,17)+2*REF(Var2,18)+REF(Var2,20))/210;
Var4:=MA(Var3,13);
买入点: REF(CROSS(Var3,Var4),2) AND Var3>1.005*Var4 ;