股价小于20均线的股票-股价小于20均线的股票有哪些

2023-07-15 17:18:16 入门知识 0次阅读 投稿:admin
股价小于20均线的股票.jpg

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

股价小于20均线的股票


股价小于20均线的股票


# 先查询出20日均线
sql_ma20 = '''
SELECT
stock_code,
ma20
FROM
stock_ma
WHERE
ma20 IS NOT NULL
'''
# 再查询出股价
sql_price = '''
SELECT
stock_code,
close_price
FROM
stock_price
WHERE
close_price IS NOT NULL
'''
# 将两个查询结果进行连接
sql = '''
SELECT
ma20.stock_code,
ma20.ma20,
price.close_price
FROM
({ma20}) ma20
LEFT JOIN
({price}) price
ON
ma20.stock_code = price.stock_code
WHERE
ma20.ma20 > price.close_price
'''.format(ma20=sql_ma20, price=sql_price)
# 执行查询
cursor.execute(sql)
# 获取查询结果
result = cursor.fetchall()
# 打印结果
print('股票代码\t20日均线\t股价')
for row in result:
stock_code, ma20, close_price = row
print('{}\t{:.2f}\t{:.2f}'.format(stock_code, ma20, close_price))

finally:
# 关闭数据库连接
connection.close()

股价小于20均线的股票是什么


股价小于20均线的股票是什么

XG:RANGE(MA(C,5),MA(C,10),MA(C,20)) AND C
晕乎乎的来了,但是没想清楚这个事7742
MA1:=MA(C,5);
MA2:=MA(C,10);
MA3:=MA(C,20);
MA1>MA2 AND MA1<=MA3 AND C<MA(C,20);
ma(c,5)<=ma(c,20) and ma(c,5)>=ma(c,10);

股价小于20均线的股票有哪些


股价小于20均线的股票有哪些

AA:=C<MA(C,20) AND C>M秋A(C,60) AND 夜夜效细空志没井(1-C/REF(C,1))*100>1;
AA;


声明:稳得一批是理财投资基础知识平台! 并不指导专业性投资! 投资有风险,入市需谨慎!