跳至內容
AlertaChartAlertaScript / docs
AlertaScript / 多商品與多時間週期
本頁內容運作方式實際應用程式範例延伸閱讀

AlertaScript / 文件

多商品與多時間週期

在其他情境計算。

運作方式

request.security 在指定商品及週期計算運算式,再與目前圖表對齊。商品與時間週期可來自輸入、變數或迴圈,請求也可以寫在 if 區塊或函數內。運算式也能傳回字串、顏色、陣列或自訂型別。

實際應用

先使用 lookahead_off。尚未收盤的高週期 K 棒仍會變動;檢查缺口、時段和資料供應。

程式範例

AlertaScript
indicator("Hourly EMA", overlay=true)hourly = request.security(syminfo.tickerid, "60", ta.ema(close, 20), lookahead=barmerge.lookahead_off)plot(hourly, "Hourly EMA", color=color.blue)

延伸閱讀

AlertaScript

找不到結果。

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