Provides unbound methods (no error checking) to parse a string into a float or int matrix.
to_matrix_float(str, interval_sep, start_tk, end_tk)
Parse a string into a float matrix.
str : , string, the formated string to parse.
interval_sep : , string, cell interval separator token.
start_tk : ,...
Hash map's in Pinescript?? Absolutely
This Library is the first step towards bringing a much needed data structure to the Pine Script community.
"Object" allows Pine coders to finally create objects full or unique key:value pairs, which are converted to strings and stored in an array. Data can be stored and accessed using dedicated get and set methods.
Provides functions for converting input strings 'open','high','low','close','hl2','hlc3','ohlc4','hlcc4' to corresponding source values.
Converts string to source float value
src : String to use (`close` is used if no argument is supplied).
Returns: Returns the float value of the string
This library is a client script for making a webhook signal formatted string to TradingHook webhook server.
buy_message(password, amount, order_name) Make a buy Message for TradingHook.
password : (string) password that you set in .env file.
amount : (float) amount. If not set, your strategy qty will be...
This library is a Pine Script™ programmer’s tool containing a variety of time related functions to calculate or measure time, or format time into string variables.
`formattedTime()`, `formattedDate()` and `formattedDay()`
Pine Script™, like many other programming languages, uses timestamps in UNIX format, expressed as the...
This library provides string manipulation functions to complement the Pine Script™ `str.*()` built-in functions.
At the time our String Manipulation Framework was published, there was little in the way of built-in functions to manipulate strings. Since then, we have witnessed several meaningful developments on this front by the...
This Library is aimed to mitigate the limitation of Pinescript having only one structured data type which is only arrays.
It lacks data types like Dictionaries(in Python) or Object (in JS) that are standard for other languages. Tuples do exist, but it hardly solves any problem.
Working only with Arrays could be overwhelming if your codebase is large. I looked for...
Common String Functions Library by RagingRocketBull 2021
Pinescript now has strong support for arrays with many powerful functions, but still lacks built-in string functions. Luckily you can easily process and manipulate strings using arrays.
This script provides a library of common string functions for everyday use, such as: indexOf, substr, replace,...
Multi Bar OHLC Compare Panel by RagingRocketBull 2019
This indicator lets you compare OHLCV values from several specified bars. Bars can be dynamic/persistent.
You can also use it as an alternate OHLC panel if you don't like small font of the native TradingView panel.
It uses Pinescript v4 to output data dynamically as string labels in a...
Convert JSON strings to tradingview
▦ FEATURES ▦
█ Json to array █ Get json key names █ Get json key values █ Size of json
get_json_keys_names(raw_json) Returns string array with all key names
raw_json : (string) Raw JSON string
Returns: (string array) Array with all...
Array element wise basic operations.
add(sample_a, sample_b) Adds sample_b to sample_a and returns a new array.
sample_a : values to be added to.
sample_b : values to add.
Returns: array with added results.
- sample_a provides type format for output.
- arrays do not need to be symmetric.
- sample_a must...
A small method to translate strings to numbers.
For example, we have a string:
s = "321"
To check if the last symbol is "1", we might just try to remove (or replace with an empty string) the symbol "1". If the string changed, then there was the symbol "1" in the string:
s2 = str.replace_all (s, "1", "")
now s2 is "32", so
s == s2 returns false.
But we can't...
Encode a string to an ascii array and decode the ascii array to a string.
Reads ascii 32 to 126.
Takes a long time to execute. You may get the "Loop is too long (> 200 ms)" execution error.
You can change the loop to iterate fewer times thereby shorten the string length.
you can limit the characters converted.
THIS IS AN ABSOLUTE KLUDGE.
A simple hashmap implementation for pinescript.
It gets your string array and transforms it into a hashmap.
Before using it you need to initialize your array with the size you need for your specific case since the size is not dynamic.
To use it, first you need to import it the following way:
> import marspumpkin/hashmaps/1
Then, initialize your array with the...
PineScript Object Notation
A workaround not having objects in pinescript.
This is a Json-look-alike interpreter.
You can add new attributes, get the value in those attributes, set new values to existing attributes and check if an attribute exists.