Without the right trading tools, you can’t conduct effective technical analysis. A strong trading strategy will help you avoid common mistakes, improve your risk management, and increase your ability to identify and take advantage of opportunities. For many, TradingViewis the go-to charting platform. Offering a hub of technical analysis tools, the powerful HTML5 web application is used by millions to track movements in the Forex, cryptocurrency, and traditional stock markets.
TradingView has many powerful features: it allows us to track assets across numerous trading platforms and to publish trading ideas within its social network. In this article, we’ll focus on its customizability. We’ll be using Pine Script, TradingView’s own programming language, which grants us granular control over our chart layouts. This article will show you how to trade with previous day high and low.
What is Pine Script?
Pine Script is a scripting language that can be used to modify your TradingView charts. The platform already equips you with many features to do so, but Pine Script allows you to take it a step further. Whether you want to change the colors of your candlesticks or to backtest a new strategy, the Pine Editor will enable you to customize your real-time charts as you see fit.
The code itself is excellently documented, so be sure to check out the user manual for more information. Our goal in this tutorial is to discuss some of the basics and introduce indicators that can come in handy for cryptocurrency trading.
Setting up
It’s incredibly simple to get started with Pine Script. Any code we write is run on TradingView’s servers, so we can access the editor and develop our scripts from a browser – without any additional download or configuration required.
In this tutorial, we’re going to chart the Bitcoin/Binance USD (BTCBUSD) currency pair. If you don’t have one already, go ahead and create a free account (there’s a pro subscription available, too, but it isn’t necessary for this guide).
The Pine Editor
This editor is where the magic happens. We’ll tell it what we want to do, then click on Add to Chartto see our annotations appear above. Note that things can get messy if we include several annotations at once, so we’ll remove them between examples (right-click in the chart > Remove Indicators).
Plotting moving averages (MA)
Let’s move on to our first custom indicator – the exponential moving average, or EMA. This is a valuable tool as it allows us to filter out any market noise and smooth out price action.
EMA differs slightly from the simple moving average (SMA), in that it puts more weight in the most recent data. It tends to be more reactive to sudden movements and is often used for short-term plays
Plotting the Relative Strength Index (RSI) indicator
The Relative Strength Index (RSI)is another essential indicator in technical analysis. It’s known as a momentum indicator, meaning that it measures the rate at which assets are bought and sold. Presented on a scale of 0 to 100, an RSI score attempts to inform investors on whether assets are overbought or oversold. Typically, an asset may be considered oversold if it has a score less than or equal to 30, and it could be overbought with a score greater or equal to 70.
If you head to New > RSI Strategy, you can see this for yourself. RSI is generally measured over periods of 14 (i.e., 14 hours or 14 days), but you’re free to tweak that setting to suit your own strategy.
Backtesting
There is a way for us to test our custom indicators. Though past performance is no guarantee of future results, backtesting our scripts can give us an idea of how effective they are at picking up signals.
Tying it together
Time to write our own script by using some of the concepts we’ve seen so far. We’re going to combine EMA and RSI and use their values to color candlesticks, yielding insights that we can easily visualize. This shouldn’t be construed as financial advice – there’s no objectively correct way to use this indicator. As with all others, it should be used with other tools to develop your own strategy.
Closing thoughts
In this article, we’ve run through some basic examples of what you can do with TradingView’s Pine Editor. By now, you should be confident in making simple annotations to price charts to gain additional insights from your own indicators. Hope this article can help you address problems in trading highs and lows and give you some brand-new ideas about how to trade with previous day high and low.

















