PINE LIBRARY
Cập nhật Sub-Super Script and Roman numerals Library

Library "Sub_Super_Script_and_RomanNumerals_Library"
Library to transform numbers into Roman numerals / Super-Sub script / check if value is alpha or number
isnumber(input)
check to see if value is a number
Parameters:
input: (string/float/int) value to check
Returns: (na) if value is NOT a number and input (string/float/int) if value is a number
isalpha(input)
check a string if it is alpha(doesnt contain numbers)
Parameters:
input
Returns: (string) if string input does NOT contain numbers, return (na) if input string contains numbers
super(num)
convert a string's numbers from normal print to super-script [0⁰1¹2²3³4⁴5⁵6⁶7⁷8⁸9⁹]
Parameters:
num: (string/int/float) input value to transform
Returns: string of input with numbers converted to super-script
sub(num)
convert a string's numbers from normal print to sub-script [0₀1₁2₂3₃4₄5₅6₆7₇8₈9₉]
Parameters:
num: (string/int/float) input value to transform
Returns: string of input with numbers converted to sub-script
roman(num, trunc)
convert a string of numbers, float, or int
Parameters:
num: (string) input number to transform
trunc: (bool | false) true to truncate float value, false to show roman numerals with decimals (XX.VI)
Returns: string of roman numerals representing the input (num)
Library to transform numbers into Roman numerals / Super-Sub script / check if value is alpha or number
isnumber(input)
check to see if value is a number
Parameters:
input: (string/float/int) value to check
Returns: (na) if value is NOT a number and input (string/float/int) if value is a number
isalpha(input)
check a string if it is alpha(doesnt contain numbers)
Parameters:
input
Returns: (string) if string input does NOT contain numbers, return (na) if input string contains numbers
super(num)
convert a string's numbers from normal print to super-script [0⁰1¹2²3³4⁴5⁵6⁶7⁷8⁸9⁹]
Parameters:
num: (string/int/float) input value to transform
Returns: string of input with numbers converted to super-script
sub(num)
convert a string's numbers from normal print to sub-script [0₀1₁2₂3₃4₄5₅6₆7₇8₈9₉]
Parameters:
num: (string/int/float) input value to transform
Returns: string of input with numbers converted to sub-script
roman(num, trunc)
convert a string of numbers, float, or int
Parameters:
num: (string) input number to transform
trunc: (bool | false) true to truncate float value, false to show roman numerals with decimals (XX.VI)
Returns: string of roman numerals representing the input (num)
Phát hành các Ghi chú
v2Phát hành các Ghi chú
v3 commented out use case code for speedThư viện Pine
Theo tinh thần TradingView thực sự, tác giả đã xuất bản mã Pine này dưới dạng thư viện nguồn mở để các lập trình viên Pine khác trong cộng đồng của chúng tôi có thể sử dụng lại. Xin tri ân tác giả! Bạn có thể sử dụng thư viện này riêng tư hoặc trong các bài đăng nguồn mở khác. Tuy nhiên, bạn cần sử dụng lại mã này theo Nội quy chung.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Thư viện Pine
Theo tinh thần TradingView thực sự, tác giả đã xuất bản mã Pine này dưới dạng thư viện nguồn mở để các lập trình viên Pine khác trong cộng đồng của chúng tôi có thể sử dụng lại. Xin tri ân tác giả! Bạn có thể sử dụng thư viện này riêng tư hoặc trong các bài đăng nguồn mở khác. Tuy nhiên, bạn cần sử dụng lại mã này theo Nội quy chung.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.