Curriculum
Course: Trading Charts
Login

Curriculum

Trading Charts

Video lesson

Find Profitable Indicators & Strategies

Community Scripts: Coding Indicators in TradingView

In today’s fast-paced world of trading, the ability to customize strategies and make informed decisions is crucial for success. One platform helping traders to harness this power is TradingView, which not only allows users to share and access a vast library of free community scripts but also provides the tools necessary for coding personal indicators using PineScript. Understanding how these community scripts function and how to code your own is essential—not just in traditional finance but also in the innovative realm of cryptocurrencies, where custom indicators can lead to enhanced trading strategies and insights.

Core Concepts

  1. PineScript: This is a proprietary programming language exclusive to TradingView. In traditional finance, coding is used to create algorithms that automate trading strategies. In the crypto world, PineScript offers similar functionalities, allowing users to customize indicators to suit their trading style and backtest strategies with historical data.

  2. Indicators: Indicators are tools that help traders analyze market conditions and price movements. In traditional finance, these might be moving averages or momentum indicators. In crypto, indicators can include price tracking tools such as Relative Strength Index (RSI) or Moving Average Convergence Divergence (MACD), which can be coded in PineScript for personalized analysis.

  3. Strategies: Strategies are defined plans of action based on specific indicators. In traditional trading, a strategy might be to buy when a specific moving average crosses another. In the crypto space, strategies can be similarly coded and tested to ensure they work under different market conditions.

  4. Community Scripts: These are scripts shared by other TradingView users that anyone can access for free. Popular in both traditional and crypto-based platforms, these scripts can provide instant insights from collective user experience and data analysis.

  5. Open Source: Open sourcing code means making it available for others to view, use, and modify. In traditional finance, it allows for adaptability and improvement of trading algorithms. In crypto, couples this with community-based engagement, leading to further innovation in indicator development and trading strategies.

  6. Libraries: Libraries in programming are collections of pre-written code that can be reused. Just as a trader may rely on established formulas in traditional finance, a coder can use libraries in PineScript to streamline their coding process, particularly beneficial in crypto where innovation occurs rapidly.

Key Steps

Understanding PineScript and Community Scripts

  • What is PineScript?

    • Proprietary coding language for TradingView.
    • Allows creation and customization of indicators.
  • Accessing Community Scripts

    • Navigate to the TradingView community page to explore over 100,000 scripts.
    • Sort by popularity or by editor’s picks for top recommendations.
  • Usage of Indicators

    • Each script is accompanied by a description and visuals that explain how it functions.
    • Pay attention to the coder’s information and the nature of the script (indicator or strategy).
    • PineScript offers significant parallels in the crypto world, where custom coding can lead to tailored insights. For example, a popular script for tracking Bitcoin’s price movements could be modified to incorporate additional indicators, enhancing its predictive capabilities.

Navigating the Indicators and Strategies Page

  • Filtering Options

    • Sort scripts by Most Popular, Editor’s Picks, or those from users you follow to find suitable scripts.
    • Utilize the open-source feature to ensure you can access and analyze the code.
  • Favorites and Customization

    • Favoriting scripts allows for easy access during trading.
    • Custom layouts can be created using multiple indicators to optimize trading setups.
    • Similar strategies in the crypto trading realm allow users to tailor their dashboards in analysis platforms, such as integrating specific token indicators, facilitating better decision-making when trading volatile assets.

Creating Your Own Scripts

  • Using the Pine Editor

    • Access the Pine Editor to begin coding your indicators.
    • Test and edit scripts based on market performance before publishing.
  • Publishing Scripts

    • Once satisfied, you can publish your codes to the community to share your insights.
    • Unique and novel indicators can earn featured spots among editor’s picks.
    • This ability to code and share also applies to the growing number of cryptocurrency traders, where sharing custom scripts can lead to collaboration and innovation that disrupts traditional methods.

Understanding Licensing and Code Sharing

  • Respecting Licensing
    • Review public licenses governing the code before using or modifying scripts.
    • Some scripts have closed-source codes that restrict modification.
    • By understanding intellectual property in coding, you can apply similar principles to trading bots and automated systems that help perform trades efficiently in the cryptocurrency space.

Real-World Applications

TradingView’s community tools are excellent for discovering new insights and learning from the strategies of others. The historical context of indicators, such as the development of the Bollinger Bands in the 1980s, shows how well-tested models can enhance trading accuracy, similarly reflected in innovative crypto indicators that adapt to rapidly shifting market conditions.

Challenges and Solutions

Common challenges arise from misunderstanding how to effectively use PineScript or navigating closed-source scripts. For newcomers in crypto, it’s essential to be aware that while the intersection of coding and community scripts can provide immense advantages, it can also lead to confusion regarding legitimacy and effectiveness.

