TradingView had a long downtime today, which is finally resolved. We completely understand and accept that, at the end of it all, we are at fault. Clients don’t typically care why problems happen (as long as they are resolved quickly :) ), but it’s important to understand why to avoid them in the future.

One of our cloud service providers is Windows Azure, and all of our Azure machines stopped responding today. This is not what we expected at any point. After a lengthy escalation process with Microsoft, and great help from our mentors there, we were able to get the problem resolved. To answer the multiple complaints and advice from our users – we will do whatever we can to avoid being caught off guard in the future.

As a start to that process, we will roll out a backup channel for PRO and PRO Realtime users in the near future. That way stability for paid users who depend on the service will near 100%. In addition to that, all current PRO and PRO Realtime users will get a free month of service, as our way of saying “sorry”. Once we are able to afford a full backup channel, we will definitely get that up and running.

We appreciate your patience and understanding, and we promise to continue tirelessly building the best online platform and social network for traders ever! Thanks for being with us!

TradingView Team

There is a significant problem with our hosting services – Microsoft Azure. This has nothing to do with TradingView software or servers, so it’s completely out of our control (unfortunately). We are doing everything we can to get this issue resolved with them as soon as possible. Thank you for your patience.

1. Double-clicking on a symbol in watch list allows to change the symbol on all charts of the multi-charts layout.

2. Useful update for Mac users – now our application does not respond to standard Mac hotkeys.

3. New filters on the main page. Time and interval filters have been added. Now looking for great ideas is easier. We also added text format to ideas which made them more elegant.

 2014-03-20 22_42_45-TradingView_ Free Stock Charts and Forex Charts Online.

4. Long-awaited indicators added to Pine:

1) Woodie’s CCI

2) Vortex Indicator

3) Coppock Curve

4) Chop Zone

5) Least Squares Moving Average

6) Arnaud Legoux Moving Average

7) Chande Momentum Oscillator

8) Money Flow

9) True Strength Indicator

1. New Load Chart dialog replaces unhandy drop-down list. Now you have access to the search by chart name and by symbol, sorting and other features for easy management of saved charts.



2. Multi-chart improvements. Pro users now have access to two new layouts for 6 and 8 charts, cursor syncing based on the time of the bar as well as fast and convenient maximize option for any chart using a button in the bottom right corner.


3. New symbols connected: BTCUSD, LTCUSD and LTCBTC from Bitfinex.

4. New check box that allows switching between TTM and quarterly data has been added to Fundamentals indicators.


5. Video/audio calls – new free feature in private chats available for Firefox and Chrome users. Now you can communicate not only by typing, but also see and hear your trading friends and partners. You can choose to answer with video or audio only.


6. Elliott drawing tools have been reconsidered. Waves are numbered using the second point and not the first one as it was before.

7. Notification logic has been reconsidered. Your activity stream now is always at hand. You don’t need to leave the chart, just switch to the notification tab on the right side panel. Also, flexible notification configuration has been added to the widget heading. Advanced settings can be found on the Notifications tab in in your profile.


8. Data Window – new handy widget on the right side panel in chart mode. Shows info on all studies and symbols on your chart in the form of a table following your cursor movement. Also, we added a possibility to visibly highlight selected study. It can be selected by clicking on the chart or in Data Window. More than that, new widget allows you to make indicators invisible and show object properties by double-clicking on it.


9. Hide All Drawings – new button on the left panel that allows hiding all drawings. It does not change their visibility settings. All drawings are brought back to the chart when a new object is created.

10. Lock All Drawings Tools – locks all drawings on their current location which allows to scroll the chart not being afraid of accidentally moving an object.


This is a very robust review  in our opinion, so we are sharing with the TradingView community. Whether you have an active account with a broker, or considering one, it’s always good to have as much information as possible! Definitely give this review a good read.


Quoting from the opening letter:

Seeing the industry evolve and make positive changes is what we clamor for. Our yearly review is designed to serve two goals: push the industry forward, and help all of us as investors find the right broker for our needs.

