![]() |
在這個頁面顯示本主題全部的 3 個文章 |
奇狐社區論壇 (http://www.chiefox.com.tw/bbs/index.php)
- 問題交流 (http://www.chiefox.com.tw/bbs/forumdisplay.php?forumid=28)
-- [公式]IFF指令請益 (http://www.chiefox.com.tw/bbs/showthread.php?threadid=23747)
[公式]IFF指令請益
在TradingView的Pine語言中,up1 = nz(up[1],up),其中nz表示以系列中的零(或指定值)替換NaN值。
語法:
nz(x, y) → integer
nz(x, y) → float
nz(x, y) → color
nz(x, y) → bool
nz(x, y) → series[integer]
nz(x, y) → series[float]
nz(x, y) → series[color]
nz(x, y) → series[bool]
nz(x) → integer
nz(x) → float
nz(x) → color
nz(x) → bool
nz(x) → series[integer]
nz(x) → series[float]
nz(x) → series[color]
nz(x) → series[bool]
參數:
x (series) 待執行的系列值。
y (float) 將插入的值代替x系列中的所有NaN值。
請問如果我想用奇狐語法實現up1 = nz(up[1],up),我可以怎麼做呢?感覺是用IFF指令但是IFF是返回零值,而前述nz指令則可以返回零值與na值。
回覆: [公式]IFF指令請益
引用:
最初由 8QptCEM9 發表
在TradingView的Pine語言中,up1 = nz(up[1],up),其中nz表示以系列中的零(或指定值)替換NaN值。
語法:
nz(x, y) → integer
nz(x, y) → float
nz(x, y) → color
nz(x, y) → bool
nz(x, y) → series[integer]
nz(x, y) → series[float]
nz(x, y) → series[color]
nz(x, y) → series[bool]
nz(x) → integer
nz(x) → float
nz(x) → color
nz(x) → bool
nz(x) → series[integer]
nz(x) → series[float]
nz(x) → series[color]
nz(x) → series[bool]
參數:
x (series) 待執行的系列值。
y (float) 將插入的值代替x系列中的所有NaN值。
請問如果我想用奇狐語法實現up1 = nz(up[1],up),我可以怎麼做呢?感覺是用IFF指令但是IFF是返回零值,而前述nz指令則可以返回零值與na值。
好的,我來試試😉
| 全部時間均為台灣時間, 現在時間為12:35 | 在這個頁面顯示本主題全部的 3 個文章 |
Powered by: vBulletin Version 2.3.0 - Copyright©2000-, Jelsoft Enterprises Limited.
簡愛洋行 製作 Copyright 2003-. All Rights Reserved.