Cause and Effect Relationships

In trading, a well-implemented strategy can result in significant gains; similarly, poorly coded indicators can lead to losses. This cause-and-effect relationship is found at both ends of the spectrum—from traditional to crypto, a poorly performing indicator can lead to erroneous trading decisions.

Key Takeaways

  1. PineScript unlocks customization: Expand your trading capabilities by learning to code personalized indicators.
  2. Community engagement enhances learning: Utilize community scripts to glean insights and best practices from experienced traders.
  3. Understanding open source encourages adaptation: Leverage open-source tools to innovate and modify existing strategies, beneficial in dynamic crypto environments.
  4. Efficient filtering leads to better results: Master filtering options to quickly find relevant indicators that enhance your trading strategy.
  5. Publishing fosters community growth: Sharing your own indicators contributes to a collaborative ecosystem that can enhance trading practices worldwide.

Discussion Questions and Scenarios

  1. How does the ability to customize indicators using PineScript change the trading landscape for both traditional finance and crypto?
  2. Consider a time when you relied on a community script. How did this impact your trading decisions?
  3. Compare the use of traditional indicators versus crypto-specific indicators. What differences and similarities do you notice in their applications?
  4. What are some risks in using open-source scripts for trading? How can they be mitigated?
  5. Imagine you developed an effective trading strategy. What steps would you take to share it with the community?

Glossary

  • PineScript: A coding language used for creating indicators and strategies on TradingView.
  • Indicators: Tools for analyzing price movements, applicable in both traditional and crypto trading.
  • Strategies: Action plans defined by specific indicators to guide trading decisions.
  • Community Scripts: Free scripts shared by users within the TradingView ecosystem.
  • Open Source: A licensing mode that allows users to view and modify code freely.
  • Libraries: Pre-written code segments that simplify the programming process in different contexts.

As you explore these concepts further, remember that the integration of community collaboration and coding not only enhances trading practices but equips you to navigate both traditional markets and the burgeoning world of cryptocurrencies.

Continue to Next Lesson

Now that you’ve grasped the basics of coding and utilizing community scripts in TradingView, you’re well-equipped to delve deeper into how these indicators can optimize your trading strategies in the upcoming lessons of the Crypto Is FIRE (CFIRE) training program. 🚀

 

