Pine Script

Pine Script Summer cleanup in the public script library!

A new feature that lets Pine developers update their published scripts was announced. Many found it helpful and took advantage of it. This is important because now updates don’t need to be published as separate scripts. Some indicators using the update feature: Volume Balance Indicator by Stealthy7 Price Divergence Detector...

June 28, 2017

Pine Script New Update feature makes life easier for Pine Script developers

Pine Script devs who publish scripts – the new Update button lets you add functionality or update your script without publishing a new one. Simply click the “Update existing script” (1) when publishing and select which script to update (2). Script users will receive all updates automatically, and avoid any...

June 9, 2017

Pine Script More possibilities with compile time constants

Pine Script used to have 3 types of constants – literal, non-literal and serial. Now there’s one more, but let’s look at existing ones first. The literal type includes fixed values such as 15.5, -2. The non-literal type has a single value on all bars but isn’t a literal e.g....

May 17, 2017

Pine Script Several new features added to the Pine scripting language

A new “barstate.isconfirmed” variable has been added to the list of variables that return bar status (barstate.isrealtime, barstate.ishistory, barstate.islast etc.). It lets you create indicators that are calculated based on the closed (or updatable) bars only. “Barstate.isconfirmed” value is false when the bar is being updated in real-time except for...

April 26, 2017

Pine Script Kwargs syntax now covers all built-in functions

Pinescript had different calls for annotation functions (study, plot,…) and built-in functions (sma, security, …) up until now. Annotation functions used to accept keyword arguments while built-in functions didn’t. You are now able to call all built-in functions using keyword arguments. This will be especially useful for the security function...

April 17, 2017

Pine Script Introducing PineScript Version 3

A new version 3 of PineScript is here! Some exciting features in this new version include: We’ve fixed the way security function behaves while working with the historical data. Find out more on our wiki. An implicit conversion of boolean values to numeric values was replaced with an implicit conversion...

March 20, 2017

Pine Script New features and improvements in strategy backtesting

Strategy calculation algorithms and in trading results report have a lot of new improvements. Enjoy! New “Buy & Hold” equity graph – a new graph (1) lets you compare performance of your strategy versus a “buy and hold”, i.e if you just bought a security and held onto it without...

February 8, 2017

Pine Script Introducing Pine Indicators with Managed Access

Earlier we announced Pine scripts with protected source code and now it’s time for the next step. Now authors can manage who can access their indicators. This is great for commercial vendors, or authors who want to protect their IP, or share with only a few select people – the...

December 1, 2016

Pine Script Pine indicator versions introduced

Good news for indicators developers in Pine! Now you don’t need to save countless versions of your indicators in your library, you can switch between saved versions right in the Pine Editor. You can look up the number of the latest version in the “Open Script” window. More improvements coming...

October 18, 2016

Pine Script Protected source code for Pine indicators

Now you can publish indicators with protected source code. This is a high-demand feature that lets you share knowledge and protect intellectual property at the same time. These indicators are available in the public Script Library, and any user can use it, but only the author can see the source...

September 29, 2016
#Pine  #indicators  #scripts  

Pine Script Multiple colors added to fill() and an updated Ichimoku cloud

You now can set a different fill color on each bar with the fill() function. Usage example: //@version=2 study(title=”Colored fill”) p1 = plot(high) p2 = plot(low) fill(p1, p2, color = close>open ? green : red) For more information check out Pine Script tutorial and the documentation. This function, for example,...

July 20, 2016

Pine Script New variables in Pine

At your requests, we have added built-in variables in Pine language, which helps to define current bar state. The variables are: barstate.isfirst – true if a current bar is the first in the range of bars, otherwise – false barstate.islast – true if a current bar is the last in...

June 8, 2016

Pine Script Transparency in Pine Scripts

Color type variables now have an additional parameter to set default transparency. There are 2 ways to configure transparency level: 1. #FFA50040 – the last 2 digits stand for 64% transparency (in hexadecimal system) for orange color (in RGBA format) bgcolor (#FFA50040) 2. You can use the ‘color’ function to change...

March 15, 2016

Pine Script PINE: loops and mutable variables

We have updated Pine Script. The latest version contains the long-awaited features: loops and mutable variables. Besides, we released multiple improvements and bug fixes for strategies. As you know, Pine Script is a series-oriented scripting language, where most of goals are achieved by converting series values with help of built-in...

February 4, 2016

Pine Script Alerts in Pine!

We have added the annotation function alertcondition allows you to create custom alert conditions in Pine studies. The function has the following signature: alertcondition(condition, title, message) ‘condition’ is a series of boolean values that is used for alert. Available values: true, false. True means alert condition is met, alert should...

January 22, 2016

Pine Script New feature of Pine Script Language: if statement

Working with code becomes more and more flexible! If-statement is now available in Pine Script language. This statement defines what block of statements must be checked when conditions of the expression are satisfied. Attention! To have access to and use the if statement, one should specify the version of Pine...

October 22, 2015

Pine Script Strategy Backtesting Beta Release

Great news! We have released the long-awaited Backtesting feature in beta-testing mode! It allows you to create trading strategies in Pine Script. A strategy is a study that can send, modify and cancel orders (to buy/sell). Strategies allow you to perform Backtesting (emulation of strategy trading on historical data) and...

September 28, 2015

Pine Script New feature of Pine Script Language: parameter “editable”

Our users have written amazing codes on Pine Script Language, which can be accessed right from your chart by clicking “Indicators”: At the moment Public Library has over 1 500 codes, which are free for every user of TradingView. Most of them have multiple outputs. We have added the parameter “editable”...

July 8, 2015

Pine Script New feature of Pine Script Language: custom OHLC bars and candles

Added the ability to define your own custom bars and candles to Pine. study(“plotbar example”) palette = open <= close ? blue : orange plotbar(open, high, low, close, color=palette, title=”My Bars”) study(“plotcandle example”) len = input(7, minval=1, title=”Length”) src = input(close, title=”Source”) o = open h = high l =...

June 25, 2015

Pine Script Pine script improves: “step” argument for inputs

Pine language becomes more and more flexible! Now you can define step size for each input: study(title=”Parabolic SAR”, shorttitle=”SAR”, overlay=true) start = input(0.02, step=0.01) increment = input(0.02, step=0.01) maximum = input(0.2, step=0.1) out = sar(start, increment, maximum) plot(out, style=cross, color=blue) You can read more about Pine Script Language in the...

April 15, 2015