Less the brokers themselves, we are the toughest critics. Our grading criteria, which includes several hundred variables, sorts through the fluff to identify the true leaders. With a “for traders, by traders” mentality, the yearly review has a reputation for being the toughest review in the industry, and we don’t plan on it changing anytime soon.

With more than 100,000 reads the past two years, I am proud of what we have accomplished. This year, we had one new broker join, Merrill Edge, and one broker drop out, Cobra Trading, resulting in once again 17 total brokers participating.

So who took the #1 spot Overall?

Head on over the 2014 Review and find out.

How does your broker stack up?


We’re proud to introduce a brand new and long-awaited feature – Multiple Charts Layout. Now you can plot up to 4 (four) charts in one tab of your browser. Moreover, it’s possible to link your charts by resolutions or symbols. Layouts and linking toolbar can be found on the bottom left corner, next to Load and Save buttons.

This new feature is still in beta testing and available for all the users, even to unregistered ones. Feel free to post your comments and requests. We will take all requests into account and will do our best to implement them in the release version.

IMPORTANT: after the final release, Multiple Charts Layout will be available in the PRO subscription only for $9 USD per month.


TradingView users can now access all kinds of economic data, including more than 100 reports. Public availability of reliable and up-to-date economic data is a big advantage for investors, since allows them to monitor economic developments and manage investment risk. Be a step ahead of the competition the best economic data on TradingView.


Sources of where we gather the reports:

FRED – Federal Reserve Economic Data

ISM – Institute for Supply Management

ADP – ADP Research Institute

WORLDBANK – World Bank

SANDP – Standard and Poor’s

FRBP- Federal Reserve Bank of Philidelphia

FRBNY – Federal Reserve Bank of New York

FRKC – Federal Reserve Bank of Kansas City


It’s been over a month since we launched the first beta version of Pine scripting language. We received a lot of positive responses, constructive criticism, and improvement suggestions. We worked hard and here’s the next update. New features include:

  • Inputs for scripted indicators

  • Working with the “security” function

  • Self Referencing variables

  • Multiline functions

  • Functions valuewhen and barssince

  • Bar coloring of data series – barcolor

  • Background coloring – bgcolor

  • Fixes the fill function

  • Improvements in arithmetic functions

  • Automatic type casting

 Now let’s look at each feature in more detail.


Inputs for scripted indicators

One of the first features that users asked for was the ability to add inputs to custom scripts, similar to the built-in indicators. You can edit the indicator inputs through the properties window, without needing to edit the Pine script. You can also specify the “title” of the input in the form of a short text string. The title is meant to explain the purpose of the input, and you can specify lowest and highest possible values for numerical inputs.

Instead of writing this in the code:

length = 20
mult = 2.0

You can declare variables length and mult as inputs:

length = input(20, minval=1, title=’Length’)
mult = input(2.0, minval=0.001, maxval=50, title=’Multiplier’)

Further usage of variables length and mult in the script of the indicator is just like any other variable. The indicator properties window now has an Inputs tab, where you can change the input values. The chosen values will be saved as defaults for all new instances of this indicator.

We edited the code of all standard scripts and added inputs. For example, here’s the MACD code:

study(title="Moving Average Convergence/Divergence", shorttitle="MACD")
source = close
fastLength = input(12, minval=1), slowLength=input(26,minval=1)
fastMA = ema(source, fastLength)
slowMA = ema(source, slowLength)
macd = fastMA - slowMA
signal = sma(macd, signalLength)
hist = macd - signal
plot(hist, color=red, style=histogram)
plot(macd, color=blue)
plot(signal, color=orange)

First argument of the input function is the default value of the input variable. Other arguments are options. So, for brevity you can write something like this:

i = input(5)
f = input(5.2)
b = input(true)

A more detailed description of all possible function arguments can be found through this link -

For now we added inputs of three types: whole numbers, floating point and boolean. Next we plan to add string, expression and symbol/ticker.

Working with the “security” function

