九毛八公式指标
老师您好:如何把通达信公式改编为飞狐用.麻烦了,谢谢!! T:=(C+L+H)/3; SL:=((REF(T,1)*REF(V,1)+T*V)/(REF(V,1)+V)); VV:=SL; Y911:=IFF(CURRBARSCOUNT=1, (XMA(VV,9)*9-MA(VV,8)+MA(VV,7) -MA(VV,6)+MA(VV,5) -MA(VV,4)+MA(VV,3) -MA(VV,2) +VV)/9,XMA(VV,9)); Y912:=IFF(CURRBARSCOUNT=1, (XMA(Y911,9)*9-MA(Y911,8)+MA(Y911,7) -MA(Y911,6)+MA(Y911,5) -MA(Y911,4)+MA(Y911,3) -MA(Y911,2) +Y911)/9,XMA(Y911,9)); Y913:=IFF(CURRBARSCOUNT=1, (XMA(Y912,9)*9-MA(Y912,8)+MA(Y912,7) -MA(Y912,6)+MA(Y912,5) -MA(Y912,4)+MA(Y912,3) -MA(Y912,2) +Y912)/9,XMA(Y912,9)); 中期趋势:Y913,LINETHICK2,COLORGREEN; IF(Y913>REF(Y913,1),Y913,DRAWNULL),COLORMAGENTA,LINETHICK2;
公式模块:
INPUT:N(9,1,50);
T:=(C+L+H)/3; SL:=((REF(T,1)*REF(V,1)+T*V)/(REF(V,1)+V)); VV:=SL; P:=(DATacOUNT-BARPOS+1); XMAVV:=IF(P=1,REFX(MA(VV,N/2+1),N/2),IF(P=2 AND N>1, REFX(MA(VV,N/2+2),N/2),IF(P=3 AND N>4,REFX(MA(VV,N/2+3),N/2), IF(P=4 AND N>6,REFX(MA(VV,N/2+4),N/2),IF(P=5 AND N>8, REFX(MA(VV,N/2+5),N/2),IF(P=6 AND N>10,REFX(MA(VV,N/2+6),N/2), IF(P=7 AND N>12,REFX(MA(VV,N/2+7),N/2),IF(P=8 AND N>14,REFX(MA(VV,N/2+8),N/2),IF(P=9 AND N>16,REFX(MA(VV,N/2+9),N/2), IF(P=10 AND N>18,REFX(MA(VV,N/2+10),N/2),IF(P=11 AND N>20,REFX(MA(VV,N/2+11),N/2),IF(P=12 AND N>22,REFX(MA(VV,N/2+12), N/2),IF(P=13 AND N>24,REFX(MA(VV,N/2+13),N/2),IF(P=14 AND N>26,REFX(MA(VV,N/2+14),N/2),IF(P=15 AND N>28,REFX(MA(VV,N/2+15), N/2),IF(P=16 AND N>30,REFX(MA(VV,N/2+16),N/2),IF(P=17 AND N>32,REFX(MA(VV,N/2+17),N/2),IF(P=18 AND N>34,REFX(MA(VV,N/2+18), N/2),IF(P=19 AND N>36,REFX(MA(VV,N/2+19),N/2),IF(P=20 AND N>38,REFX(MA(VV,N/2+20),N/2),IF(P=21 AND N>40,REFX(MA(VV,N/2+21), N/2),IF(P=22 AND N>42,REFX(MA(VV,N/2+22),N/2),IF(P=23 AND N>44,REFX(MA(VV,N/2+23),N/2),IF(P=24 AND N>46,REFX(MA(VV,N/2+24), N/2),REFX(MA(VV,N),(N+1)/2-1))))))))))))))))))))))))); Y911:=IF(ISLASTBAR, (XMAVV*9-MA(VV,8)+MA(VV,7) -MA(VV,6)+MA(VV,5) -MA(VV,4)+MA(VV,3) -MA(VV,2) +VV)/9,XMAVV); XMAY911:=IF(P=1,REFX(MA(Y911,N/2+1),N/2),IF(P=2 AND N>1, REFX(MA(Y911,N/2+2),N/2),IF(P=3 AND N>4,REFX(MA(Y911,N/2+3),N/2), IF(P=4 AND N>6,REFX(MA(Y911,N/2+4),N/2),IF(P=5 AND N>8, REFX(MA(Y911,N/2+5),N/2),IF(P=6 AND N>10,REFX(MA(Y911,N/2+6),N/2), IF(P=7 AND N>12,REFX(MA(Y911,N/2+7),N/2),IF(P=8 AND N>14,REFX(MA(Y911,N/2+8),N/2),IF(P=9 AND N>16,REFX(MA(Y911,N/2+9),N/2), IF(P=10 AND N>18,REFX(MA(Y911,N/2+10),N/2),IF(P=11 AND N>20,REFX(MA(Y911,N/2+11),N/2),IF(P=12 AND N>22,REFX(MA(Y911,N/2+12), N/2),IF(P=13 AND N>24,REFX(MA(Y911,N/2+13),N/2),IF(P=14 AND N>26,REFX(MA(Y911,N/2+14),N/2),IF(P=15 AND N>28,REFX(MA(Y911,N/2+15), N/2),IF(P=16 AND N>30,REFX(MA(Y911,N/2+16),N/2),IF(P=17 AND N>32,REFX(MA(Y911,N/2+17),N/2),IF(P=18 AND N>34,REFX(MA(Y911,N/2+18), N/2),IF(P=19 AND N>36,REFX(MA(Y911,N/2+19),N/2),IF(P=20 AND N>38,REFX(MA(Y911,N/2+20),N/2),IF(P=21 AND N>40,REFX(MA(Y911,N/2+21), N/2),IF(P=22 AND N>42,REFX(MA(Y911,N/2+22),N/2),IF(P=23 AND N>44,REFX(MA(Y911,N/2+23),N/2),IF(P=24 AND N>46,REFX(MA(Y911,N/2+24), N/2),REFX(MA(Y911,N),(N+1)/2-1))))))))))))))))))))))))); Y912:=IF(ISLASTBAR, (XMAY911*9-MA(Y911,8)+MA(Y911,7) -MA(Y911,6)+MA(Y911,5) -MA(Y911,4)+MA(Y911,3) -MA(Y911,2) +Y911)/9,XMAY911); XMAY912:=IF(P=1,REFX(MA(Y912,N/2+1),N/2),IF(P=2 AND N>1, REFX(MA(Y912,N/2+2),N/2),IF(P=3 AND N>4,REFX(MA(Y912,N/2+3),N/2), IF(P=4 AND N>6,REFX(MA(Y912,N/2+4),N/2),IF(P=5 AND N>8, REFX(MA(Y912,N/2+5),N/2),IF(P=6 AND N>10,REFX(MA(Y912,N/2+6),N/2), IF(P=7 AND N>12,REFX(MA(Y912,N/2+7),N/2),IF(P=8 AND N>14,REFX(MA(Y912,N/2+8),N/2),IF(P=9 AND N>16,REFX(MA(Y912,N/2+9),N/2), IF(P=10 AND N>18,REFX(MA(Y912,N/2+10),N/2),IF(P=11 AND N>20,REFX(MA(Y912,N/2+11),N/2),IF(P=12 AND N>22,REFX(MA(Y912,N/2+12), N/2),IF(P=13 AND N>24,REFX(MA(Y912,N/2+13),N/2),IF(P=14 AND N>26,REFX(MA(Y912,N/2+14),N/2),IF(P=15 AND N>28,REFX(MA(Y912,N/2+15), N/2),IF(P=16 AND N>30,REFX(MA(Y912,N/2+16),N/2),IF(P=17 AND N>32,REFX(MA(Y912,N/2+17),N/2),IF(P=18 AND N>34,REFX(MA(Y912,N/2+18), N/2),IF(P=19 AND N>36,REFX(MA(Y912,N/2+19),N/2),IF(P=20 AND N>38,REFX(MA(Y912,N/2+20),N/2),IF(P=21 AND N>40,REFX(MA(Y912,N/2+21), N/2),IF(P=22 AND N>42,REFX(MA(Y912,N/2+22),N/2),IF(P=23 AND N>44,REFX(MA(Y912,N/2+23),N/2),IF(P=24 AND N>46,REFX(MA(Y912,N/2+24), N/2),REFX(MA(Y912,N),(N+1)/2-1))))))))))))))))))))))))); Y913:=IF(ISLASTBAR, (XMAY912*9-MA(Y912,8)+MA(Y912,7) -MA(Y912,6)+MA(Y912,5) -MA(Y912,4)+MA(Y912,3) -MA(Y912,2) +Y912)/9,XMAY912); 中期趋势:Y913,LINETHICK2,COLORGREEN; PARTLINE(Y913>REF(Y913,1),Y913),COLORMAGENTA,LINETHICK2;