跳至內容
AlertaChartAlertaScript / docs
AlertaScript / 語法與型別
本頁內容運作方式實際應用程式範例

AlertaScript / 文件

語法與型別

明確宣告與傳遞參數。

運作方式

= 宣告變數,:= 重新賦值。int、float、bool、string、color 區分不同數值類型。

實際應用

使用 na 初始化時明確指定型別。依函數簽章傳參數,並使用 input.int 等有型別的輸入。

程式範例

AlertaScript
indicator("Typed inputs", overlay=true)int length = input.int(20, "Length", minval=1)float source = closebool rising = close > openplot(ta.ema(source, length), "EMA", color=rising ? color.green : color.red)
AlertaScript

找不到結果。

依名稱、別名或關鍵字搜尋。