Security function ( lets you receive data from additional symbols and resolutions, other than the ones to which the indicator is applied. It existed in the first version of Pine Script, but a number of technical difficulties allowed its use in only several of the simplest cases (see standard scripts Compare and Correlation Coeff). We released a number of improvements designed to broaden the possibilities of the security function.

The Advance Decline Line indicator is an example of a more advanced usage of the security function:

study(title = "Advance Decline Line", shorttitle="ADL")
sym(s) => security(s, period, close)
difference = (sym("ADVN") - sym("DECN"))/(sym("UNCN") + 1)
adline = cum(difference > 0 ? sqrt(difference) : -sqrt(-difference))

The script requests three securities at the same time. Results of the requests are then added to an arithmetic formula. As a result we have a stock market indicator used by investors to measure the number of individual stocks participating in an upward or downward trend (

Third parameter of the security function doesn’t have to be a simple open, high, low, close or volume. This can be any arithmetic expression or a function call. For example, with the help of security you can view a minute chart and display an SMA (or any other indicator) based on a any other resolution (i.e. daily, weekly, monthly).

study(title="High Time Frame MA", overlay=true)
src = close, len = input(9)
out = sma(src, len)
out1 = security(tickerid, 'D', out)

Self-Referencing variables

Sometimes it’s necessary to have something in an indicator that stores a status. To solve such issues we created self-referencing variables in Pine Script. A self-referencing variable is a variable that refers to its past values on previous bars from the right side of its declaration. For example:

srv = close + srv[1] + srv[2]

However, on the first bar there is no srv value, so the value srv[1] will be missing on the first bar (to be more precise it will be NaN – Not-A-Number). To change the NaN values it’s possible to turn call to previous values into a nz function ( as follows:

srv = close + nz(srv[1]) + nz(srv[2])

If you don’t, adding any number with NaN will result in NaN and other calculations won’t work.

With the help of self-referencing variables it’s possible to count all existing bars, although there’s a built-in variable n (

study(title="Bar Counter")
barn = na(barn[1]) ? 0 : barn[1] + 1

Or it’s possible to calculate the moving average without the built-in sma function:

study(title="Custom Simple MA", overlay=true)
len = input(9)
sum = nz(close) + nz(sum[1]) - nz(close[len])

Multiline functions

Pine Script language initially let you declare simple one-line functions, for example:

rnd(val) => val > .99 ? .999 : val < -.99 ? -.999 : val

Of course it’s difficult to do any sort of advanced calculations with just these. So we decided to expand the syntax of declaring functions by making them multiline. Here’s an example of a multiline function:

fun(x, y) =>
    a = x * x
    b = y * y
    sqrt(a + b)

The body of the function is comprised of several statements, each places on a separate line which begins with a tab or 4 spaces (we wanted to make the syntax similar to Python). Statements in the body of the function, except for the last one, must be declarations for variables. The last statement must be an expression, and this will be the value returned by the function. Syntax of one line functions is still supported.

Multiline functions together with self-referencing variables let us build the Connors RSI in Pine Script:

study(title="Connors RSI")
src = close, lenrsi = 3, lenupdown = 2, lenroc = 100
updown(s) =>
    isEqual = s == s[1]
    isGrowing = s > s[1]
    ud = isEqual ? 0 : isGrowing ? (nz(ud[1]) <= 0 ? 1 : nz(ud[1])+1) : (nz(ud[1]) >= 0 ? -1 : nz(ud[1])-1)
rsi = rsi(src, lenrsi)
updownrsi = rsi(updown(src), lenupdown)
percentrank = percentrank(roc(src, 1), lenroc)
crsi = avg(rsi, updownrsi, percentrank)
band1 = hline(70)
band0 = hline(30)
fill(band1, band0)

We are certain that our users will find lots of uses for multiline functions in Pine Script.

Valuewhen and barssince functions

Barssince function ( lets you receive the number of bars since some condition is filled, for example when close crossed with SMA.

study(title="barssince example")
cross_s = cross(close, sma(close, 20))

Valuewhen function ( returns the value of the specified series at the moment when the condition was filled. For example, the value of the bar when close crossed with SMA.

study(title="valuewhen example", overlay = true)
cross_s = cross(close, sma(close, 20))
plot(valuewhen(cross_s, close, 0), color=red, linewidth=3)

Third parameter lets you receive the value after a certain number of times a condition was filled. For example, her the close when it was crossed for the third time (countdown starts at 0, into history)

valuewhen(cross_s, close, 2)

A good example of valuewhen usage is the Divergence Indicator, which you can find in the list of standard scripts.

Barcoloring of series – barcolor

The long-awaited function barcolor lets you specify a color for a bar based on filling of a certain condition. You can use inside and Outside bars in different colors.

study(title="barcolor example", overlay = true)
isUp() => close > open
isDown() => close <= open
isOutsideUp() => high > high[1] and low < low[1] and isUp()
isOutsideDown() => high > high[1] and low < low[1] and isDown()
isInside() => high < high[1] and low > low[1]
barcolor(isInside() ? yellow : isOutsideUp() ? aqua : isOutsideDown() ? purple : na)

As you can seem, when passing the na value, the colors stay the default chart color.

Background coloring – bgcolor

Similar to the barcolor function, the background function changes the color of the background. Function will the color of that can be calculated in an expression, and an optional parameter transp – transparency from 0-100, which is 90 by default.

As an example, here’s a script for coloring trading sessions (use it on EURUSD, 30 min resolution)

study(title="bgcolor example", overlay=true)
timeinrange(res, sess) => time(res, sess) != 0
premarket = #0050FF
regular = #0000FF
postmarket = #5000FF
notrading = na
sessioncolor = timeinrange("30", "0400-0930") ? premarket : timeinrange("30", "0930-1600") ? regular : timeinrange("30", "1600-2000") ? postmarket : notrading
bgcolor(sessioncolor, transp=75)

Improvement of the fill function

Fill function lets you color the background between two series, or two horizontal lines (created with hline). In its first version, it was significnatly limited – it couldn’t be used more than once per script. That behavior was influenced strictly by technical limitations. Right now there are no limitations for the number of fills, which is shown by the following example:

study(title="Fill Example")
p1 = plot(sin(high))
p2 = plot(cos(low))
p3 = plot(sin(close))
fill(p1, p3, color=green)
fill(p2, p3, color=blue)
h1 = hline(0)
h2 = hline(1.0)
h3 = hline(0.5)
h4 = hline(1.5)
fill(h1, h2, color=yellow)
fill(h3, h4, color=lime)

Improvements in arithmetic functions

Thanks to our users who write scripts in Pine Script and tell us their feedback here, we’ve fixed a large number of issues. We added some new functions, which we didn’t have in the past. For example,

One of the most common problems is the calculation of the length, and then its usage in functions like sma, wma and others. For example:

length = input(9)
s = sma(close, round(sqrt(length)))

Most arithmetic functions in Pine Script return float (sqrt, exp, log, floor, ceil). However sma requires a second argument for length as a whole numbered value. Now you can get it using the function round.

We noticed the need for a round function in the first version of Pine Script after we tried to add the HullMA indicator.

study(title = "Hull MA", shorttitle="HMA", overlay = true)
source = close, length = input(9, minval=1)
hullma = wma(2*wma(source, length/2)-wma(source, length), round(sqrt(length)))

Now you can find the HullMA indicator among other built-in indicators: Open Script Editor, click New and choose HullMA in the list.


Automatic type casting

In the first version of Pine Script it was possible to calculate expressions like this:

s = close + 5

The built-in variable close has a series type. Type of the literal 5 – integer. This resulted in 5 being added to each close price, However, the next code was not performed.

s = 5

But because the plot function demands that the first argument be of the series type. We added the automatic type casting of the integer and float types in to the series type. Now it works.



PineScript – is a young, but fast-growing language meant for traders, We are constantly working on improving existing features, and adding new ones. We will always be listen to feedback in terms of features and bugs. You can submit bug reports here – Thank you for using TradingView!