如何在股票数据的收盘价中找到V

编程入门 行业动态 更新时间:2024-10-23 07:37:23
本文介绍了如何在股票数据的收盘价中找到V的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如果我要绘制数据数组,我可以看到V何时出现.我希望我的程序使用股票的收盘价来查找何时出现V.怎么办呢?

If i were to plot the array of data i could see when the V occurs. I would like my program to find when a V occurs using minuteclose price of stock. How can this be done ?

谢谢

推荐答案

您正在寻找局部最小值.您需要做的就是保留最后一个值,并保留有关库存是否最后增加的标志.如果它正在减少(标志为假),但是新值更高 比您之前的价格要低.如果价格在增加(标志为true),但新价格较低,则您已达到本地最高价. You are looking for a local minimum. All you should need to do is keep the last value, and keep a bool flag of whether the stock was last increasing. If it was decreasing (flag is false), but the new value is higher than your previous price, you have a minimum. If it was increasing (flag is true) but the new price is lower, then you have hit a local maximum.

更多推荐

如何在股票数据的收盘价中找到V

本文发布于:2023-10-25 21:59:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1528228.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:收盘价   股票   数据   中找到   如何在

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!