Library "ObjectStack" init() push() push() push() push() push() nextIndex() nextIndex() nextIndex() nextIndex() nextIndex() delete() delete() delete() delete() delete() cleanOldest() cleanOldest() cleanOldest() cleanOldest() cleanOldest()
Currently in PineScript you cannot modify global variables in functions because of scope limitations. One way to work around that is to use arrays. This Library simplifies the use of arrays as global variables to make your code look cleaner. If you're coming from other programming languages, I'm sure you will come across this issue in your PineScript journey at...
Library "Debug_Window_Library" Provides a framework for logging debug information to a window on the chart. consoleWrite(txt, maxLines) Adds a line of text to the debug window. The text is rolled off the bottom of the window as it fills up. Parameters: txt : - this is the text to be appended to the window maxLines : - this is the size of the...
Library "ThangeVault" Thange Vault is a collection of utility functions required by the Thange Woodwind Playbook. debug(msg) Print debug information Parameters: msg : message to be logged on console Returns: nothing tickFormat() Create a string template to restrict stop-loss, take-profit level precision to ticks. Returns: A string format template
Library "bench" A simple banchmark library to analyse script performance and bottlenecks. Very useful if you are developing an overly complex application in Pine Script, or trying to optimise a library / function / algorithm... Supports artificial looping benchmarks (of fast functions) Supports integrated linear benchmarks (of expensive scripts) One...
DEBUGGER is a library to help print debug messages to a console. This library provides an easy-to-use interface to print your debugging messages to a console in the chart. Special attention has been given to printing series and arrays easily. A debugger is a valuable tool when working on scripts and getting into trouble. Unfortunately, TradingView does not...
Library "log" A Library to log and display messages in a table, with different colours. The log consists of 3 columns: Bar Index / Message / Log Credits QuantNomad - for his idea on logging messages as Error/Warnings and displaying the color based on the type of the message setHeader(_t, _location, _header1, _header2, _header3, _halign, _valign, _size) Sets...
Library "cache" A simple cache library to store key value pairs. Fed up of injecting and returning so many values all the time? Want to separate your code and keep it clean? Need to make an expensive calculation and use the results in numerous places? Want to throttle calculations or persist random values across bars or ticks? Then you've come to...
Library "log" Logging library for easily displaying debug, info, warn, error and critical messages. No real need to explain why you might want to use this library! I'm sure you've all experienced the frustration of trying to understand the data state of your scripts... so, enjoy! More on it's way... (Don't forget to check the helpers in the script and the...
Library "assert" Production ready assertions and auto-reporting for unit testing pine scripts. This library was born from the need to maintain production level stability and catch regressions / bugs early and fast. I hope this help you trust your pine scripts too. More libraries and tools on their way... please follow for more. Please see the script for...
Library "LibraryStopwatch" Provides functions to time the execution of a script. When timing scripts, keep in mind that the runtime environment is fluid on TradingView. Different servers or server loads will impact execution time. Look first. Then leap. stopwatchStats() Times the execution of a script. Returns: A tuple of four values:...
Library "DebugConsole" Methods for debuging/output into a table, console like style. init(size) initiate property variables. Parameters: size : int, console line size. Returns: tuple, table and string array. queue(console_id, new_line) Regular Queue, will be called once every bar its called. Parameters: console_id : string array, console...
Simple method I used to debug problem in my script. For loop generates 5 numbers from the given depth. At present, depth is 9 Rules for generating the combinations are as follows: First number is always 1 Two even numbers should not be adjacent to each other and two odd numbers should not be adjacent to each other Numbers should be ordered in...