简体   繁体   中英

I can't get abs to work in Pine Script v5

I am trying to find the full size of a candle, bullish or bearish, so I try: FullLength = maths.abs(high-low) and FullLength = abs(high-low) but neither works. I get the message:

Could not find function or function reference 'maths.abs'.
Could not find function or function reference 'abs'.

Any ideas much appreciated. Thanks in advance.

If you are using v5 , it is math.abs() not maths .

In v4 , it is abs() .

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