关于所有均线底度重叠的股票的问题,我们总结了以下几点,给你解答:
所有均线底度重叠的股票
:param stock_list:
:param ma_list:
:return:
"""
ma_list.sort()
ma_list_len = len(ma_list)
stock_list_len = len(stock_list)
result_list = []
for i in range(stock_list_len):
stock_code = stock_list[i]
stock_data = get_stock_data(stock_code)
if stock_data is None:
continue
ma_data = get_ma_data(stock_data, ma_list)
if ma_data is None:
continue
if ma_data[ma_list_len - 1] > ma_data[0]:
continue
if ma_data[ma_list_len - 1] == ma_data[0]:
result_list.append(stock_code)
return result_list
def get_ma_data(stock_data, ma_list):
"""
获取股票的均线数据
:param stock_data:
:param ma_list:
:return:
"""
ma_list_len = len(ma_list)
ma_data = []
for i in range(ma_list_len):
ma_data.append(get_ma_value(stock_data, ma_list[i]))
return ma_data
def get_ma_value(stock_data, ma_day):
"""
获取股票的均线值
:param stock_data:
:param ma_day:
:return:
"""
stock_data_len = len(stock_data)
if stock_data_len < ma_day:
return None
sum_value = 0
for i in range(ma_day):
sum_value += stock_data[stock_data_len - 1 - i][4]
return round(sum_value / ma_day, 2)
def get_stock_data(stock_code):
"""
获取股票数据
:param stock_code:
:return:
"""
stock_data = ts.get_k_data(stock_code, ktype='D', autype='qfq', start='2018-01-01')
if stock_data is None:
return None
stock_data_len = len(stock_data)
if stock_data_len < 10:
return None
return stock_data
def get_stock_list():
"""
获取股票列表
:return:
"""
stock_list = ts.get_stock_basics()
return stock_list.index.tolist()
if __name__ == '__main__':
stock_list = get_stock_list()
ma_list = [5, 10, 20]
result_list = get_ma_bottom_stock_list(stock_list, ma_list)
print(result_list)
所有均线底度重叠的股票会涨吗
每个人判断底部的方式不同。你这种方法算是一种。均线最大的缺点是严重的滞后性,所以如果用你的方法判断,很可能上涨趋势已经开始一段时间了。
选股公式条件
1、四线粘合;
2、低位二次金叉;
3、然后一阳穿四线,同时放量(或者第二天补量);
{四线粘合}成功率39--37,还可以吧
v0:=ema(c,5);
v1:=ema(c,10);
v2:=ema(c,15);
v3:=ema(c,30);
v4:=ema(c,60);
m1:=1000*v1/v4<=1015 and 1000*v1/v4>=975;
m2:=1000*v2/v4<=1020 and 1000*v2/v4>=980;
m3:=1000*v3/v4<=1015 and 1000*v3/v4>=985;
m4:=m1 and m2 and m3 and cross(v0,v1);
m5:=m1 and m2 and m3 and cross(v0,v3);
m4 or m5;
三线粘合金叉:
a5:=ma(c,5);
a10:=ma(c,10);
a30:=ma(c,30);
aa:=cross(a5,a10);
bb:=cross(a5,a30);
cc:=cross(a10,a30);
count(aa,3)=1 and count(bb,3)=1 and count(cc,3)=1;
三线粘合向上加成交量:36--9。6
a5:=ma(c,5);
a10:=ma(c,10);
a30:=ma(c,30);
均线粘合:=count(max(max(a5,a10),a30)/min(min(a5,a10),a30)<1.03,5)>=3;
向上突破:=a5>ref(a5,1)and a10>ref(a10,1)and a30>ref(a30,1)and c>a5 and c>a30;
成交量突破:=v/ma(v,5)>2 and ma(v,5)>ma(v,10);
均线粘合 and 向上突破 and 成交量突破;
多条均线粘合:成功率--35--15
a13:=ma(c,13);
a21:=ma(c,21);
a34:=ma(c,34);
a55:=ma(c,55);
a120:=ma(c,120);
a240:=ma(c,240);
max(max(max(a13,a21),max(a34,a55)),max(a120,a240))/min(min(min(a13,a21),min(a34,a55)),min(a120,a240))<1.1 and a13>ref(a13,1)and a120>ref(a120,1);
三线粘合:
aa:=ma(c,5);
bb:=ma(c,10);
dd:=ma(c,30);
a1:=abs((aa-c)/c);
a2:=abs((bb-c)/c);
a3:=abs((dd-c)/c);
b:=a1<0.05 and a2<0.05 and a3<0.05;
filter(b,10)=1 ;
通达信均线粘合选股公式
ma1:=ma(close,5);
ma2:=ma(close,10);
ma3:=ma(close,20);
ma4:=ma(close,60);
ma5:=ma(close,120);
ma6:=ma(close,250);
a:max(max(ma1,ma2),ma3),linethick0;
b:min(min(ma1,ma2),ma3),linethick0;
三线粘合:if(range(100*(a-b)/b,0,5),100*(a-b)/b,drawnull),linethick0;
sa:max(max(ma1,ma2),max(ma3,ma4)),linethick0;
sb:min(min(ma1,ma2),min(ma3,ma4)),linethick0;
参数可以自行设置:d为均线多头排列天数,n1,n2,n3为涨幅限制,可根据自己需要设置!再结合其他指标组合选股!不足之处请高手指点!d为均线多头排列天数,设为2-3天都可,n1,n2,n3为涨幅限制,我一般设为1.5或是2(这个可根据自己要求设),具体如下:
参数名 缺省 最小 最大 步长
d 1 1 20 1
n1 1 1 20 0.5
n2 1 1 20 0.5
n3 1 1 20 0.5
源码:
ma5:=ma(close,5);
ma10:=ma(close,10);
ma20:=ma(close,20);
ma30:=ma(close,30);
a1:=ma5>ma10 and ma10>ma20 and ma20>ma30 and all((ma5>ma10 and ma10>ma20 and ma20>ma30),d);
a2:=((ma5-ma10)/ma5)*100<n1 and ((ma10-ma20)/ma10)*100<n2 and ((ma20-ma30)/ma20)*100<n3;
a3:=a1 and a2;
filter(a3,5);
三线合一 时间持续一日即可 当天盘后选至于相距多少算粘合我不知道怎么表达 下面是个均线三线粘合的选股公式 这样的粘合就行了
x1:=abs(ma(c,10)/ma(c,20)-1)<0.01;
x2:=abs(ma(c,5)/ma(c,10)-1)<0.01;
x3:=abs(ma(c,5)/ma(c,20)-1)<0.01;
ma(c,5)>ref(ma(c,5),1) and x1 and x2 and x3;
ma6,18,25,45)均线粘合选股
a1:=ma(c,6);
a2:=ma(c,18);
a3:=ma(c,25);
a4:=ma(c,45);
aa:=(a1+a2+a3+a4)/4;
up:=aa*(n/100)+aa;
dn:=aa-aa*(n/100);
count(between(a1,up,dn) and between(a2,up,dn) and
between(a3,up,dn) and between(a4,up,dn),m)=m;
close>a1 and close>a2 and close>a3 and close>a4;