PINE LIBRARY
ที่อัปเดต: lib_array

Library "lib_array"
several array functions for chained calls, batch conversion, incrementing and comparing arrays.
method sort(id, descending)
Namespace types: int[]
Parameters:
id (int[]): The array to sort (and return again)
descending (bool): The sort order: order.ascending (default:false, meaning omit this param and just call myArray.sort()) or order.descending => set descending=true
return The array that was passed as parameter id
method sort(id, descending)
Namespace types: float[]
Parameters:
id (float[]): The array to sort (and return again)
descending (bool): The sort order: order.ascending (default:false, meaning omit this param and just call myArray.sort()) or order.descending => set descending=true
return The array that was passed as parameter id
method sort(id, descending)
Namespace types: string[]
Parameters:
id (string[]): The array to sort (and return again)
descending (bool): The sort order: order.ascending (default:false, meaning omit this param and just call myArray.sort()) or order.descending => set descending=true
return The array that was passed as parameter id
method increment(id, by_value)
Namespace types: int[]
Parameters:
id (int[]): The array to increment (and return again)
by_value (int): The value by which to increment (default: 1)
return The array that was passed as parameter id
method increment(id, by_value)
Namespace types: float[]
Parameters:
id (float[]): The array to increment (and return again)
by_value (float): The value by which to increment (default: 1.0)
return The array that was passed as parameter id
method decrement(id, by_value)
Namespace types: int[]
Parameters:
id (int[]): The array to increment (and return again)
by_value (int): The value by which to increment (default: 1)
return The array that was passed as parameter id
method decrement(id, by_value)
Namespace types: float[]
Parameters:
id (float[]): The array to increment (and return again)
by_value (float): The value by which to increment (default: 1.0)
return The array that was passed as parameter id
method toint(id)
Namespace types: string[]
Parameters:
id (string[]): The array to convert
method toint(id)
Namespace types: float[]
Parameters:
id (float[]): The array to convert
method tofloat(id)
Namespace types: string[]
Parameters:
id (string[]): The array to convert
method tofloat(id)
Namespace types: int[]
Parameters:
id (int[]): The array to convert
method tostring(id)
Namespace types: int[]
Parameters:
id (int[]): The array to convert
method tostring(id)
Namespace types: float[]
Parameters:
id (float[]): The array to convert
method tobool(id)
Namespace types: float[]
Parameters:
id (float[]): The array to convert
method tobool(id)
Namespace types: int[]
Parameters:
id (int[]): The array to convert
method tobool(id)
Namespace types: string[]
Parameters:
id (string[]): The array to convert
method sum(id)
Namespace types: bool[]
Parameters:
id (bool[]): The array to convert
method enqueue(id, item, max, condition, lifo)
Namespace types: int[]
Parameters:
id (int[]): The array that is used as queue
item (int): The item to enqueue (at pos 0, unless lifo = true)
max (int): The max size of the queue
condition (bool): An optional flag that allows disabling the adding, which in turn will prevent for in loops from ever running and save performance where not needed
lifo (bool): An optional flag that allows to change the behavior from First In Last Out (default and consistent with pine scripts history operator with most recent elements at index 0) to a more common and resource efficient approach in programming languages: Last In First Out
Returns: The queue passed as param id
method enqueue(id, item, max, condition, lifo)
Namespace types: float[]
Parameters:
id (float[]): The array that is used as queue
item (float): The item to enqueue (at pos 0, unless lifo = true)
max (int): The max size of the queue
condition (bool): An optional flag that allows disabling the adding, which in turn will prevent for in loops from ever running and save performance where not needed
lifo (bool): An optional flag that allows to change the behavior from First In Last Out (default and consistent with pine scripts history operator with most recent elements at index 0) to a more common and resource efficient approach in programming languages: Last In First Out
Returns: The queue passed as param id
method enqueue(id, item, max, condition, lifo)
Namespace types: string[]
Parameters:
id (string[]): The array that is used as queue
item (string): The item to enqueue (at pos 0, unless lifo = true)
max (int): The max size of the queue
condition (bool): An optional flag that allows disabling the adding, which in turn will prevent for in loops from ever running and save performance where not needed
lifo (bool): An optional flag that allows to change the behavior from First In Last Out (default and consistent with pine scripts history operator with most recent elements at index 0) to a more common and resource efficient approach in programming languages: Last In First Out
Returns: The queue passed as param id
method enqueue(id, item, max, condition, lifo)
Namespace types: line[]
Parameters:
id (line[]): The array that is used as queue
item (line): The item to enqueue (at pos 0, unless lifo = true)
max (int): The max size of the queue
condition (bool): An optional flag that allows disabling the adding, which in turn will prevent for in loops from ever running and save performance where not needed
lifo (bool): An optional flag that allows to change the behavior from First In Last Out (default and consistent with pine scripts history operator with most recent elements at index 0) to a more common and resource efficient approach in programming languages: Last In First Out
Returns: The queue passed as param id
method enqueue(id, item, max, condition, lifo)
Namespace types: box[]
Parameters:
id (box[]): The array that is used as queue
item (box): The item to enqueue (at pos 0, unless lifo = true)
max (int): The max size of the queue
condition (bool): An optional flag that allows disabling the adding, which in turn will prevent for in loops from ever running and save performance where not needed
lifo (bool): An optional flag that allows to change the behavior from First In Last Out (default and consistent with pine scripts history operator with most recent elements at index 0) to a more common and resource efficient approach in programming languages: Last In First Out
Returns: The queue passed as param id
several array functions for chained calls, batch conversion, incrementing and comparing arrays.
method sort(id, descending)
Namespace types: int[]
Parameters:
id (int[]): The array to sort (and return again)
descending (bool): The sort order: order.ascending (default:false, meaning omit this param and just call myArray.sort()) or order.descending => set descending=true
return The array that was passed as parameter id
method sort(id, descending)
Namespace types: float[]
Parameters:
id (float[]): The array to sort (and return again)
descending (bool): The sort order: order.ascending (default:false, meaning omit this param and just call myArray.sort()) or order.descending => set descending=true
return The array that was passed as parameter id
method sort(id, descending)
Namespace types: string[]
Parameters:
id (string[]): The array to sort (and return again)
descending (bool): The sort order: order.ascending (default:false, meaning omit this param and just call myArray.sort()) or order.descending => set descending=true
return The array that was passed as parameter id
method increment(id, by_value)
Namespace types: int[]
Parameters:
id (int[]): The array to increment (and return again)
by_value (int): The value by which to increment (default: 1)
return The array that was passed as parameter id
method increment(id, by_value)
Namespace types: float[]
Parameters:
id (float[]): The array to increment (and return again)
by_value (float): The value by which to increment (default: 1.0)
return The array that was passed as parameter id
method decrement(id, by_value)
Namespace types: int[]
Parameters:
id (int[]): The array to increment (and return again)
by_value (int): The value by which to increment (default: 1)
return The array that was passed as parameter id
method decrement(id, by_value)
Namespace types: float[]
Parameters:
id (float[]): The array to increment (and return again)
by_value (float): The value by which to increment (default: 1.0)
return The array that was passed as parameter id
method toint(id)
Namespace types: string[]
Parameters:
id (string[]): The array to convert
method toint(id)
Namespace types: float[]
Parameters:
id (float[]): The array to convert
method tofloat(id)
Namespace types: string[]
Parameters:
id (string[]): The array to convert
method tofloat(id)
Namespace types: int[]
Parameters:
id (int[]): The array to convert
method tostring(id)
Namespace types: int[]
Parameters:
id (int[]): The array to convert
method tostring(id)
Namespace types: float[]
Parameters:
id (float[]): The array to convert
method tobool(id)
Namespace types: float[]
Parameters:
id (float[]): The array to convert
method tobool(id)
Namespace types: int[]
Parameters:
id (int[]): The array to convert
method tobool(id)
Namespace types: string[]
Parameters:
id (string[]): The array to convert
method sum(id)
Namespace types: bool[]
Parameters:
id (bool[]): The array to convert
method enqueue(id, item, max, condition, lifo)
Namespace types: int[]
Parameters:
id (int[]): The array that is used as queue
item (int): The item to enqueue (at pos 0, unless lifo = true)
max (int): The max size of the queue
condition (bool): An optional flag that allows disabling the adding, which in turn will prevent for in loops from ever running and save performance where not needed
lifo (bool): An optional flag that allows to change the behavior from First In Last Out (default and consistent with pine scripts history operator with most recent elements at index 0) to a more common and resource efficient approach in programming languages: Last In First Out
Returns: The queue passed as param id
method enqueue(id, item, max, condition, lifo)
Namespace types: float[]
Parameters:
id (float[]): The array that is used as queue
item (float): The item to enqueue (at pos 0, unless lifo = true)
max (int): The max size of the queue
condition (bool): An optional flag that allows disabling the adding, which in turn will prevent for in loops from ever running and save performance where not needed
lifo (bool): An optional flag that allows to change the behavior from First In Last Out (default and consistent with pine scripts history operator with most recent elements at index 0) to a more common and resource efficient approach in programming languages: Last In First Out
Returns: The queue passed as param id
method enqueue(id, item, max, condition, lifo)
Namespace types: string[]
Parameters:
id (string[]): The array that is used as queue
item (string): The item to enqueue (at pos 0, unless lifo = true)
max (int): The max size of the queue
condition (bool): An optional flag that allows disabling the adding, which in turn will prevent for in loops from ever running and save performance where not needed
lifo (bool): An optional flag that allows to change the behavior from First In Last Out (default and consistent with pine scripts history operator with most recent elements at index 0) to a more common and resource efficient approach in programming languages: Last In First Out
Returns: The queue passed as param id
method enqueue(id, item, max, condition, lifo)
Namespace types: line[]
Parameters:
id (line[]): The array that is used as queue
item (line): The item to enqueue (at pos 0, unless lifo = true)
max (int): The max size of the queue
condition (bool): An optional flag that allows disabling the adding, which in turn will prevent for in loops from ever running and save performance where not needed
lifo (bool): An optional flag that allows to change the behavior from First In Last Out (default and consistent with pine scripts history operator with most recent elements at index 0) to a more common and resource efficient approach in programming languages: Last In First Out
Returns: The queue passed as param id
method enqueue(id, item, max, condition, lifo)
Namespace types: box[]
Parameters:
id (box[]): The array that is used as queue
item (box): The item to enqueue (at pos 0, unless lifo = true)
max (int): The max size of the queue
condition (bool): An optional flag that allows disabling the adding, which in turn will prevent for in loops from ever running and save performance where not needed
lifo (bool): An optional flag that allows to change the behavior from First In Last Out (default and consistent with pine scripts history operator with most recent elements at index 0) to a more common and resource efficient approach in programming languages: Last In First Out
Returns: The queue passed as param id
เอกสารเผยแพร่
v2- update to pine v6
- added enum QueueMode
- fixed function descriptions not displaying
เอกสารเผยแพร่
v3 updated function parameter descriptions for enqueue(mode)ไลบรารีไพน์
ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนได้เผยแพร่ Pine code นี้เป็นโอเพนซอร์สไลบรารีเพื่อให้ Pine โปรแกรมเมอร์คนอื่นในชุมชนของเราสามารถนำไปใช้ซ้ำได้ ต้องขอบคุณผู้เขียน! คุณสามารถใช้ไลบรารีนี้ในแบบส่วนตัวหรือในการเผยแพร่แบบโอเพนซอร์สอื่น ๆ แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน
ไลบรารีไพน์
ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนได้เผยแพร่ Pine code นี้เป็นโอเพนซอร์สไลบรารีเพื่อให้ Pine โปรแกรมเมอร์คนอื่นในชุมชนของเราสามารถนำไปใช้ซ้ำได้ ต้องขอบคุณผู้เขียน! คุณสามารถใช้ไลบรารีนี้ในแบบส่วนตัวหรือในการเผยแพร่แบบโอเพนซอร์สอื่น ๆ แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน