Pine Script: Functions


Functions adalah formula-formula asas yang boleh digunakan bagi memudahkan pengiraan. Functions asas seperti di bawah

  • highest = highest value for a given number of bars back
  • lowest = lowest value for a given number of bars back
  • sma = returns the moving average
  • ema = returns the exponentially weighted moving average

Rujukan tambahan di https://www.tradingview.com/pine-script-reference/

Berikut adalah demo functions.

Pine Script Code


Leave a Reply

Your email address will not be published. Required fields are marked *