Read Video Transcript
How to Find Top Indicators and Strategies: Tutorial
https://www.youtube.com/watch?v=bBapXHmU5NY
Transcript:
 Trading viewers all over the planet, today we are talking about the power of community,  but specifically about the power of Pinescript and the ability to code and create your own  indicator and strategy or library and then share that with everyone on TradingView.  That’s right, we’re talking about community scripts  where there are well over 100,000 free community scripts available to you right now.
 And we’re  going to show you how to access them, how to use them, and how to learn more about them.  So the first thing we’re going to do is we’re on tradingview.com. We’re going to head up to the tab  where it says community. And as you can see  below trading ideas, it says indicators and strategies with the official PineScript logo.
 We’re going to click that and we are going to end up right here on the beautiful indicators and  strategies page. Now we’re going to talk to you about this page and how it works, including how to filter it, sort it, and more.  But first, it’s really important that I give you a high-level overview of what Pinescript is  and what an indicator and strategy is so that you know exactly what you’re looking at  as I take you through this specific tour. Pinescript is a proprietary language exclusive to TradingView. Now, what do I mean
 by language? Well, I’m going to open up this indicator here that’s called VWAP Fibonacci  bands. And I’m going to see how it looks right here with this visual. As I scroll down, I can  read about all of the details and insights about this indicator. But as I go further and further,  what’s really important here is that you will find for the open source indicators out there,  the exact code that is written behind this indicator. So that’s right.
 Pinescript is a  coding language that you as a TrainingView member have access to. And by learning a few lines of code, you can create  highly custom, highly effective and super efficient scripts for your exact needs while looking at any  chart. So that’s what PineScript is.
 And we have documentation as well that can help get you  started on PineScript as well called the PineScript Quick Start Guide. But now that you  have a general overview of what PineScript is, let’s really talk in detail about what this  wonderful page, Indicators and Strategies, is showing you. Well, first of all, it’s showing  you that you have three filtering options right off the bat.
 You can look at the most popular  Indicators and Strategies, the editor’s picks editor’s picks indicators and strategies, and those who you follow in their indicators and strategies.  Now, editor’s picks is a custom selection by TradingMuse mod team and editorial team to highlight some really interesting scripts out there on the world today.
 And popular, of course, is a popular algorithm that is being shown to you based off of a specific criteria to ensure that you see the scripts that are getting a lot of boosts and  comments.  For example, I click boost here, I’m now supporting the script, I click boost here, I’m giving  this script a little love, you can do the exact same thing.
 But what’s really important now is to really dive into how you can utilize  this page to your exact needs as if you were a beginner. So as we scroll down here, what you  want to pay attention to is the name of a script, the visual of the script, and also the brief  description and name of the coder behind that script.
 Because by paying attention to those things,  you can find a script for you.  For example, this looks like a rather interesting script.  It’s called the volume weighted moving average.  Well, that sounds pretty cool.  That means it’s taking a moving average  and weighting it by the amount of training volume.  That’s pretty neat.  So let’s click on this script  and now we’ve opened up the script page. by the amount of training volume. That’s pretty neat.
 So let’s click on this script,  and now we’ve opened up the script page.  We can once again see who coded it.  We can even follow them if we’d like with a very simple click.  And in addition, we’ve got the title here  and the open source nature of the script  and a visual of how this script looks.  As we scroll down, what we’re going to want to do,  especially if this indicator is of interest to us, is add this script to.
 As we scroll down, what we’re going to want to do, especially if this indicator  is of interest to us, is add this script to our favorites. The reason why we want to add this  script to our favorites is because when we head to the super charts, we’ll be able to find it  very easily. Now, one more very important thing here is to really pay attention to the description,  because the description is the coder taking their time to write out a detailed  description on how this indicator works. All of these scripts generally have detailed descriptions.
 That’s because the coders really take great pride and care of their scripts and they want to ensure  that you, the individual trader, know exactly how it works  and why it was created. So as another example, let’s just take a look at this machine learning  adaptive super trend. We can click into it. Really wonderful visuals here.
 We’ve got the green,  the red. We’ve got these arrows possibly denoting some sort of weakness or strength or buying or  selling. We’ve got this  table up here to tell us about those data points. And as we scroll down, I’ve already got it added  to my favorites, 15,000 boosts, by the way, we can see here the exact description about this  indicator. Keep in mind, this is a machine learning adaptive super trend.
 As we scroll down,  we’ve got key features. We’ve got this quick guide.  Look at these images here. If you read these images, you’ll know exactly how to use this  indicator and even get some background on how it works and why it was coded. The coder has taken  their time to write all of this out. And then of course, here’s the code itself.
 So we can again,  expand it. Now, before I take you to the super charts to view this code, let me also remind  you that it’s quite important to read the fine print in the code, specifically that oftentimes  this code is governed by specific public licenses and agreements. So really make sure you understand  that before you copy it or do anything with it so you’re doing proper attribution.
 You can even see  the coder’s name here as well and then the code as follows. So this is the basics to the indicators  and strategies page. Now a few other tips just to help you as you get started is that there are  different types of scripts that people are coding in. You’ve got indicators, you’ve got strategies, and you’ve got libraries.
 You can also see what type of script you’re looking at  by finding the important logos on each script.  So this logo here means it’s a PineScript indicator.  Let’s keep scrolling down here  and let’s see if we can find a strategy or a library.  And we’re just gonna keep moving down, keep moving down.  Quite a few  indicators, as you can see. And here we are, here is a strategy.
 And we know that’s a strategy  because look at the arrows indicators don’t have the arrows. But you can see the arrows here.  Now here’s a library, a library, we can see it’s got this these building blocks pieces as the icon.  And that makes sense because a library is something you can insert to your code rather quickly.  So this is a great script so that you can very quickly insert this code into any type of script you’re interested in.
 In fact, this script is pretty cool from two days ago.  ago it is a looks like it’s a a a library related to fred or federal reserve economic data and also finra short sale volume and even open interest this is a wonderful library commitment of traders  you’re gonna if you become a great coder you’re definitely going to want to learn how these  libraries work for quick access and ways for you to get this into your indicator  or strategy all right now that i have given you the basics of this page how it works what
 pine script is i want to take you to the super charts because it’s pretty important to illustrate  how you can now quickly find the scripts that you have favorited the scripts that you’ve read about  so what i’m first going to do is go up to indicators, metrics, and strategies and click.
 You can see by default,  I’ve got favorites selected here and check it out. Here’s the machine learning adaptive super trend  script I was just walking you through. It’s been added to my favorites. It’s got this little star  icon. Now, if I click machine learning adaptive super trend  it is added to my chart and check this out it’s just how it looks when you saw it on the  indicators and strategies page i’ve got this green i’ve got this red i’ve got these arrows and this  table in addition if i go to any symbol and i mean any symbol of my choice, you can very quickly see that this indicator also
 follows me around and I can save this layout. I could even create a custom indicator layout with  this indicator and other indicators perfectly saved to it so I can come back to it every time.  The key point here though is that you know now what the indicators and strategies page is,  how to read through the ideas, what they’re built and coded in PineScript,  and then how to take that to a page or chart just like this.
 Now, keep in mind, if I go to my indicators, metrics and strategies menu,  you can see all of the indicators that I favorited over time.  In fact, here’s the volume weighted moving average indicator  that we also were talking about.  Check this out.  We’ve now got this indicator on our chart as well.  So we’ve got the super trend indicator  and the volume weighted moving average indicator  right here in front of us.
 We can now start a new form of research,  analysis, and insights on the chart.  Now, before I wrap up this video,  I am going to head back to tradingview.com  because I want to ensure that you see a very important aspect  of the indicators and strategies page  that I haven’t yet touched up on.  And that is the other filtering options available to you.
 So as mentioned, you can filter this page by indicators,  you can filter this page by strategies,  and you can filter this page by libraries.  The choice is yours depending on what it is  you’re looking for.  If you’re a coder, you may want to go through  the libraries page to understand what’s possible  for you to quickly incorporate into your code.
 If you’re someone  who’s looking to backtest trades or study a real strategy on the chart, well, this strategies toggle  will be important to you. If you’re interested in indicators to improve your analysis, to spot  anomalies, to find unique things on the chart, make sure you have indicators selected.
 If you’re  open to it all, have all types open and off you go.  Next up is this open source toggle.  Now, I do want to remind you that if you open up a chart and you look at the source code,  you’ll see that some of these coders have open sourced their code.  It is here for everyone to read, analyze, review, and study.
 But not everyone does open source code.  Some people do have closed script code. It’s up to you if you want to look at that closed script or not. Just make sure you have  open source only toggled on. That means every indicator strategy or library you see is open  source. You can see the code, you can review it.
 If you don’t have this toggled on, you may come  across the occasional indicator that actually is closed  source. You just simply cannot read the code. Now, lastly, there is this toggle here between  most recent and popular. This is quite important to explain. Most recent is exactly what it sounds  like.
 What are the most recent indicators being published? Well, here’s one from 12 minutes ago,  indicators being published. Well, here’s one from 12 minutes ago, 15 minutes ago, 15, 16 minutes ago,  16 minutes, 28 minutes. There are indicators being published by coders all around the world at any given point in time. But of course, if you’d rather just focus on the most popular, the indicators  and strategies that are getting boosts and comments and have usage relative to when they were published, well, you’re going to want to toggle this  little fire icon to make sure you’re seeing that.
 Naturally, you’re just going to see far  more boosts on the page because that’s what it’s being sorted by.  It’s being sorted by the popularity of that indicator.  So this is the indicators and strategies page.  Now, to wrap up this video and we have other videos and walkthroughs about this.  I want to ensure that you also walk away with an important framework here, which  is that you can publish your indicators to these pages as well by following a few  simple steps here.
 When you have your chart open, head down to the pine editor at the bottom.  See our chart here where it says pine editor,  click that button. And now you’ve opened up your pine editor. Start writing out your code from here, write your code, test it, add it to your chart.
 And when you’re ready, click publish  indicator. From there, you can potentially get your indicator in the indicators and strategies  page on editors picks in the popular feed.  That is going to come down to how unique and novel your code is.  Also, keep in mind that if you have a pine script added to your specific chart and it’s  open source, hover your mouse over the indicator up here or strategy could be and go ahead  and click where it says source code.
 Now when you click the  source code you can once again see that open source code you can review it analyze it ensure  that it meets your needs. Also what’s really important is that you understand that you have  quite a few tools here when you have the pine editor open that go beyond just publishing this  to the indicators and strategies page to potentially  have it featured on editors picks or in the popular section but also that you can make new  scripts you can rename them save them keep track of your recently used you can also if you see here
 where it says more click more and you can do quite a bit of advanced options here, such as going to your  editor settings, opening up your Pine editor in a new window or tab. That means you have a specific  Pine editor opened in your own window or tab.
 Check your Pine logs, the user manual, the reference  manual, release notes. You can get help as well well you can even get in touch with the  team on specific channels so the point here is that your pine editor as you go  through this process process is quite powerful and offers you tons of options  if you get good at using it so this is the full walkthrough of the trading view  indicators and strategies page which I want to end up on because once again  training view comm indicators and strategies all which i want to end up on because once again trainingview.com
 indicators and strategies all of these here as a trading view member are available to you  and this is how you can get started first by seeing what the community is creating  meeting the coders behind these indicators following them boosting them writing comments  and then when you’re ready go in and and try them, add them to your favorites,  head to the chart, perhaps even open up the Pine editor and create your own. You could one day see your name and indicator right here on this page. So with that being said, I hope that you enjoyed
 this walkthrough and that you learned something new about TradingView, coding and Pinescript.  Check out our help center for more. All of the other references i made in this video  about the pine script documentation the indicators and strategies page as well as the pine editor.