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 functions. Yet we received a lot of feedback describing disadvantages of such approach and showing high demand on statements for loops.

Loop and mutable variables syntax is demonstrated below:

//@version=2
study("Simple Moving Average")
len = input(9)
sum = 0
for i = 0 to len-1
    sum := sum + close[i]
plot(sum/len)

sum’ is a mutable variable and a new value can be given to it by an operator  ‘:=’ in body of the loop.

Please note that we recommend to use a built-in function ‘sma’ for Moving Average as it calculates faster.

It’s just a very simple example, the loop doesn’t even return a value here (a = for …). You can use ‘break’ and ‘continue’ in loop body and set a step size for the counter (for … by 2). To learn more about loops and mutable variable, check our Tutorial.

Read more about the Pine Script Language in the Pine Script Tutorial and in the Pine Script Reference.

 

Dear Trader,

FXCM and TradingView invites you to an exclusive educational webinar on the top trading opportunities of 2016.

Join DailyFX’s Head Forex Trading Instructor, Jeremy Wagner, as he discusses the major fundamental drivers of the market and technical set-ups to look for this year. Register Now.

KEY FUNDAMENTALS COVERED IN THE WEBINAR

  • Monetary Policies – Find out which central banks are loosening/tightening and how diverging monetary policies may affect currencies such as USD, JPY, AUD, NZD, and GBP.
  • The China Story – Learn why China matters and how a slowdown in Asia may impact the FX and equities markets.
  • Brexit – Britain’s potential exit from the European Union could create major headwind for the Sterling. As we get closer to the EU referendum vote, uncertainty regarding the outcome could affect the value of the GBP.

IN THE WEBINAR, YOU WILL RECEIVE:

  • A 25 page report on the DailyFX top trades
  • 13 trade opportunities from the DailyFX team
  • Live chart analysis with key levels noted
  • Q&A opportunity with Head Forex Trading Instructor Jeremy Wagner

 

DAILYFX TOP TRADES OF 2016

Thursday, January 28
11:00 AM EST

REGISTER TODAY

 

Not a client of FXCM? Sign up for a demo or live account today to take advantage of today’s moves and benefit from FXCM’s acclaimed execution and superior trading resources, tools, and support.

Remember that forex trading can result in losses that could exceed your deposited funds and therefore may not be suitable for everyone, so please ensure that you fully understand the risks involved.

If you have any questions, please contact one of our specialists, who are available 24 hours a day, by live chat, by calling 1-888-503-6739, or by e-mail at info@fxcm.com

Did you know that it is possible to bind a text note to a symbol? You can easily do this from the right-click menu on chart or in Watchlist. You can also use keyboard shortcut (ALT+N) to quickly create a note on current symbol.

Symbols with notes have special icons in Watchlist:

Now if you point your mouse cursor on that icon, it will show the note header:

Click the icon to open it in the bottom panel.

Stay tuned for more improvements!

If you have multiple panes on your chart, it is now possible to maximize any of them to see more details.

To do this, simply double-click anywhere on the pane you want to maximize or click the icon in the top right corner:

When it is maximized, the icon turns blue. To minimize a pane to its original size, the same double click or icon click is needed.

TradingView charts have flexible settings that allow you to configure current chart for your needs: colors of text and background, vertical and horizontal grid lines, crosshair, price scale labels, etc.

Here is one more: now you can change font size for text on the price and time scales. It is available on the Background tab in chart properties:

Of course, you can save it as part of a template and apply the template (including all other settings) in couple of mouse clicks.

Stay tuned for more improvements!

You asked and we listened. The long-awaited check box that allows you to see real market price on Heikin Ashi chart type is finally available!

In chart properties you can check off “Show real prices on price scale (instead of Heikin-Ashi prices)”. If you do this and save the chart, this configuration will be used as default one for every new Heikin Ashi chart.

Important note! This checkbox affects only the current price label shown on the price scale.
Stay tuned for more improvements!

Dear Trader,

At last, it is here. The day that much of the economic world has been waiting for, in which the Federal Reserve is expected to, finally, raise the rates. The expectation is for a 25 basis point hike, but what isn’t known is what will happen thereafter. FXCM invites you to attend a special “FOMC Rate Decision” webinar to help you navigate through the chaos that follows.

Join James Stanley, an Active Trader and Trading Instructor at DailyFX, on Wednesday, December 16 at 1:45 pm EST.  In this free webinar, he will cover:

  • Real-time analysis around the most pivotal Fed meeting in years. The December FOMC meeting is expected to bring on heavy volatility, as the Federal Reserve looks at their first rate hike in over nine years.
  • Incorporating price action in real-time in order to integrate technical analysis during this market-moving fundamental event. Whether you’re a technical trader or a fundamental trader, both schools of analysis can offer value to an analytical approach.
  • Sound Risk Management principals to help you decide whether to pull the trigger based on your trading plan and approach. If you don’t have a plan, that’s ok. DailyFX is happy to provide a framework with which you can build that plan.  This research is built on the DailyFX Traits of Successful Traders research series, based on a quantitative study of real trades placed by actual traders.  If you’d like to read the research, it’s available here, and James will cover this in real-time during this webinar as Ms. Yellen and the Federal Reserve provides the last major market-moving event of the year.

