pine-script - 如何修改系列的情节?
问题描述
我正在使用下面的脚本绘制值。我怎样才能更新它以使该系列的数量更大?我不想改变 len,只是让它变宽 50 点。
谢谢,
米
//@version=4
study("Linear Regression Channel",shorttitle="LRC_SH",overlay=true)
len = input(300,title="Length")
smoothLen = 50
upper = sma(high, smoothLen)
lower = sma(low,smoothLen)
a = linreg(upper,len,0)
b = linreg(lower,len,0)
c = -dev(low,len)+b
d = dev(high,len)+a //test
//plot(a) //middle line
//plot(b) //middle line
plot(c,color=c>c[1]? color.green:color.red)
plot(d,color=d>d[1]? color.green:color.red)
解决方案
好的,我想通了。一种方法是:
theHigh = high
theLow = low
float coeff =.005
theHigh := high + (coeff * high)
theLow := low - (coeff * low)
推荐阅读
- python - 错误 - 从列表中保存特定行 | Python
- javascript - 如何为谷歌图表设置 x 轴的下限?
- java - 即使更改父样式后,设备也不显示 Android Studio 设备预览
- vue.js - 您将如何使用组合 API 编写此代码?
- javascript - 如何在不添加 URL 的情况下“跳转”到页面的特定部分?
- mysql - AuthProviderEmailInput 不是定义的输入类型(在 $input 上)
- flutter - Flutter Awesome Notification couldn't bind a method to action button
- loopback4 - Wonder lb4 控制器 param.query 自定义
- python - 放弃某些特定 URL 上的 load()
- python - 如何使用 Matplotlib 更改 z 轴标签的对齐方式