如何在股票数据的收盘价中找到V [英] How to find a V in an array of close price for stock data

查看:68
本文介绍了如何在股票数据的收盘价中找到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 minute close 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