Register Today

If you have any questions, please contact one of our specialists, who are available 24 hours a day by calling 1-888-503-6739 or by e-mail at info@fxcm.com.

Our service includes products that are traded on margin and carry a risk of losses in excess of your deposited funds. The products may not be suitable for all investors. Please ensure that you fully understand the risks involved.

To fight spam bots, ads and fake accounts, we implemented a new verification system as we previously anounced: Account verification on TradingView.

Some customers will see a verification popup. They should type in their cell phone numbers to receive a short code and enter this code on TradingView. Please note that we are not going to use your phones for sending spam. We also are not going to forward your phone numbers to any 3rd-party company or person.

We consider adding a two-factor authorization system (SMS) to enforce account protection in nearest future.

Let us know if you have any questions: support@tradingview.com

We have added major economic events right to your charts: 

jrffjho

You can find a calendar of events on the right panel: 

qyG4C40

Depending on the color indicator, events can be:

  • Red – very important
  • Yellow – important

They also are highlighted according to the following logic:

  • Light green – today events
  • Dark green – next event

It helps you to see a coming event in the list: 

uPJ2Kbk

You can configure the calendar to see only the info you need and hide everything else.

kqhnwep

Very important events are shown on your charts. You can configure this on Events & Alerts tab in chart properties. You can set chart either to show all events, or only coming events for your analysis.

a8AlQgo

Stay tuned for more improvements!

We have slightly changed the mechanism for selecting ideas to show on our home page. Previously, all ideas were viewed and suggested manually, but now we believe this approach must be changed because: a) it takes much time to moderate all ideas, b) our users has formed an advanced community that is capable to filter ideas on main page on its own. It means that from now on all ideas will automatically appear in Trending Feed right after they are posted, with no post-moderation. Those ideas will be sorted according their popularity among the community.

If an idea violates our House Rules, it is excluded from the feed, so please keep up following  the rules. Moderators will hide a published idea if it violates any of the following five (5) rules. A note will always be sent to the author in such a case. A publication should:

  • Be in the main language of the site section (for localized versions). English, for English, Japanese for Japanese, etc. The main section will be in English.
  • Be on topic and related to trading / the financial markets.
  • Contain content that is your original work.
  • Not contain excessive advertisement. Some references are allowed in moderation. Links to websites / materials should be at the end of the description and don’t put any logos / websites / company names on the chart itself.
  • Not be used to voice complaints, grievances or disagreements with policies, to insult or ridicule other members, or to create conflict within the community. This includes directly or indirectly mocking, misrepresenting or abusing other published ideas or analysis.

Any content that violates these rule may result in the author getting a warning, published idea being hidden, and/or limiting the author’s ability to post more ideas.

TradingView celebrates open communication and creative ideas. We want you to express yourself freely and use TradingView to share insights, learn from others, make friends and share the love for finance.

Click to tweet! -> http://ctt.ec/47aac 

Awesome free data from Quandl is now easily accessible through a tab in the Search window.

fd1peYB

 

Quandl is an open platform for data sets with free access to over 9 million of them. We thought it’s a good idea to make them available to the TradingView community at a touch of a button. Just open the tab and search what’s available. You can also filter by a specific data provider ON Quandl

V79V2Q5

 

The original provider is listed on each row, so you can easily find the exact info you need.

ltXUgRb

 

Quandl has a ton of statistical and economic data from many countries around the world. Read more about the benefits of Quandl here.

Dear Trader,

Many ‘scalpers’ struggle with risk, trade and money management. FXCM invites you to attend an educational “Short Term Trading and Scalping” webinar and learn how to potentially overcome these struggles while keeping your eyes on the prize.

Join James Stanley, an Active Trader and Trading Instructor at DailyFX on Wednesday, November 18 at 9:30am EST. Ask questions in real-time or be a fly on the wall watching him work the market.

In this webinar, he will teach you:

  • Short-Term Momentum Scalping in consideration of longer-term technical structures. James tries to ‘thread the needle’ of longer-term technical analysis with a shorter-term momentum-based entry approach.
  • Active implementation of DailyFX’s “Traits of Successful Traders”
  • Practical application of fundamental analysis in a short-term technical approach. News matters, and you can learn how to trade or fade near-term stimuli in a market.
  • Heavy reliance on price action, both long and short-term to set risk, plan targets, and base entries in a dynamic, real-time environment.

Register Today

If you have any questions, please contact one of our specialists, who are available 24 hours a day by calling 1-888-503-6739 or by e-mail at info@fxcm.com.

Our service includes products that are traded on margin and carry a risk of losses in excess of your deposited funds. The products may not be suitable for all investors. Please ensure that you fully understand the risks involved.

Please share! -> Click to Tweet

Now there are even more reasons to invite your friends! Help the community grow and make some money in the process.

If the person you invite signs up for an upgraded account, we’ll share 30% with you as a thank you. For life. That means as long as the account is active, you’ll continue to be rewarded. Life’s just getting better :)

