Tradingview松树;将 v2 更改为 v3:未声明的标识符错误
Tradingview pine ; change v2 to v3 : Undeclared identifier Error
我尝试将pine 2版修改为3版
但是这个错误发生了。
trendState = closeSeries > openSeries ?真:关闭系列 < 开放系列?错误:趋势状态[1]
未声明的标识符 trendState
感谢您的帮助。
BR
笑
从 v3 开始,需要先初始化变量,然后才能在重新赋值中引用它们:
trendState = false
trendState := closeSeries > openSeries ? true : closeSeries < openSeries ? false : trendState[1]
我尝试将pine 2版修改为3版
但是这个错误发生了。
trendState = closeSeries > openSeries ?真:关闭系列 < 开放系列?错误:趋势状态[1]
未声明的标识符 trendState
感谢您的帮助。
BR
笑
从 v3 开始,需要先初始化变量,然后才能在重新赋值中引用它们:
trendState = false
trendState := closeSeries > openSeries ? true : closeSeries < openSeries ? false : trendState[1]