想知道将来是涨 是跌 就用价格差和价格重心来判断涨跌 【A】价格差:XJ:(2*C+H+L)/4+(2*C-H-L);就是是收盘价与最高最低价的比较. 【B】价格重心;重心:AMOUNT/vol/100;是成交量与成交金额的比较. 我们认为只有今天【A】和【B】的数据两个方面同时大于昨天才有上涨的可能,反之就会下跌,依据这个原理编辑公式如下 【DRAWGBK(XJ>=ref(XJ,1) AND 重心>REF(重心,1),STRIP(RGB(0,0,255),RGB(120,0,120),0))】; 这就是涨跌波段的公式源码,其中参数【K】要根据股性及时改变的以适合构成波段要求. 【请注意】这个公式在横盘阶段不好用 源码 {重心价差} INPUT:K(10,0,500); DRAWGBKlast(c>0,strip(RGB(60,60,60),RGB(0,0,80),0)); DRAWTEXTABS(5,2,'■价格差【FORCAST((2*C+H+L)/4+(2*C-H-L),K)】的参数【K='+K+'】'),COLOR0066FF,LINETHICK2,LAYER0; DRAWTEXTABS(5,22,'■价格重心【FORCAST(AMOUNT/VOL/100,K)】的参数【K='+K+'】'),COLOR00FFFF,LINETHICK2,LAYER0; C,DOTLINE,Color00FFFF; XJ:FORCAST(EMA((2*C+H+L)/4+(2*C-H-L),2),K); partline(XJ,XJ>=ref(XJ,1),rgb(255,80,0),XJLLX:=LLV(XJ,2); WINN:=(XJ-REF(XJ,1));; STICKLINE(WINN>=0,XJ,XJ+WINN,6,0),Color000088; STICKLINE(WINN>=0,XJ,XJ+WINN,4,0),Color0000AA; STICKLINE(WINN>=0,XJ,XJ+WINN,2,0),Color0000DD; STICKLINE(WINN>=0,XJ,XJ+WINN,1,0),Color0000FF; STICKLINE(WINN<0,XJ,XJ+WINN,6,0),Color008800; STICKLINE(WINN<0,XJ,XJ+WINN,4,0),Color00AA00; STICKLINE(WINN<0,XJ,XJ+WINN,2,0),Color00DD00; STICKLINE(WINN<0,XJ,XJ+WINN,1,0),Color00FF00; 重心:FORCAST(EMA(AMOUNT/vol/100,2),K),LINETHICK0; PARTLINE(重心,(重心>REF(重心,1))-1,rgb(0,120,255),1,rgb(255,155,0) ),POINTDOT,LINETHICK7,LAYER0; PARTLINE(重心,(重心>REF(重心,1))-1,rgb(0,120,255),1,rgb(255,155,0) ),DOTLINE,LAYER0; DRAWGBK(XJ>=ref(XJ,1) AND 重心>REF(重心,1),STRIP(RGB(0,0,255),RGB(120,0,120),0)),LAYER3;{------};
|