波段之星幅图指标 优化版
五里先生的波段之星幅图指标,非常感兴趣,可惜的是大智慧不能用,看到有些跟帖修改的大智慧可以用的源码,图面与原指标相差较大,于是我就开始自己动手在五里老师源码的基础上按照大智慧的绘图函数修改了。图面除了删除了不必要的一些曲线和图标(主要是是图面清洁美观)。保留了原生态的核心,在大智慧2里测试通过。但是在调试的时候发现一些问题,见附图。于是就进行了优化,对一些多余的或者可能误导我们的一些信号过滤掉,主要还是根据历史K线和幅图指标对照找气规律。现在提供给大智慧的朋友验证
源码
波段之星dzh1}
拉升力:=(CLOSE-LLV(LOW,28))/(HHV(HIGH,30)-LLV(LOW,36))*0.6*CLOSE;
拉升力A:=SMA(拉升力,6.3,1);
波峰波谷:SMA(拉升力A,3,1),COLOR00FFFF{COLORWHITE};
拉升力B:=3*拉升力A-2.1*波峰波谷;
空方:=3*波峰波谷-1* 拉升力A;
做空:=IF(空方>拉升力B,拉升力B,空方);
做空周期:HHV(做空,21),COLORBLUE;
PARTLINE(做空,做空>=REF(做空,1),RGB(255,0,0),做空<REF(做空,1),RGB(0,255,0),1,RGB(0,0,255)),linethick2;
{DRAWICON(做空>=REF(做空,1) AND REF(做空,1)<REF(做空,2),做空,23); 图标}
空头:=if(做空<REF(做空,1),做空,0);
短线:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*20;
中线:=(CLOSE-MA(CLOSE,4))/MA(CLOSE,4)*20;
红柱:=SMA(短线,3,1);
蓝柱:=SMA(中线,3,1);
{红柱}
STICKLINE(红柱<REF(红柱,1)AND 红柱>0,0,红柱,8,0),COLOR888800;
STICKLINE(红柱<REF(红柱,1)AND 红柱>0,0,红柱,6,0),COLORAAAA00;
STICKLINE(红柱<REF(红柱,1)AND 红柱>0,0,红柱,3.2,0),COLORDDDD00;
STICKLINE(红柱<REF(红柱,1)AND 红柱>0,0,红柱,1.2,0),COLORFFFF00;
STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,8,0),COLOR000088;
STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,6,0),COLOR0000AA;
STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,3.2,0),COLOR0000DD;
STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,1.2,0),COLOR0000FF;
STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,8,0),COLOR008800;
STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,4,0),COLOR00AA00;
STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,3.2,0),COLOR00DD00;
STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,1.2,0),COLOR00FF00;
{蓝柱}
STICKLINE(红柱>REF(红柱,1)AND 红柱<0,0,红柱,8,0),COLOR880088;
STICKLINE(红柱>REF(红柱,1)AND 红柱<0,0,红柱,6,0),COLORAA00AA;
STICKLINE(红柱>REF(红柱,1)AND 红柱<0,0,红柱,3.2,0),COLORDD00DD;
STICKLINE(红柱>REF(红柱,1)AND 红柱<0,0,红柱,1.2,0),COLORFF00FF;
STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,8,0),COLOR888800;
STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,6,0),COLORAAAA00;
STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,3.2,0),COLORDDDD00;
STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,1.2,0),COLORFFFF00;
STICKLINE(蓝柱>REF(蓝柱,1)AND 蓝柱<0,0,蓝柱,8,0),COLOR009999;
STICKLINE(蓝柱>REF(蓝柱,1)AND 蓝柱<0,0,蓝柱,6,0),COLOR00BBBB;
STICKLINE(蓝柱>REF(蓝柱,1)AND 蓝柱<0,0,蓝柱,3.2,0),COLOR00DDDD;
STICKLINE(蓝柱>REF(蓝柱,1)AND 蓝柱<0,0,蓝柱,1.2,0),COLOR00FFFF;
VAR200:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
VAR300:=SMA(SMA(VAR200,3,1),3,1)/28.57;
VAR400:=EMA(VAR300,5);
操盘:=3*VAR300-2*VAR400;
M2:=Ema(CLOSE,50);
TJ:=CROSS(做空,波峰波谷) OR CROSS(REF(做空,1),REF(波峰波谷,1));
A1:=CROSS(操盘,VAR300)
AND VAR300<2.1
AND C>O
and H>=M2
AND TJ
AND 做空>=REF(做空,1) AND 红柱>=0;
;
STICKLINE(A1,5,0,8,0),COLOR770077;
STICKLINE(A1,5,0,6,0),COLOR990099;
STICKLINE(A1,5,0,4,0),COLORBB00BB;
STICKLINE(A1,5,0,2,0),COLORDD00DD;
STICKLINE(A1,5,0,0.6,0),COLORFF00FF;
DRAWTEXT(A1,5.2,'全仓'),COLORWHITE;;
波段之星选股公式
拉升力:=(CLOSE-LLV(LOW,28))/(HHV(HIGH,30)-LLV(LOW,36))*0.6*CLOSE;
拉升力A:=SMA(拉升力,6.3,1);
波峰波谷:=SMA(拉升力A,3,1);
拉升力B:=3*拉升力A-2.1*波峰波谷;
空方:=3*波峰波谷-1* 拉升力A;
做空:=IF(空方>拉升力B,拉升力B,空方);
短线:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*20;
红柱:=SMA(短线,3,1);
VAR200:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
VAR300:=SMA(SMA(VAR200,3,1),3,1)/28.57;
VAR400:=EMA(VAR300,5);
操盘:=3*VAR300-2*VAR400;
M2:=Ema(CLOSE,50);
TJ:=CROSS(做空,波峰波谷) OR CROSS(REF(做空,1),REF(波峰波谷,1));
XG:CROSS(操盘,VAR300) AND VAR300<2.1 AND C>O and H>=M2 AND TJ AND 做空>=REF(做空,1) AND 红柱>=0;