Common String Functions Library by RagingRocketBull 2021 Version 1.0 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,...
This is just a script to exercise the use of arrays on pine script. I think we could say that every for loop we had in pine script before the arrays, is eligible to become an array. Our script will get more efficient and more reliable. As every "if" case is elegible to became a function I confess I was addicted to use if, else if, else in my codes, but recently...
Using the new Pine Script array built-ins to join string elements together for label text. The array is sliced to remove extraneous elements.
Main utility: legibility in alerts where certain values are not truncated. It may prove helpful if tostring() is unavailable for use as well.
Demo 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. OR you can limit the characters converted. THIS IS AN ABSOLUTE KLUDGE. Just showing...
What do you think of Pine Script? Here's your chance to let off some steam if your frustrated with the limitations of Pine Script. This script stores a text string in a array. Unfortunately tradingview doesn't think anything useful can be done with strings. This is merely a demo of storing a string in an array. There currently seems to be no way to get an...
A label function for display an arbitrary value above or below the chart. There is no convenient way to display the value of a variable in pinescript. This is most convenient way I found. It will follow the current bar (the position is calculated with highest/lowest and atr value, as such it will never display over the chart) In this script we display ATR for...
FundCandlesV1sloth288 is an indicator I decided to put together so I can track how funds are doing on $GVT Genesis Vision. Using a standard MACD or RSI indicator you can change source to use the FundsCandles values to determine if its a good time to enter or exit different funds on the platform. What you need to know... Currently all securities need to pair the...
Horizontal line for previous daily, weekly or monthly high. By default : Green Label - previous 1 day high Yellow Label - previous 1 week high Red Label - previous 1 month high Each number and color can be change in setting.
Round function in PineScript is very simple and allows you to round numbers only to the closest integer number. This is a bit irritating because I very often have to round numbers to some decimal places and not integer. So I created 2 functions I use all the time and now sharing them with you. roundn - rounds the values in its first argument to the...
This is just published for visibility as a public service until the Pine devs are able to fix or document this behavior. The barssince() function returns different values when inside a conditional context. As long as it can be documented (and relied upon), this could be a pretty cool feature, but right now this is now how I read the help documentation to...
This is a developer friendly solution to the current PineScript limitation of not being able to easily configure presets for multiple timeframes. If you're developing multi-timeframe strategies then you've no doubt done battle with built-in `input` function which only allows for a single default value. You've probably come up with all kinds of fancy workarounds,...
TradingView backtester has bad reputation. For a good reason - it was producing wrong results, and it was clear at first sight how bad they were. But this has changed. Along with many other improvements in its PineScript coding capabilities, TradingView fixed important bug, which was the main reason for miscalculations. TradingView didn't really speak out about...
Short Summary This indicator takes the differences in the previous 4 period OHLC inputs, and compares them to the previously closed candle input. The difference is then placed into an oscillator that when all four inputs are scrolled back on, shows an EKG appearing oscillator / volatility measure for traders to use on indexes, tickers and markets that do not...
Hello traders This is a Pine adaptation of this FXCM LUA indicator Seems to be made mostly for tick data (< 1 min timeframe) and advanced scalpers Always interesting to see that Pinescript is much easier than most of other trading programming languages out there :) PS You might like checking the data window panel from TradingView and mouseover your cursor...
This script was built using a logical approach to trading systems. All the details can be found in a step by step guide below. I hope you enjoy it. I am really glad to be part of this community. Thank you all. I hope you not only succeed on your trading career but also enjoy it. docs.google.com
FIRST OF ALL, THIS NOT AN INDICATOR! This is in XML format as a "utilitarian developer tool add-on" for Notepad++ editor for viewing Pine Script on 4K screens, but 4K isn't REQUIRED to use this. For all Notepad++ enthusiasts out there utilizing Pine Script, I present a UDL(User Defined Language)... for Notepad++... for Pine Script v4.0... on 4K LCDs. This is...
A Basic 3 EMA Study / Indicator built in version 4 of Pinescript. Individual color changing lines based on the position of the price (close) relative to each specific EMA Alerts can be set for either - All Signals Bullish - All Signals Bearish I try to keep my code clean and readable with comments and always enjoy seeing what others do with it. Please give...