股票资金均线-股票资金均线指标公式

2023-08-04 入门知识 0次阅读 admin
股票资金均线.jpg

关于股票资金均线的问题,我们总结了以下几点,给你解答:

股票资金均线


股票资金均线


:param stock_code:
:param start_date:
:param end_date:
:return:
"""
# 获取股票数据
stock_data = get_stock_data(stock_code, start_date, end_date)
# 计算资金均线
stock_data['MA5'] = stock_data['amount'].rolling(window=5).mean()
stock_data['MA10'] = stock_data['amount'].rolling(window=10).mean()
stock_data['MA20'] = stock_data['amount'].rolling(window=20).mean()
stock_data['MA30'] = stock_data['amount'].rolling(window=30).mean()
stock_data['MA60'] = stock_data['amount'].rolling(window=60).mean()
stock_data['MA120'] = stock_data['amount'].rolling(window=120).mean()
stock_data['MA250'] = stock_data['amount'].rolling(window=250).mean()
return stock_data


def get_stock_data_with_ma_vol(stock_code, start_date, end_date):
"""
获取股票数据,包括资金均线和成交量均线
:param stock_code:
:param start_date:
:param end_date:
:return:
"""
# 获取股票数据
stock_data = get_stock_data(stock_code, start_date, end_date)
# 计算资金均线
stock_data['MA5'] = stock_data['amount'].rolling(window=5).mean()
stock_data['MA10'] = stock_data['amount'].rolling(window=10).mean()
stock_data['MA20'] = stock_data['amount'].rolling(window=20).mean()
stock_data['MA30'] = stock_data['amount'].rolling(window=30).mean()
stock_data['MA60'] = stock_data['amount'].rolling(window=60).mean()
stock_data['MA120'] = stock_data['amount'].rolling(window=120).mean()
stock_data['MA250'] = stock_data['amount'].rolling(window=250).mean()
# 计算成交量均线
stock_data['VOL5'] = stock_data['volume'].rolling(window=5).mean()
stock_data['VOL10'] = stock_data['volume'].rolling(window=10).mean()
stock_data['VOL20'] = stock_data['volume'].rolling(window=20).mean()
stock_data['VOL30'] = stock_data['volume'].rolling(window=30).mean()
stock_data['VOL60'] = stock_data['volume'].rolling(window=60).mean()
stock_data['VOL120'] = stock_data['volume'].rolling(window=120).mean()
stock_data['VOL250'] = stock_data['volume'].rolling(window=250).mean()
return stock_data


def get_stock_data_with_ma_vol_macd(stock_code, start_date, end_date):
"""
获取股票数据,包括资金均线、成交量均线和MACD
:param stock_code:
:param start_date:
:param end_date:
:return:
"""
# 获取股票数据
stock_data = get_stock_data(stock_code, start_date, end_date)
# 计算资金均线
stock_data['MA5'] = stock_data['amount'].rolling(window=5).mean()
stock_data['MA10'] = stock_data['amount'].rolling(window=10).mean()
stock_data['MA20'] = stock_data['amount'].rolling(window=20).mean()
stock_data['MA30'] = stock_data['amount'].rolling(window=30).mean()
stock_data['MA60'] = stock_data['amount'].rolling(window=60).mean()
stock_data['MA120'] = stock_data['amount'].rolling(window=120).mean()
stock_data['MA250'] = stock_data['amount'].rolling(window=250).mean()
# 计算成交量均线
stock_data['VOL5'] = stock_data['volume'].rolling(window=5).mean()
stock_data['VOL10'] = stock_data['volume'].rolling(window=10).mean()
stock_data['VOL20'] = stock_data['volume'].rolling(window=20).mean()
stock_data['VOL30'] = stock_data['volume'].rolling(window=30).mean()
stock_data['VOL60'] = stock_data['volume'].rolling(window=60).mean()
stock_data['VOL120'] = stock_data['volume'].rolling(window=120).mean()
stock_data['VOL250'] = stock_data['volume'].rolling(window=250).mean()
# 计算MACD
stock_data['DIF'], stock_data['DEA'], stock_data['MACD'] = talib.MACD(stock_data['close'].values,
fastperiod=12, slowperiod=26, signalperiod=9)
return stock_data


def get_stock_data_with_ma_vol_macd_kdj(stock_code, start_date, end_date):
"""
获取股票数据,包括资金均线、成交量均线、MACD和KDJ
:param stock_code:
:param start_date:
:param end_date:
:return:
"""
# 获取股票数据
stock_data = get_stock_data(stock_code, start_date, end_date)
# 计算资金均线
stock_data['MA5'] = stock_data['amount'].rolling(window=5).mean()
stock_data['MA10'] = stock_data['amount'].rolling(window=10).mean()
stock_data['MA20'] = stock_data['amount'].rolling(window=20).mean()
stock_data['MA30'] = stock_data['amount'].rolling(window=30).mean()
stock_data['MA60'] = stock_data['amount'].rolling(window=60).mean()
stock_data['MA120'] = stock_data['amount'].rolling(window=120).mean()
stock_data['MA250'] = stock_data['amount'].rolling(window=250).mean()
# 计算成交量均线
stock_data['VOL5'] = stock_data['volume'].rolling(window=5).mean()
stock_data['VOL10'] = stock_data['volume'].rolling(window=10).mean()
stock_data['VOL20'] = stock_data['volume'].rolling(window=20).mean()
stock_data['VOL30'] = stock_data['volume'].rolling(window=30).mean()
stock_data['VOL60'] = stock_data['volume'].rolling(window=60).mean()
stock_data['VOL120'] = stock_data['volume'].rolling(window=120).mean()
stock_data['VOL250'] = stock_data['volume'].rolling(window=250).mean()
# 计算MACD
stock_data['DIF'], stock_data['DE

股票资金均线指标公式


股票资金均线指标公式

1:cross(c,ma(c,30)) and c/o>1.04;
2:a:=cross(c,ma(c,30));
(ref(count(a,20),1))>=1 and between (c/ma(c,30),1.001,1.005);
M3:=MA(CLOSE,3);
M10:=MA(CLOSE,10);
M30:=MA(CLOSE,30);
M60:=MA(CLOSE,60);
GL3:=(C-M3)/M3*100;
GL10:=(C-M10)/M10*100;
GL30:=(C-M30)/M30*100;
GL60:=(C-M60)/M60*100,COLORLICYAN;
买点:CROSS(GL3,0) AND GL10>-5 AND GL10<5 AND GL30>-5 AND GL30<5 AND GL60>-5 AND GL60<5;
{四线粘合选股}
A5:=MA(C,5);
A10:=MA(C,10);
A20:=MA(C,20);
A30:=MA(C,30);
MAX(MAX(A5,A10),MAX(A20,A30))/MIN(MIN(A5,A10),MIN(A20,A30))<1.008 AND A5>REF(A5,1)AND A30>REF(A30,1);
======================
{五线粘合}
MA1:=MA(C,5);
MA2:=MA(C,10);
MA3:=MA(C,20);
MA4:=MA(C,30);
MA5:=MA(C,60);
P1:=ABS(MA1-MA2)+ABS(MA2-MA3)+ABS(MA1-MA4)
+ABS(MA2-MA4)+ABS(MA3-MA4)+ABS(MA1-MA3)+ABS(MA1-MA5)
+ABS(MA2-MA5)+ABS(MA3-MA5)+ABS(MA4-MA5);
五线粘合:IF(P1/C<7.5/100 AND MA1>REF(MA1,1) AND MA2>REF(MA2,1),888,0);
========================
{六线粘合}
A5:=MA(C,5);
A10:=MA(C,10);
A20:=MA(C,20);
A60:=MA(C,60);
A120:=MA(C,120);
A240:=MA(C,240);
MAX(MAX(MAX(A5,A10),MAX(A20,A60)),MAX(A120,A240))/MIN(MIN(MIN(A5,A10),MIN(A20,A60)),MIN(A120,A240))<1.05 AND A5>REF(A5,1)AND A120>REF(A120,1);
{四线粘合}
V0:=MA(C,5);
V1:=MA(C,10);
V3:=MA(C,30);
V4:=MA(C,60);
M1:=1000*V1/V4<=1015 AND 1000*V1/V4>=975;
M3:=1000*V3/V4<=1015 AND 1000*V3/V4>=985;
M4:=M1 AND M3 AND CROSS(V0,V1);
M5:=M1 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)<,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 成交量突破;

三线粘合:
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< AND A2< AND A3<;
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)<;
X2:=ABS(MA(C,5)/MA(C,10)-1)<;
X3:=ABS(MA(C,5)/MA(C,20)-1)<;
MA(C,5)>REF(MA(C,5),1) AND X1 AND X2 AND X3;

希望能够帮到你!

股票资金均线是什么字母


股票资金均线是什么字母

这个你可以随便自己设置啊,另外你用鼠标移到某根线上停顿一下软愿组乱的哥否而显次件会显示,还有均线画面的标题上也会显示对应的均线颜色

猜你感兴趣: 股票资金均线