乾坤六道插上猎杀涨停板的利刃 乾坤趋势、乾坤狂飙指标套装 源码附图
{乾坤趋势副图源码如下}
DRAWGBK(C>0, RGB(180,170,170),RGB(183,164,165),0,'11',0);关注:20,POINTDOT;
警戒:80,POINTDOT;
VAR1:=LLV(LOW,10);
VAR2:=HHV(HIGH,25);
趋势:= EMA((CLOSE-VAR1)/(VAR2-VAR1)*110,10),COLORFF00FF,LINETHICK5;
IF(趋势>=REF(趋势,1),趋势,DRAWNULL),COLORFF00FF,LINETHICK2;
IF(趋势< REF(趋势,1),趋势,DRAWNULL),COLOR00FFFF,LINETHICK2;
STICKLINE(趋势>=REF(趋势,1) ,趋势 ,REF(趋势,1),3 ,1),COLORRED,LINETHICK3;
STICKLINE(趋势< REF(趋势,1) ,趋势 ,REF(趋势,1),3 ,1),COLOR00FF00,LINETHICK3;
IF(趋势>=REF(趋势,1),0,13),COLORFF00FF,LINETHICK2;
DRAWICON(趋势>=REF(趋势,1),8,1);
DRAWICON(趋势< REF(趋势,1),2,2);
VOLUME:=VOL,VOLSTICK;
MAVOL1:=MA(VOLUME,5);
MAVOL2:=MA(VOLUME,10);
STICKLINE(MAVOL1>=MAVOL2,122,116,3,0),COLORFF00FF;
STICKLINE (MAVOL1<MAVOL2,122,116,3,0),COLOR00FFFF;
成交量叉:MAVOL1>MAVOL2,POINTDOT;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2,COLORSTICK;
STICKLINE (DIF>=DEA,114,108,3,0),COLORFF00FF;
STICKLINE (DIF<DEA,114,108,3,0),COLOR00FFFF;
MACD叉:DIF>DEA,POINTDOT;{}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
STICKLINE (K>=D,106,100,3,0),COLORFF00FF;
STICKLINE (K<D,106,100,3,0),COLOR00FFFF;
KDJ叉:K>D POINTDOT;
DRAWTEXT(CURRBARSCOUNT=3,119,'VOL'),COLORFF0000;
DRAWTEXT(CURRBARSCOUNT=3,111,'MACD'),COLORFF0000;
DRAWTEXT(CURRBARSCOUNT=3,103,'KDJ'),COLORFF0000;
{乾坤狂飙副图源码如下}
DRAWGBK(C>0, RGB(180,170,170),RGB(183,164,165),0,'11',0);LC:=REF(CLOSE,1);XB_1:=IF(DATE<=1211231,1,1);
XB_2:=EMA(CLOSE,3);
XB_3:=EMA(CLOSE,20);
XB_4:=EMA(CLOSE,60);
XB_5:=ATAN((XB_4-REF(XB_4,1))/XB_4*10)/3.142*180;
XB_6:=EMA(CLOSE,120);
XB_7:=EMA(CLOSE,250);
XB_8:=REF(LOW,1);
XB_9:=SMA(ABS(LOW-XB_8),3,1)/SMA(MAX(LOW-XB_8,0),3,1)*100;
XB_10:=EMA(XB_9*10,3);
XB_11:=LLV(LOW,13);
XB_12:=HHV(XB_10,13);
XB_13:=EMA(IF(LOW<=XB_11,(XB_10+XB_12*2)/2,0),3)/618;
XB_14:=IF(XB_13>500,500,XB_13);
XB_15:=XB_1 AND CLOSE>XB_4 AND XB_4>XB_6 AND XB_6>XB_7;
XB_16:=XB_1 AND XB_15 AND KDJ.J>REF(KDJ.J,1) AND REF(KDJ.J,1)<REF(KDJ.J,2) AND ABS(LOW-XB_4)/XB_4<0.08 AND CLOSE>REF(CLOSE,1);
XB_17:=1;{}
(-0.5),DOTLINE,COLORBLACK;
STICKLINE(CLOSE>MA(CLOSE,60),0,0.2,1,0),COLORRED;
STICKLINE(CLOSE>MA(CLOSE,20),0.2,0.4,1,0),COLORGREEN;
STICKLINE(XB_5>0,0.4,0.6,1,0),COLORMAGENTA;
STICKLINE(XB_16,0.6,0.8,1,0),COLORBLUE;
STICKLINE(XB_14>1,0.8,1,1,0),COLORYELLOW;
DRAWICON(XB_1 AND XB_15 AND CLOSE>MA(CLOSE,20) AND XB_14>1 AND KDJ.J>REF(KDJ.J,1) AND REF(KDJ.J,1)<REF(KDJ.J,2) AND ABS(LOW-XB_4)/XB_4<0.08
AND XB_5>0 AND CLOSE>REF(CLOSE,1),(-0.1),5) AND XB_17;
{乾坤牛场副图源码如下}
DRAWGBK(C>0, RGB(180,170,170),RGB(183,164,165),0,'11',0);LC:=REF(CLOSE,1);牛短:SMA(WINNER(CLOSE*0.9),2.5,1)*46,COLORRED,LINETHICK2;
牛长:SMA(WINNER(CLOSE*0.95),5,1)*30,COLORYELLOW,LINETHICK2;
IF(牛短>牛长 AND 牛长>REF(牛长,1),牛短,DRAWNULL),COLORRED,LINETHICK3;
IF(牛长<REF(牛长,1) OR 牛短<牛长,牛短,DRAWNULL),COLORGREEN,LINETHICK2;
IF(牛长<REF(牛长,1),牛长,DRAWNULL),COLORLIBLUE,LINETHICK2;
牛线:6,DOTLINE,LINETHICK1,COLORWHITE;
DRAWICON(CROSS(牛短,牛长),牛线+0.5,1);
{乾坤六道主图源码如下}
DRAWGBK(C>0, RGB(180,170,170),RGB(183,164,165),0,'11',0);LC:=REF(CLOSE,1);
RSI5:=((SMA(MAX((CLOSE - LC),0),5,1) / SMA(ABS((CLOSE - LC)),5,1)) * 100);
TR1:=SUM(MAX(MAX((HIGH - LOW),ABS((HIGH - REF(CLOSE,1)))),ABS((LOW - REF(CLOSE,1)))),10);
HA:=(HIGH - REF(HIGH,1));
LA:=(REF(LOW,1) - LOW);
DMP:=SUM(IF(((HA > 0) AND (HA > LA)),HA,0),10);
DMM:=SUM(IF(((LA > 0) AND (LA > HA)),LA,0),10);
PDI:=((DMP * 100) / TR1);
MDI:=((DMM * 100) / TR1);
ADX:=MA(((ABS((MDI - PDI)) / (MDI + PDI)) * 100),5);
AV:=(RSI5 + ADX);
DXR:=(((ADX + REF(ADX,5)) / 2) + RSI5);
WR10:=((100 * (HHV(HIGH,10) - CLOSE)) / (HHV(HIGH,10) - LLV(LOW,10)));
NEWVOL:=(RSI5 - WR10);
买:=(AV + NEWVOL);
卖:=(AV - NEWVOL);
DRAWTEXT(CROSS(买,卖),L*0.98,'+买'),COLORYELLOW;
DRAWTEXT(CROSS(卖,买),H*1.02,'+卖'),COLORGREEN;
MA1:=MA(CLOSE,3);
MA2:=MA(CLOSE,5);
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
X:=BARSLAST(CROSS(MA1,MA2));
止损:REF(C,X+1)*(1-0.05),COLORGREEN;
止赢:REF(IF(C>O,C,O),X)*(1+0.1),COLORRED;
回踩止赢:HHV(H,X+1)*(1-0.03),COLORYELLOW,POINTDOT,LINETHICK4;
未来函数检测结果如下:
该公式包含未来函数:WINNER
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
{乾坤趋势副图源码如下}DRAWGBK(C>0, RGB(180,170,170),RGB(183,164,165),0,'11',0)
输出关注:20,POINTDOT
输出警戒:80,POINTDOT
VAR1赋值:10日内最低价最低值
VAR2赋值:25日内最高价最高值
趋势赋值: EMA((收盘价-VAR1)/(VAR2-VAR1)*110,10),COLORFF00FF,LINETHICK5
IF(趋势>=1日前的趋势,趋势,DRAWNULL),COLORFF00FF,LINETHICK2
IF(趋势< 1日前的趋势,趋势,DRAWNULL),COLOR00FFFF,LINETHICK2
STICKLINE(趋势>=1日前的趋势 ,趋势 ,1日前的趋势,3 ,1),COLORRED,LINETHICK3
STICKLINE(趋势< 1日前的趋势 ,趋势 ,1日前的趋势,3 ,1),COLOR00FF00,LINETHICK3
IF(趋势>=1日前的趋势,0,13),COLORFF00FF,LINETHICK2
DRAWICON(趋势>=1日前的趋势,8,1)
DRAWICON(趋势< 1日前的趋势,2,2)
VOLUME赋值:成交量,成交量STICK
MAVOL1赋值:VOLUME的5日简单移动平均
MAVOL2赋值:VOLUME的10日简单移动平均
当满足条件MAVOL1>=MAVOL2时,在122和116之间画柱状线
STICKLINE (MAVOL1输出成交量叉:MAVOL1>MAVOL2,POINTDOT
DIF赋值:收盘价的12日指数移动平均-收盘价的26日指数移动平均
DEA赋值:DIF的9日指数移动平均
MACD赋值:(DIF-DEA)*2,COLORSTICK
如果>=DEA返回114否则返回108
如果MACD叉:DIF>DEA,POINTDOT
{}RSV赋值:(收盘价-9日内最低价最低值)/(9日内最高价最高值-9日内最低价最低值)*100
RSV的3日[1日权重]移动平均
K的3日[1日权重]移动平均
J赋值:3*K-2*D
STICKLINE (K>=D,106,100,3,0),COLORFF00FF
STICKLINE (KKDJ叉:K>D POINTDOT
当满足条件 到最后交易的周期=3时,在119和'成交量'位置书写文字
当满足条件 到最后交易的周期=3时,在111和'MACD'位置书写文字
当满足条件 到最后交易的周期=3时,在103和'KDJ'位置书写文字
{乾坤狂飙副图源码如下}DRAWGBK(C>0, RGB(180,170,170),RGB(183,164,165),0,'11',0)
LC赋值:1日前的收盘价
如果DATE<=1211231返回1否则返回1
XB_2赋值:收盘价的3日指数移动平均
XB_3赋值:收盘价的20日指数移动平均
XB_4赋值:收盘价的60日指数移动平均
XB_5赋值:ATAN((XB_4-1日前的XB_4)/XB_4*10)/3.142*180
XB_6赋值:收盘价的120日指数移动平均
XB_7赋值:收盘价的250日指数移动平均
XB_8赋值:1日前的最低价
XB_9赋值:SMA(最低价-XB_8的绝对值,3,1)/SMA(最低价-XB_8和0较大值,3,1)*100
XB_10:=XB_9*10的3日指数移动平均
XB_11:=13日内最低价最低值
XB_12:=13日内XB_10最高值
XB_13:=EMA(IF(最低价<=XB_11,(XB_10+XB_12*2)/2,0),3)/618
如果XB_13>500返回500否则返回XB_13
XB_15:=XB_1 AND 收盘价>XB_4 AND XB_4>XB_6 AND XB_6>XB_7
XB_16:=XB_1 AND XB_15 AND KDJ.J>1日前的KDJ.J AND 1日前的KDJ.J<2日前的KDJ.J AND 最低价-XB_4的绝对值/XB_4<0.08 AND 收盘价>1日前的收盘价
XB_17:=1
{}(-0.5),DOTLINE,COLORBLACK
STICKLINE(收盘价>收盘价的60日简单移动平均,0,0.2,1,0),COLORRED
STICKLINE(收盘价>收盘价的20日简单移动平均,0.2,0.4,1,0),画绿色
当满足条件XB_5>0时,在0.4和0.6之间画柱状线
当满足条件XB_16时,在0.6和0.8之间画柱状线
当满足条件XB_14>1时,在0.8和1之间画柱状线
DRAWICON(XB_1 AND XB_15 AND 收盘价>收盘价的20日简单移动平均 AND XB_14>1 AND KDJ.J>1日前的KDJ.J AND 1日前的KDJ.J<2日前的KDJ.J AND 最低价-XB_4的绝对值/XB_4<0.08AND XB_5>0 AND 收盘价>1日前的收盘价,(-0.1),5) AND XB_17
{乾坤牛场副图源码如下}DRAWGBK(C>0, RGB(180,170,170),RGB(183,164,165),0,'11',0)
LC赋值:1日前的收盘价
输出牛短:SMA(收盘价*0.9计算的获利盘比例,2.5,1)*46,COLORRED,LINETHICK2
输出牛长:SMA(收盘价*0.95计算的获利盘比例,5,1)*30,画黄色,LINETHICK2
IF(牛短>牛长 AND 牛长>1日前的牛长,牛短,DRAWNULL),COLORRED,LINETHICK3
IF(牛长<1日前的牛长 OR 牛短<牛长,牛短,DRAWNULL),画绿色,LINETHICK2
IF(牛长<1日前的牛长,牛长,DRAWNULL),COLORLIBLUE,LINETHICK2
输出牛线:6,DOTLINE,LINETHICK1,画白色
DRAWICON(牛短上穿牛长,牛线+0.5,1)
{乾坤六道主图源码如下}DRAWGBK(C>0, RGB(180,170,170),RGB(183,164,165),0,'11',0)
LC赋值:1日前的收盘价
RSI5赋值:((SMA(MAX((收盘价 - LC),0),5,1) / SMA((收盘价 - LC的绝对值),5,1)) * 100)
TR1赋值:SUM(MAX(MAX((最高价 - 最低价),(最高价 - 1日前的收盘价的绝对值)),ABS((最低价 - 1日前的收盘价))),10)
HA赋值:(最高价 - 1日前的最高价)
LA赋值:(1日前的最低价 - 最低价)
DMP:=SUM(IF(((HA > 0) AND (HA > LA)),HA,0),10)
DMM:=SUM(IF(((LA > 0) AND (LA > HA)),LA,0),10)
PDI:=((DMP * 100) / TR1)
MDI:=((DMM * 100) / TR1)
ADX赋值:MA((((MDI - PDI的绝对值) / (MDI + PDI)) * 100),5)
AV赋值:(RSI5 + ADX)
DXR:=(((ADX + 5日前的ADX) / 2) + RSI5)
WR10赋值:((100 * (10日内最高价最高值 - 收盘价)) / (10日内最高价最高值 - 10日内最低价最低值))
NEWVOL赋值:(RSI5 - WR10)
买赋值:(AV + NEWVOL)
卖赋值:(AV - NEWVOL)
DRAWTEXT(买上穿卖,L*0.98,'+买'),画黄色
DRAWTEXT(卖上穿买,H*1.02,'+卖'),画绿色
MA1赋值:收盘价的3日简单移动平均
MA2赋值:收盘价的5日简单移动平均
DRAWKLINE(最高价,开盘价,最低价,收盘价)
X赋值:上次MA1上穿MA2距今天数
输出止损:X+1日前的C*(1-0.05),画绿色
如果C>O返回C否则返回O
回踩输出止赢:X+1日内H最高值*(1-0.03),画黄色,POINTDOT,LINETHICK4