- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
<分区>
我有一个来自外汇市场的值(value) df,我正在尝试将 df 中每一行的 RSI、相对强度指数 (10) 放入数据框。
df.head()
Out[3]:
Date Time Open High Low Close Volume OpenInt
0 2016-09-16 00:05:00 0.75183 0.75186 0.75160 0.75161 0 0
1 2016-09-16 00:10:00 0.75156 0.75156 0.75145 0.75149 0 0
2 2016-09-16 00:15:00 0.75156 0.75166 0.75152 0.75165 0 0
3 2016-09-16 00:20:00 0.75164 0.75165 0.75150 0.75156 0 0
4 2016-09-16 00:25:00 0.75156 0.75174 0.75153 0.75156 0 0
RSI 是告诉您产品何时超卖或超买的指标; RSI = 100 - 100/(1 + RS) 其中 RS 是给定时间范围内上涨周期的平均 yield /给定时间范围内下跌周期的平均损失。在我的例子中,时间范围是 10。
df.change = df.Open - df.Close # find out if there is a gain or a loss
df.gain = df.change [df.change > 0] #column of gain
df.loss = df.change [df.change < 0]# column of loss
df.again = df.gain.rolling(center=False,window=10) #find the average gain in the last 10 periods
df.aloss = df.loss.rolling(center=False,window=10) #find the average loss in the last 10 periods
现在是麻烦开始的地方;我需要获取 RS:
df.rs = df.again/df.aloss
TypeErrorTraceback (most recent call last)
<ipython-input-13-2886bcd78f42> in <module>()
----> 1 df.rs = df.again/df.aloss
TypeError: unsupported operand type(s) for /: 'Rolling' and 'Rolling'
编辑
df.gain.head(6)
Out[31]:
0 0.00022
1 0.00007
3 0.00008
5 0.00002
7 0.00003
8 0.00002
df.loss.head(6)
Out[32]:
2 -0.00009
6 -0.00019
9 -0.00013
14 -0.00002
15 -0.00011
20 -0.00008
dtype: float64
我无法获得平滑的 RSI。下图来自 freestockcharts.com。计算使用此代码。 public static double CalculateRsi(IEnumerable closePr
我希望这不会被视为纯粹为了这样做而试图引发对话。 我经常使用 vim(每天 5-10 小时),我注意到我的左手腕首先开始疼痛。标准键盘布局(见下图)几乎肯定会给你带来关节炎。 目前,我已经重新映射 C
我正在寻找何时能够为 RSI 指标添加自己的数据。在图片 RSI 指标上,我可以使用接下来的代码行添加: id: 'AAPL', type: 'rsi', params: { period: 1
我的左手腕总是受到 RSI 的困扰(参见 here ),我认为这是因为按下 ctrl 和 shift 键时发生的扭转 Action 。因此,我继续购买了Advantage Kinesis keyboa
按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
这是 ../sysdeps/x86_64/memcpy.S 中的一行,在这行之后我遇到了 VM 崩溃,所以我需要知道发生了什么。基本上我知道它类似于将 rsi 复制到 rcx。但这是否意味着 rsi
这个问题在这里已经有了答案: Relative Strength Index in python pandas (11 个答案) 关闭 2 年前。 我有一个来自外汇市场的值(value) df,我正
我想知道是否有任何涵盖 RSI-Divergence 的 Python 库(快速和慢速之间的差异 RSI )或有关如何在 Python 中实现其算法的任何指导。 已提问:Programmaticall
我想准确反射(reflect) cryptowatch.de 上的 RSI 值(在我的例子中是 LTC-EUR),我使用了网站 stockcharts.com ,解释了如何计算 RSI,用 Javas
我正在以 1 分钟的分辨率编写硬币 A 的策略。现在我需要获得硬币 B 的每小时 RSI。 我试过: btcusdtHour = security("BITTREX:BTCUSDT", "60", c
来自 Trading View ,我们看到 rsi 可以用 pinescript 写成如下: pine_rsi(x, y) => u = max(x - x[1], 0) // upward
在 Intel x86 64 位架构中,有 rax...rdx 寄存器,它们只是 A...D 通用寄存器。 但也有称为rsi和rdi的寄存器,它们分别是“源索引”和“目标索引”寄存器。为什么这些寄存器
我正在计算 RSI (相对强度指数)。我有这样的数据 **Date|Close|Change|Gain|Loss** 计算公式为 RSI = 100 - 100/(1+RS) where RS = A
我的问题 我在 Github 上尝试了很多库,但它们都没有为 TradingView 生成匹配结果,所以我遵循了这个 link 上的公式计算 RSI 指标。我用 Excel 计算并用 TradingV
我正在尝试在交易 View 上使用 pine-script 开发一个多时间框架 RSI,但我似乎在长期图表 View 中遇到了短期 RSI 的问题。 例如,以下代码将显示 5 分钟 RSI。如果我将图
我有一个 pine 脚本,我正在尝试将其转换为 python。 但是,pine 脚本允许 RSI 有 2 个系列作为输入,而不是传统的系列和周期。 我的问题是这是如何实现的,我在他们的文档中尝试了实现
是否可以在数据库中实现RSI功能? https://github.com/TulipCharts/tulipindicators我在 postgresql 表中有市场数据,我想根据这些数据计算 RSI
我编写了一个基本的 C 程序,它定义了一个整型变量 x,将其设置为零并返回该变量的值: #include int main(int argc, char **argv) { int x;
我正在试着用熊猫和NumPy来计算蟒蛇中的Connors RSI。我想用ConnorsRSI的默认值(3,2,100)来计算它。。Connors RSI的公式为:[RSI(Close,3)+RSI(S
我正在尝试使用 TA-Lib 进行技术分析。我下载了 .NET 的 TA-Lib-Core Nuget 包。不幸的是,我找不到任何 API 文档,所以一些方法参数有点神秘。 我下载了 2016 年 4
我是一名优秀的程序员,十分优秀!