通达信的突破横盘,改成大智慧公式的源码
原通达信公式源码:
1. {突破横盘}
2. LC:=REF(C,1);
3. VVA:=IF(C>REF(C,1),V,-V);
4. OBV18:=SUM(IF(C=REF(C,1),0,VVA),18);
5. XXV:=IF(C>LC,SUM(V,18),0),COLOR0000CC;
6. YYV:=IF(C<LC,SUM(V,18),0),COLOR00CC00;
7. SS0:=IF(C>LC,HHV(REF(V,1),18),0);
8. SS1:=IF(C<LC,HHV(REF(V,1),18),0);
9. CCI:=((C-MA(C,14))/(0.015*AVEDEV(C,14)))/4+50,COLORFFCCCC;
10. RSI:SMA(MAX(C-LC,0),6,1)/SMA(ABS(C-LC),6,1)*150-30,COLORCC9900;
11. K9:=SMA((C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100,3,1),COLOR00CCCC;
12. D9:=SMA(K9,3,1),COLOR00CC00;
13. J:=3*K9-2*D9,COLORFF3399,LINETHICK1;
14. VAR01:=DYNAINFO(17)*REF(MA(V,5),1);
15. VAR02:=DYNAINFO(7)=C AND DYNAINFO(10)=AMOUNT;
16. 预V1:=IF(DYNAINFO(7)=C AND DYNAINFO(10)=AMOUNT,VAR01,VAR02);
17. 预量:=IF(V>=预V1,V,预V1);
18. VA:=IF(C>REF(C,1),预量,-预量);
19. 量比:预量/MA(REF(V,1),5),NODRAW,COLORFFCC00;
20. YY:=IF(C>LC AND C>O AND (HHV(REF(H,1),18)/LLV(REF(L,1),18))<1.1 AND SUM
21. (C>LC,18)>SUM(C<LC,18) AND OBV18>0 AND SS0>SS1 AND 量比>2 AND HHV
22. (CCI,10)<110 AND HHV(RSI,10)<100 AND HHV(J,10)<110,1,0);
23. 突破横盘:IF(FILTER(YY,5) AND YY=1,60,0),LINETHICK2,COLOR0000FF;
24. 突破:IF(C>LC AND C>O AND SUM(C>LC,18)>SUM(C<LC,18) AND OBV18>0 AND SS0>
25. SS1 AND MA(C,5)>MA(C,10) AND 量比>1.6 AND HHV(CCI,10)<100 AND HHV
26. (RSI,10)<100 AND HHV(J,10)<100,50,0),COLOR00AAAA;
27. 突破0:=IF(FILTER(突破=50,5) AND 突破=50,50,0);
28. 高:IF(LC=HHV(LC,10) AND REF(H,1)=HHV(REF(H,1),10) AND (CROSS(110,CCI) OR
29. CROSS(100,RSI) OR CROSS(110,J)),70,100),COLOR00FF00;
30. STICKLINE(突破0=50,58,55,14,0),COLOR00CCCC;
31. STICKLINE(突破0=50,57,56,12,0),COLOR009999;
32. STICKLINE(突破0=50,45,48,4,0),COLOR0077AA;
33. STICKLINE(突破0=50,54,50,10,0),COLOR0088DD;
34. STICKLINE(突破0=50,55,48,6,0),COLOR00AAFF;
35. STICKLINE(突破0=50,53,52,4,0),COLOR000000;
36. STICKLINE(突破0=50,53,50,1,0),COLOR0077EE;
37. STICKLINE(突破0=50,60,55,7,0),COLOR8800CC;
38. STICKLINE(突破0=50,60,63,4,0),COLOR7700AA;
39. IF(突破0=50,57,DRAWNULL),LINETHICK4,POINTDOT,COLOR00FF00;
40. STICKLINE(突破0=50,26,20,12,0),COLORFFFFFF;
41. STICKLINE(突破0=50,33,25,14,0),COLOR8800CC;
42. STICKLINE(突破0=50,46,32,16,0),COLORAA00DD;
43. STICKLINE(突破0=50,37,34,8,0),COLOR00AAFF;
44. STICKLINE(突破0=50,50,44,2,0),COLOR000000;
45. STICKLINE(突破0=50,49,49,1,0),COLOR0000EE;
46. DRAWICON(突破0=50,39,9);
改成大智慧公式的源码如下:
LC:=REF(C,1);
VVA:=IF(C>REF(C,1),V,-V);
OBV18:=SUM(IF(C=REF(C,1),0,VVA),18);
XXV:=IF(C>LC,SUM(V,18),0);
YYV:=IF(C<LC,SUM(V,18),0);
SS0:=IF(C>LC,HHV(REF(V,1),18),0);
SS1:=IF(C<LC,HHV(REF(V,1),18),0);
CCI:=((C-MA(C,14))/(0.015*AVEDEV(C,14)))/4+50;
RSI:SMA(MAX(C-LC,0),6,1)/SMA(ABS(C-LC),6,1)*150-30;
K9:=SMA((C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100,3,1);
D9:=SMA(K9,3,1);
J:=3*K9-2*D9;
VAR01:=DYNAINFO(17)*REF(MA(V,5),1);
VAR02:=DYNAINFO(7)=C AND DYNAINFO(10)=AMOUNT;
预V1:=IF(DYNAINFO(7)=C AND DYNAINFO(10)=AMOUNT,VAR01,VAR02);
预量:=IF(V>=预V1,V,预V1);
VA:=IF(C>REF(C,1),预量,-预量);
量比:预量/MA(REF(V,1),5),COLORFFCC00;
YY:=IF(C>LC AND C>O AND (HHV(REF(H,1),18)/LLV(REF(L,1),18))<1.1 AND SUM
(C>LC,18)>SUM(C<LC,18) AND OBV18>0 AND SS0>SS1 AND 量比>2 AND HHV
(CCI,10)<110 AND HHV(RSI,10)<100 AND HHV(J,10)<110,1,0);
突破横盘:IF(FILTER(YY,5) AND YY=1,60,0),LINETHICK2,COLOR0000FF;
突破:IF(C>LC AND C>O AND SUM(C>LC,18)>SUM(C<LC,18) AND OBV18>0 AND SS0>
SS1 AND MA(C,5)>MA(C,10) AND 量比>1.6 AND HHV(CCI,10)<100 AND HHV(RSI,10)<100 AND HHV(J,10)<100,50,0),COLOR00AAAA;
突破0:=IF(FILTER(突破=50,5) AND 突破=50,50,0);
高:IF(LC=HHV(LC,10) AND REF(H,1)=HHV(REF(H,1),10) AND (CROSS(110,CCI) OR
CROSS(100,RSI) OR CROSS(110,J)),70,100),COLOR00FF00;
STICKLINE(突破0=50,58,55,14,0),COLOR00CCCC;
STICKLINE(突破0=50,57,56,12,0),COLOR009999;
STICKLINE(突破0=50,45,48,4,0),COLOR0077AA;
STICKLINE(突破0=50,54,50,10,0),COLOR0088DD;
STICKLINE(突破0=50,55,48,6,0),COLOR00AAFF;
STICKLINE(突破0=50,53,52,4,0),COLOR000000;
STICKLINE(突破0=50,53,50,1,0),COLOR0077EE;
STICKLINE(突破0=50,60,55,7,0),COLOR8800CC;
STICKLINE(突破0=50,60,63,4,0),COLOR7700AA;
IF(突破0=50,57,0),LINETHICK4,POINTDOT,COLOR00FF00;
STICKLINE(突破0=50,26,20,12,0),COLORFFFFFF;
STICKLINE(突破0=50,33,25,14,0),COLOR8800CC;
STICKLINE(突破0=50,46,32,16,0),COLORAA00DD;
STICKLINE(突破0=50,37,34,8,0),COLOR00AAFF;
STICKLINE(突破0=50,50,44,2,0),COLOR000000;
STICKLINE(突破0=50,49,49,1,0),COLOR0000EE;
DRAWICON(突破0=50,39,9); |