Check out the Referral Program page for signing up.

Now you can add Text Notes directly on the chart.

Click New and write down your thoughts without launching another app.

 tnote1

You can also add a note by right-clicking on the chart.

Or right in the watchlist (symbol doesn’t have to be on the chart).

Symbols with notes are marked with a special symbol:

Note: only one Note per symbol.

You can always search for the notes that you need

Delete the note if you don’t need it anymore.

tnote2

Stay tuned for more improvements!

 

1. Added a new indicator to the RobBooker package.

New indicator from Rob Booker – Booker/Palladino Ghost Pivots.

Now you have even more tools for analysis within the same package!

2. New indicator package – CIT Toolbox.

The CIT Toolbox combines a mix of proprietary swing, pattern and trend trading indicators, and is designed to give users a complete and unique technical analysis perspective applicable to any instrument in any time frame.

The CIT Angles solve the key problem in dealing with Gann angles: finding the correct rise (step, rate of vibration) adapted to price level and volatility. The CIT Bars offer several improvements over Heikin-Ashi, Kagi and Renko bars. The CIT Pivots, Signals and Trend indicators will show you hidden support/resistance levels and optimal entry and exit points, and will eradicate subjectivity and emotion from your trading.

Market Reaction to FOMC Meetings by citdates on TradingView.com

USDJPY Continuing Consolidation by citdates on TradingView.com

Idea updates now have the same functionality as comments – if you post a link to an idea or snapshots it gets converted into a picture 

JKCfnYv

Notifications improvements

Reorganized the notification section to make it easier to understand. Also added a couple of sections – “Ideas you follow” and “People you follow”. Set them up as you like in your Profile Settings -> Notifications.

no3OCoz

 

Idea Status updates

Now you can mark your idea with the following:

  • Comment
  • Trade closed: target reached
  • Trade closed: stop reached
  • Closed manually
  • Trade active
  • Trade order cancelled

This will save a ton of time and make ideas more informative to your followers.

EeBx6hr

 

 

 

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 Script language in the very first line of code: //@version=2

Example:

//@version=2
study("if statement")
out = if close > open
    high
else
    low
plot(out)

You can read more about if statement in the Pine Script Tutorial.

If statement may be also useful in strategy trading:

//@version=2
strategy("My Strategy", overlay=true)
longCondition = crossover(sma(close, 14), sma(close, 28))
if (longCondition)
    strategy.entry("My Long Entry Id", strategy.long)
shortCondition = crossunder(sma(close, 14), sma(close, 28))
if (shortCondition)
    strategy.entry("My Short Entry Id", strategy.short)

You can read more about strategies in the Pine Script Tutorial and the Pine Script Reference

Day Trading the Forex Market
Thurs, October 15 | 11:00 AM EST

FXCM is excited to announce its partnership with Trading View and invite you to an exclusive educational webinar with Walker England, a Forex Trading Instructor for DailyFX, The Research Arm of FXCM Inc.

Register Now

Join Walker as he teaches you how to look for day trading opportunities in the forex market using Camarilla pivot points. This session will cover support and resistance, breakout and range-based strategies and risk management for the Forex market.

AT THE WEBINAR, YOU WILL LEARN:

  • What is Day Trading and what are the Available Strategies
  • Price Action Methods and Importance of Time Frames
  • Intro to Pivots
  • Day Trading Ranges
  • Basic Breakout Strategies

DAY TRADING THE FOREX MARKET
Thursday, October 15
11:00 AM EST
REGISTER TODAY

If you have any questions, please contact one of our specialists, who are available 24 hours a day by calling 1-888-503-6739 or by e-mail at info@fxcm.com.

 

This digest bringing you some of the top Trading ideas every week- generated by users, picked by analysts. Actionable, easy, useful. Now you will be able to see the most exciting ideas even if you don’t have enough time to look for them on TradingView. If you’d like your idea to be a part of the digest, please follow our House Rules when publishing an idea.

Picks From Community Top Authors

Gold XAUUSD Bullish Signals triggered, 1187 tgt, more buys ahead By timwest
Looks good, already half way to target …

EURUSD: What We’ve Had & What We Have Next By Akil_Stokes
EURUSD potential trade for this week..

Great Trades and Insightful Analysis

How To Trade The Bat Pattern By TomHall
Stunning 70+ likes for this detailed tutorial.. Check it out, it is worth it…

NZDUSD: Nice Week Buy Position, Wait Before Buying More By Tom_Killick
Tom provides a detailed explanation for the NZDUSD technical position. It’s helpful…

Gold@ Wave 3 in Wave 3 Combined With Breakout By Eleven40_FXTrader
Another bullish outlook for gold..

EURUSD Pivots Near 1.1330 Wave Confluence By JWagnerFXTrader
Elliott wave count for the EURUSD..
How to trade using EARNINGS REPORTS together with trend By timwest
A great tutorial..
Gartley Adventure // Bullish By Trading_Jazz
Trading_Jazz Nailed it…

In Scripts and Custom Indicators

[STRATEGY][RS]MicuRobert EMA cross V2 By MicuRobert