简体   繁体   中英

pine script line 23: Cannot use a mutable variable as an argument of the security function

Below code gives error. PinescriptVersion4

TrendUp     :=close[1]>TrendUp[1]? max(Up,TrendUp[1]) : Up 
TrendDown   :=close[1] 
Trend       := close > TrendDown[1] ? 1: close< TrendUp[1]? -1: nz(Trend[1],1) 
Tsl         := Trend==1? TrendUp: TrendDown 

Trend1 = security(syminfo.tickerid,"1",Trend) 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM