防套之【强势区间】源码 副图 贴图 有未来数据
M:=1;
VAR1:=FINANCE(30)>=REF(FINANCE(30),130);
VAR2:=VAR1;
VAR3:=IF(NAMELIKE(5),0,1);
VAR4:=IF(NAMELIKE(6),0,1);
VAR5:=DYNAINFO(17)>0;
VAR6:=9500;{WWW.}
VAR7:=EXIST((CLOSE/REF(CLOSE,1)-1)*100>5.6,60);
VAR8:=DYNAINFO(4)>0;
VAR9:=DYNAINFO(7)<150;
VAR10:=CAPITAL/5500000<10;
VAR11:=VAR7 AND VAR8 AND VAR9 AND VAR10 AND CLOSE<150 AND FINANCE(42)<VAR6 AND VAR3 AND VAR4;
VAR12:=IF(DYNAINFO(8)>0.01,0.01*DYNAINFO(10)/DYNAINFO(8),DYNAINFO(3));
VAR13:=DYNAINFO(5)<0.01 OR DYNAINFO(6)<0.01;
VAR14:=IF(VAR13,1,VAR12<DYNAINFO(5)+0.01 AND VAR12>DYNAINFO(6)-0.01);
VAR15:=IF(VAR14,DMA(AMOUNT/(100*VOL),100*VOL/FINANCE(7)),EMA((HIGH+LOW+CLOSE)/3,120));
VAR16:=EVERY(VAR15>REF(VAR15,1),1);
VAR17:=IF(VAR16,VAR15,DRAWNULL);
VAR18:=STICKLINE(VAR17 AND EVERY(EMA(SUM(IF(CLOSE=REF(CLOSE,1),0,IF(CLOSE>REF(CLOSE,1),VOL,
-VOL)/100),0),30)>REF(EMA(SUM(IF(CLOSE=REF(CLOSE,1),0,IF(CLOSE>REF(CLOSE,1),VOL,-VOL)/100),
0),30),1),1) AND IF(MA(WINNER(CLOSE*0.9)*100*CLOSE,3)>10,MA(WINNER(CLOSE*0.9)*100*CLOSE,3),
0)/2/8>0 AND VAR11,REFDATE(HHV(HIGH,(-5)),DATE),REFDATE(LLV(LOW,(-5)),DATE),4,0);
VAR19:=STICKLINE(EVERY(EMA(SLOPE(CLOSE,15)*20+CLOSE,30)>REF(EMA(SLOPE(CLOSE,15)*20+CLOSE,30)
,1),1) AND EVERY(MA(10000*CLOSE/INDEXC,10)>REF(MA(10000*CLOSE/INDEXC,10),1),1)
AND EVERY(EMA(SUM(IF(CLOSE=REF(CLOSE,1),0,IF(CLOSE>REF(CLOSE,1),VOL,-VOL)/100),0),
30)>REF(EMA(SUM(IF(CLOSE=REF(CLOSE,1),0,IF(CLOSE>REF(CLOSE,1),VOL,-VOL)/100),0),30),1),1)
AND VAR11,REFDATE(HHV(HIGH,(-5)),DATE),REFDATE(LLV(LOW,(-5)),DATE),6,0);
VAR20:=STICKLINE(EVERY(XMA(XMA(LOW,25),25)-(XMA(XMA(HIGH,25),25)-XMA(XMA(LOW,25),
25))*1>REF(XMA(XMA(LOW,25),25)-(XMA(XMA(HIGH,25),25)-XMA(XMA(LOW,25),25))*1,1),1)
AND COST(EMA(SLOPE(CLOSE,15)*20+CLOSE,30))>=REF(COST(EMA(SLOPE(CLOSE,15)*20+CLOSE,30)),1)
AND COST(20)>=REF(COST(20),1) AND EVERY(EMA(SUM(IF(CLOSE=REF(CLOSE,1),0,IF(CLOSE>REF(CLOSE,1),
VOL,-VOL)/100),0),30)>REF(EMA(SUM(IF(CLOSE=REF(CLOSE,1),0,IF(CLOSE>REF(CLOSE,1),VOL,-VOL)/100),
0),30),1),1) AND VOL/MA(VOL,55)*100>50 AND EVERY(EMA(EMA(CLOSE,12)-EMA(CLOSE,26),
9)>REF(EMA(EMA(CLOSE,12)-EMA(CLOSE,26),9),1),1) AND VAR11,REFDATE(HHV(HIGH,(-5)),DATE),
REFDATE(LLV(LOW,(-5)),DATE),4,0);
强势区:=STICKLINE(VAR11 AND EVERY(EMA(SLOPE(CLOSE,15)*20+CLOSE,30)>REF(EMA(SLOPE(CLOSE,15)*20+CLOSE,30),
1),1) AND EVERY(MA(10000*CLOSE/INDEXC,10)>REF(MA(10000*CLOSE/INDEXC,10),1),1)
AND EVERY(EMA(SUM(IF(CLOSE=REF(CLOSE,1),0,IF(CLOSE>REF(CLOSE,1),VOL,-VOL)/100),0),
30)>REF(EMA(SUM(IF(CLOSE=REF(CLOSE,1),0,IF(CLOSE>REF(CLOSE,1),VOL,-VOL)/100),0),30),1),1)
AND IF(MA(WINNER(CLOSE*0.9)*100*CLOSE,3)>10,MA(WINNER(CLOSE*0.9)*100*CLOSE,3),0)/2/8>0
AND VAR18 AND VAR19 AND VAR20 AND VAR11,REFDATE(HHV(HIGH,(-5)),DATE),REFDATE(LLV(LOW,(-5)),
DATE),4,0),COLOR001050;
STICKLINE(REF(NOT(强势区),1),0,10000,4,-1),COLORGREEN;
STICKLINE(强势区,0,10000,4,0),COLORRED;{WWW.}
每股总价值:IF(FINANCE(3),FINANCE(18)+FINANCE(32)+FINANCE(33)+FINANCE(34)+(FINANCE(13)+FINANCE(22)
+FINANCE(25))/FINANCE(1),DRAWNULL),COLORGREEN,NODRAW;
静值:IF(FINANCE(3),FINANCE(18)+FINANCE(32)+FINANCE(33)+FINANCE(34){+FINANCE(38)},DRAWNULL),COLORYELLOW,NODRAW;
应收款:IF(FINANCE(3),FINANCE(22)/FINANCE(1),DRAWNULL),COLORWHITE,NODRAW;
现金流:IF(FINANCE(3),FINANCE(25)/FINANCE(1),DRAWNULL),COLORMAGENTA,NODRAW;
无形资:IF(FINANCE(3),FINANCE(13)/FINANCE(1),DRAWNULL),COLORWHITE,NODRAW;
未来函数检测结果如下:
该公式包含未来函数:WINNER
该公式包含未来函数:COST
该公式包含未来函数:CAPITAL
该公式包含未来函数:DYNAINFO
该公式包含未来函数:FINANCE
该公式包含未来函数:XMA
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
M赋值:1
VAR1赋值:FINANCE(30)>=REF(FINANCE(30),130)
VAR2赋值:VAR1
VAR3赋值:IF(NAMELIKE(5),0,1)
VAR4赋值:IF(NAMELIKE(6),0,1)
VAR5赋值:DYNAINFO(17)>0
VAR6赋值:9500
{WWW.}
VAR7赋值:EXIST((收盘价/1日前的收盘价-1)*100>5.6,60)
VAR8赋值:开盘价>0
VAR9赋值:现价<150
VAR10:=当前流通股本/5500000<10
VAR11:=VAR7 AND VAR8 AND VAR9 AND VAR10 AND 收盘价<150 AND FINANCE(42)
VAR12:=IF(DYNAINFO(8)>0.01,0.01*DYNAINFO(10)/DYNAINFO(8),DYNAINFO(3))
VAR13:=DYNAINFO(5)<0.01 OR DYNAINFO(6)<0.01
VAR14:=IF(VAR13,1,VAR12DYNAINFO(6)-0.01)
VAR15:=IF(VAR14,DMA(AMOUNT/(100*成交量),100*成交量/FINANCE(7)),EMA((最高价+最低价+收盘价)/3,120))
VAR16:=EVERY(VAR15>1日前的VAR15,1)
如果VAR16返回VAR15否则返回DRAWNULL
VAR18:=STICKLINE(VAR17 AND EVERY(EMA(SUM(IF(收盘价=1日前的收盘价,0,IF(收盘价>1日前的收盘价,成交量,
-成交量)/100),0),30)>REF(EMA(SUM(IF(收盘价=1日前的收盘价,0,IF(收盘价>1日前的收盘价,成交量,-成交量)/100),
0),30),1),1) AND IF(MA(收盘价*0.9计算的获利盘比例*100*收盘价,3)>10,MA(收盘价*0.9计算的获利盘比例*100*收盘价,3),
0)/2/8>0 AND VAR11,REFDATE(HHV(最高价,(-5)),DATE),REFDATE(LLV(最低价,(-5)),DATE),4,0)
VAR19:=STICKLINE(EVERY(EMA(SLOPE(收盘价,15)*20+收盘价,30)>REF(EMA(SLOPE(收盘价,15)*20+收盘价,30)
,1),1) AND EVERY(MA(10000*收盘价/INDEXC,10)>REF(MA(10000*收盘价/INDEXC,10),1),1)
AND EVERY(EMA(SUM(IF(收盘价=REF(收盘价,1),0,IF(收盘价>REF(收盘价,1),成交量,-成交量)/100),0),
30)>REF(EMA(SUM(IF(收盘价=REF(收盘价,1),0,IF(收盘价>REF(收盘价,1),成交量,-成交量)/100),0),30),1),1)
AND VAR11,REFDATE(HHV(最高价,(-5)),DATE),REFDATE(LLV(最低价,(-5)),DATE),6,0)
VAR20:=STICKLINE(EVERY(XX最低价的25日简单移动平均,25)-(XX最高价的25日简单移动平均,25)-XX最低价的25日简单移动平均,
25))*1>REF(XX最低价的25日简单移动平均,25)-(XX最高价的25日简单移动平均,25)-XX最低价的25日简单移动平均,25))*1,1),1)
AND 获利盘为EMA(SLOPE(收盘价,15%的成本分布*20+收盘价,30))>=REF(获利盘为EMA(SLOPE(收盘价,15%的成本分布*20+收盘价,30)),1)
AND COST(20)>=REF(COST(20),1) AND EVERY(EMA(SUM(IF(收盘价=REF(收盘价,1),0,IF(收盘价>REF(收盘价,1),
成交量,-成交量)/100),0),30)>REF(EMA(SUM(IF(收盘价=REF(收盘价,1),0,IF(收盘价>REF(收盘价,1),成交量,-成交量)/100),
0),30),1),1) AND 成交量/MA(成交量,55)*100>50 AND EVERY(EMA(EMA(收盘价,12)-EMA(收盘价,26),
9)>REF(EMA(EMA(收盘价,12)-EMA(收盘价,26),9),1),1) AND VAR11,REFDATE(HHV(最高价,(-5)),DATE),
REFDATE(LLV(最低价,(-5)),DATE),4,0)
强势区赋值:STICKLINE(VAR11 AND EVERY(EMA(SLOPE(收盘价,15)*20+收盘价,30)>REF(EMA(SLOPE(收盘价,15)*20+收盘价,30),
1),1) AND EVERY(MA(10000*收盘价/INDEXC,10)>REF(MA(10000*收盘价/INDEXC,10),1),1)
AND EVERY(EMA(SUM(IF(收盘价=REF(收盘价,1),0,IF(收盘价>REF(收盘价,1),成交量,-成交量)/100),0),
30)>REF(EMA(SUM(IF(收盘价=REF(收盘价,1),0,IF(收盘价>REF(收盘价,1),成交量,-成交量)/100),0),30),1),1)
AND IF(MA(收盘价*0.9计算的获利盘比例*100*收盘价,3)>10,MA(收盘价*0.9计算的获利盘比例*100*收盘价,3),0)/2/8>0
AND VAR18 AND VAR19 AND VAR20 AND VAR11,REFDATE(HHV(最高价,(-5)),DATE),REFDATE(LLV(最低价,(-5)),
DATE),4,0),COLOR001050
STICKLINE(REF(NOT(强势区),1),0,10000,4,-1),画绿色
当满足条件强势区时,在0和10000之间画柱状线
输出{WWW.}
每股总价值:IF(FINANCE(3),FINANCE(18)+FINANCE(32)+FINANCE(33)+FINANCE(34)+(FINANCE(13)+FINANCE(22)
+FINANCE(25))/FINANCE(1),DRAWNULL),画绿色,NODRAW
输出静值:IF(FINANCE(3),FINANCE(18)+FINANCE(32)+FINANCE(33)+FINANCE(34){+FINANCE(38)},DRAWNULL),画黄色,NODRAW
输出应收款:IF(FINANCE(3),FINANCE(22)/FINANCE(1),DRAWNULL),画白色,NODRAW
输出现金流:IF(FINANCE(3),FINANCE(25)/FINANCE(1),DRAWNULL),COLORMAGENTA,NODRAW
输出无形资:IF(FINANCE(3),FINANCE(13)/FINANCE(1),DRAWNULL),画白色,NODRAW