What Indicators Do Traders Use for Scalping? What Indicators Do Traders Use for Scalping?
Scalping is a fast-paced trading style where traders aim to take advantage of small price movements within short timeframes. Such traders often rely on technical indicators to make quick decisions. This article explores some of the most popular scalping indicators, providing insights into how they can help traders spot opportunities in fast-moving markets.
Understanding Scalping Indicators
As you know, scalping is a trading strategy where traders aim to take advantage of small price movements by executing numerous trades within short timeframes, often closing trades within a few minutes. This approach requires swift decision-making and precise timing.
Technical indicators are essential tools in this context, as they provide real-time data and insights into market trends, momentum, and volatility. Using these indicators, traders can identify optimal entry and exit points, potentially enhancing their ability to navigate the rapid pace of the market.
Below, we’ll break down five indicators for scalping. You’ll find these scalping indicators in MT4 and MT5, TradingView. Also, you can get started in seconds with FXOpen’s free TickTrader trading platform.
Moving Averages
Moving averages (MAs) are considered by some to be the best indicator for scalping, smoothing out price data to help identify trends by calculating the average price over a specific period. In scalping, where quick decisions are crucial, certain types of moving averages can be useful.
Exponential Moving Average (EMA)
Unlike the Simple Moving Average (SMA), which assigns equal weight to all data points, the EMA gives more significance to recent prices, making it more responsive to current market movements. This responsiveness is advantageous for scalpers. For instance, a 9-period EMA reacts swiftly to recent price changes, potentially providing timely signals for entry and exit points.
Hull Moving Average (HMA)
Developed by Alan Hull, the HMA further reduces lag and enhances smoothness compared to traditional moving averages. It achieves this by weighting recent prices more heavily and using a unique calculation method. The HMA's ability to closely follow price action while minimising lag makes it a valuable indicator for scalpers.
Applying Moving Averages in Scalping
- Crossover Strategy: Scalpers often use two EMAs of different lengths to identify potential trading opportunities. A common approach involves a fast EMA (e.g., 5-period) and a slow EMA (e.g., 15-period). When the fast EMA crosses above the slow EMA, it may indicate a bullish trend, suggesting a potential buying opportunity or a chance to close a short trade. Conversely, when the fast EMA crosses below the slow EMA, it may signal a bearish trend, indicating a potential selling opportunity or moment to close a long trade.
- Trend Confirmation: The EMA and HMA can be used to confirm trends identified by other indicators. For example, if the moving average is sloping upwards, it may confirm an uptrend, supporting decisions to enter long positions. If it's sloping downwards, it may confirm a downtrend, supporting decisions to enter short positions.
You can find these scalping indicators in TradingView and FXOpen’s TickTrader platform.
Relative Strength Index (RSI)
The Relative Strength Index (RSI) is a well-known scalping indicator that measures the speed and change of price movements, oscillating between 0 and 100. Traditionally, an RSI above 70 indicates overbought conditions, while below 30 suggests oversold conditions.
In scalping, traders often adjust the RSI from its typical length of 14 to shorter periods, such as 7 or 9, to capture rapid price swings occurring over minutes. This adjustment makes the RSI more sensitive to recent price changes, providing timely signals for quick trades.
Applying RSI in Scalping
- Overbought/Oversold Levels: When the RSI moves beyond 70 or drops below 30, traders watch for potential reversal points. However, scalpers may focus on the RSI’s movement back into the 30-70 range as an early sign of momentum shifting.
- Divergences: Scalpers also look for divergence between price movement and the RSI. For example, if the price reaches a new high but the RSI does not, it may signal a weakening trend and possible reversal. This divergence can be an effective tool for anticipating quick market shifts.
- Midpoint (50 Level): The 50 level serves as a midpoint, indicating the balance between gains and losses. An RSI crossing above 50 may suggest bullish momentum, while dropping below 50 can indicate bearish momentum. Scalpers use this midpoint to assess the prevailing market trend.
Bollinger Bands
Bollinger Bands are a technical analysis tool comprising three lines: a simple moving average (SMA) in the middle, with upper and lower bands set at a specified number of standard deviations from the SMA. These bands expand and contract based on market volatility, providing a visual representation of price fluctuations.
In scalping, traders often adjust Bollinger Bands to shorter timeframes, such as 1-minute or 5-minute charts, to capture quick price movements. A common approach involves setting the SMA period to 7-10 and the standard deviation to 1.5-2, potentially enhancing sensitivity to short-term market changes.
Applying Bollinger Bands in Scalping:
- Bollinger Squeeze: When the bands contract, indicating low volatility, it often precedes significant price movements. Scalpers watch for a breakout above or below the SMA to identify potential trading opportunities.
- Reversal: Price breaching the upper band may suggest overbought conditions, while below the lower band may indicate oversold conditions. Scalpers use these signals to anticipate potential price reversals.
Stochastic Oscillator
The Stochastic Oscillator is a momentum indicator that compares an asset’s closing price to its price range over a specific period, typically 14. It includes the %K line, the current closing price relative to the range, and the %D line, a moving average of %K. The scale runs from 0 to 100, where readings over 80 suggest overbought levels, and those under 20 point to oversold levels.
In scalping, traders may adjust the Stochastic Oscillator to shorter settings, such as 5,3,3, to increase sensitivity to rapid price movements. This adjustment can help in capturing short-term market fluctuations.
Applying the Stochastic Oscillator in Scalping:
- Overbought and Oversold Conditions: When the %K line crosses the %D line in the overbought (above 80) or oversold (below 20) zones, it can signal a potential reversal. Scalpers use these crossovers as quick alerts for shifts in momentum, helping them to act swiftly in volatile markets.
- Crossovers: Besides extreme conditions, traders also monitor crossovers between %K and %D. A %K line crossing above %D from a lower level can suggest an upward move, while a downward crossover may hint at a short-term price decline.
- Divergence: If the price makes a new high/low but the Stochastic Oscillator does not, it may signal a weakening trend, indicating a potential reversal.
Moving Average Convergence Divergence (MACD)
The Moving Average Convergence Divergence (MACD) is considered one of the top forex indicators for scalping. It’s a momentum indicator that reflects the relationship between two moving averages. It comprises the MACD line (the difference between the 12-period and 26-period exponential moving averages), the signal line (a 9-period EMA of the MACD line), and a histogram, which illustrates the gap between the two lines.
Scalpers prefer to adjust these settings to 3, 10, and 16, respectively, to make the MACD more responsive to rapid price movements.
Applying MACD in Scalping:
- Crossovers: When the MACD line crosses above the signal line, it may indicate bullish momentum; a crossover below suggests bearish momentum. Scalpers monitor these crossovers to identify potential entry and exit points.
- Histogram Analysis: The histogram represents the difference between the MACD and signal lines. An expanding histogram indicates strengthening momentum, while a contracting histogram reflects weakening momentum. Scalpers use these changes to gauge the intensity of price movements.
- Divergences: A divergence occurs when the price moves in one direction while the MACD line moves in the opposite. For example, if the price reaches a new low but the MACD does not, it may reflect a potential upward reversal. Scalpers watch for such divergences to anticipate shifts in market direction.
Combining Indicators for Scalping Strategies
Combining multiple indicators can enhance scalping strategies by providing a more comprehensive view of market conditions. Each indicator offers unique insights, and their combined use can help filter out false signals and confirm trading opportunities. Here are some pairings:
- EMA and RSI: Utilising the Exponential Moving Average to identify trend direction alongside the Relative Strength Index to gauge momentum can help traders confirm the strength of a trend before making decisions. For instance, if the EMA indicates an uptrend and the RSI is above 50, it may suggest strong bullish momentum.
- Bollinger Bands and Stochastic Oscillator: Bollinger Bands measure volatility, while the Stochastic Oscillator identifies overbought or oversold conditions. When prices touch the upper or lower bands and the Stochastic Oscillator reflects overbought or oversold conditions, it may indicate potential reversal points.
- MACD and RSI: The Moving Average Convergence Divergence (MACD) highlights momentum changes, and the RSI indicates overbought and oversold conditions. Using them together can help confirm potential entry or exit points. For example, if the MACD shows bullish momentum and the RSI is rising but not yet overbought, it may signal a buying opportunity.
Common Challenges When Using Indicators in Scalping
Scalping with indicators offers valuable insights, but there are some challenges traders should be aware of:
- False Signals: Rapid market movements can trigger misleading signals, causing traders to act prematurely.
- Overtrading: Relying too heavily on short-term indicators can lead to excessive trades, increasing transaction costs.
- Market Noise: High volatility and frequent price fluctuations can make it difficult to distinguish genuine trends from random market "noise."
- Lagging Indicators: Some indicators may react too slowly, causing traders to miss opportunities.
The Bottom Line
Scalping requires quick decisions and the right tools, and indicators like the EMA, RSI, and MACD can help traders navigate fast-moving markets. Found the best scalping indicator that suits your style? Open an FXOpen account to access four advanced trading platforms and start building your scalping strategy today with low-cost, high-speed trading conditions.
FAQ
What Is the 1-Minute Scalp Strategy?
The 1-minute scalp strategy involves making rapid trades on a 1-minute chart. Traders look for small price movements and enter multiple trades within a short period, often using scalp trading indicators like the EMA or RSI for quick signals.
What Is the 5-Minute Scalping Strategy?
The 5-minute scalping strategy focuses on capturing short-term price movements on a 5-minute chart. Traders typically combine trend and momentum indicators, like the MACD and Bollinger Bands, to make fast, informed decisions.
Which Stocks Are Good for Scalping?
The choice depends on the trader’s risk tolerance, trading approach, experience, and toolkit. However, according to theory, stocks with high liquidity, tight spreads, and significant daily volume are good for scalping. Popular choices include tech giants like Apple (AAPL) and Tesla (TSLA), as they offer frequent price fluctuations. But at the same time, they bear higher risks.
What Is the Best EMA for Scalping?
There is no best exponential moving average for scalping. However, traders often use a pair of EMAs, such as a 9- or 5-period and 21- or 15-period, to quickly respond to price changes in scalping. These EMAs help identify trend direction and momentum.
How Can You Use RSI for Scalping?
In scalping, the RSI is often set to shorter periods, like 7 or 9, to catch signals quickly. Traders watch for the RSI to cross key levels (30 or 70) and form a divergence with a price chart to spot potential reversals.
This article represents the opinion of the Companies operating under the FXOpen brand only. It is not to be construed as an offer, solicitation, or recommendation with respect to products and services provided by the Companies operating under the FXOpen brand, nor is it to be considered financial advice
Bollinger_bands
What Are Lagging Indicators, and How Can You Use ThemWhat Are Lagging Indicators, and How Can You Use Them in Trading?
Lagging indicators are fundamental tools in technical analysis, helping traders confirm trends and assess market momentum using historical price data. This article explores what lagging indicators are, the types available, and how traders use them in their strategies. We’ll also discuss their limitations and common mistakes traders should avoid.
What Are Lagging Indicators?
Lagging technical indicators are tools that traders use to confirm the direction of a price trend after it has already begun. There are leading and lagging technical indicators. The difference between leading and lagging indicators is that the former signal future price movements while the latter relying on past data help traders spot well-established trends.
These indicators work by smoothing out price movements over time, which helps traders analyse whether a trend is likely to continue. For example, after a market has been rising steadily, a lagging indicator may show that the trend has solidified, giving traders more confidence in their analysis. However, because they react to past movements, lagging indicators can be slow to signal when a trend is reversing, which is why they’re often used alongside other tools.
A lagging indicator is particularly useful in trending markets, where it can help confirm the strength and direction of price action. They aren’t as effective in sideways or range-bound markets because they lag behind real-time movements. Still, when used correctly, they can offer traders valuable insight into the market’s overall momentum and help filter out noise from short-term fluctuations.
Types of Lagging Indicators
Lagging indicators come in a few main types, each offering a unique way to analyse market trends.
These include trend-following indicators, such as moving averages, which smooth out price data to highlight the overall market direction. There are also volatility-based indicators, like Bollinger Bands, which assess the market’s fluctuations to identify possible turning points.
Additionally, momentum indicators, such as the MACD, track the speed of price changes to provide insight into the strength of a trend. Each class of indicator serves a specific purpose, giving traders different angles for analysing market movements based on past price data.
Note that lagging indicators in technical analysis are distinct from lagging economic indicators. The former uses historical price data to offer insights into future market movements, while the latter reflects past economic performance, providing a backwards-looking view of trends like unemployment, inflation, or GDP growth, which confirm the state of the economy only after changes have already taken place.
Below, we’ll explore four examples of key lagging indicators. To see these indicators in action, try them out on FXOpen’s free TickTrader trading platform.
Moving Averages
Moving averages are among the most widely used tools in technical analysis, helping traders smooth out price data to better identify market trends. There are many types of moving averages, but most traders use two primary types: the Simple Moving Average (SMA) and the Exponential Moving Average (EMA). While both calculate averages over a set period, the EMA gives more weight to recent prices, making it more responsive to market changes compared to the SMA, which treats all price points equally.
One of the key signals moving averages produce is the crossover, also called the Golden Cross and Death Cross. A Golden Cross occurs when a shorter-term moving average, like the 50-period EMA, crosses above a longer-term moving average, such as the 200-period EMA, indicating potential upward momentum. On the other hand, a Death Cross happens when the 50-period EMA crosses below the 200-period EMA, signalling a possible bearish shift. These crossovers help traders identify potential trend reversals.
Moving averages can be utilised as dynamic support and resistance levels. In an uptrend, prices often bounce off a moving average, acting as support. In downtrends, the same moving average can act as resistance, preventing price rises.
Another signal is the angle of the moving average itself. A rising moving average suggests an uptrend and a falling one indicates a downtrend. Traders often interpret this alongside whether the price sits above or below the moving average.
Bollinger Bands
Bollinger Bands are a versatile tool in technical analysis, designed to measure market volatility and potential overbought or oversold conditions. Created by John Bollinger, the indicator consists of three lines: a middle band (typically a 20-period simple moving average), and two outer bands plotted at two standard deviations above and below the middle band. These bands dynamically adjust as volatility changes, making them useful in different market environments.
According to theory, buyers dominate the market when the price rises above the middle line, while a drop below this line signals sellers gaining control. The bands can often act as a dynamic support/resistance level. However, these aren’t stand-alone buy or sell signals and should be confirmed with other indicators, like the Relative Strength Index (RSI), to avoid false alarms.
Another common signal Bollinger Bands provide is overbought and oversold conditions. When prices exceed the upper band, the market might be overbought, indicating potential exhaustion of upward momentum. Conversely, a dip below the lower band may suggest the asset is oversold, potentially signalling a bounce or reversal.
Another important signal Bollinger Bands provide is the Bollinger Band squeeze. This occurs when the bands contract tightly around the price, indicating low volatility. Traders see this as a precursor to a potential breakout, though the direction of the move is unknown until confirmed by price action. Once volatility expands, traders can look for a breakout above or below the bands to gauge direction.
Moving Average Convergence Divergence (MACD)
The Moving Average Convergence Divergence (MACD) is a popular momentum indicator that helps traders identify changes in market trends. It includes three key components: the MACD line, the signal line, and the histogram.
The MACD line is calculated by subtracting the 26-period Exponential Moving Average (EMA) from the 12-period EMA, which provides insight into the relationship between short-term and long-term price movements. The signal line is a 9-period EMA of the MACD line, and the histogram shows the difference between the MACD and the signal line.
MACD generates two key signals. First is the signal line crossover, where traders watch for the MACD line to cross above the signal line, which is often seen as a potential bullish indicator. When the MACD crosses below the signal line, it could indicate bearish momentum. The second signal is the zero-line crossover. When the MACD line crosses above the zero line, it suggests a shift toward bullish momentum, while crossing below the zero line may indicate bearish momentum.
The MACD histogram helps traders visualise the strength of momentum. Histogram bars above the zero line indicate bullish momentum, while bars below the zero line signal bearish pressure. As the bars contract, it may signal a weakening trend and a potential reversal.
Another key feature of MACD is divergence. If the price moves in one direction but the MACD moves in the opposite direction, it may signal a potential trend reversal. For instance, when the price is making higher highs but the indicator is making lower highs, it could indicate that upward momentum is weakening.
Average Directional Index (ADX)
The Average Directional Index (ADX) measures the strength of a trend, regardless of whether it's moving up or down. Created by J. Welles Wilder, it helps traders assess whether the market is trending or moving sideways. The ADX line ranges from 0 to 100, where values below 20 suggest a weak or non-existent trend and values above 25 indicate a strong trend. The higher the reading, the stronger the trend, with anything above 50 signalling very strong market momentum.
The ADX doesn’t specify whether the trend is bullish or bearish—it only gauges strength. To determine the trend's direction, traders typically combine ADX with the Directional Movement Indicators (DMI), which include the +DI and -DI lines (in the image above, ADX is represented with the pink line, while +DI is blue and -DI is orange). When the +DI is above the -DI, the trend is likely upward, and when -DI is above +DI, the trend is likely downward.
Key signals include the 25 level: a reading above this suggests that a trend is gaining strength. As ADX rises, the trend intensifies, and when it falls, the trend may be weakening, though this doesn’t necessarily imply a reversal.
ADX is particularly useful for trend-following strategies, but it’s important to combine it with other indicators for confirmation, as it doesn’t determine market direction.
How Traders Use Lagging Indicators
Traders use lagging indicators to confirm trends and evaluate the strength of market movements based on historical data. Here are several common ways traders apply these tools:
- Trend Confirmation: Lagging indicators help verify whether a price trend is well-established. For example, moving averages smooth out price data to confirm whether the market is in an uptrend or downtrend. Traders use these indicators to avoid reacting to short-term volatility and focus on longer-term trends.
- Measuring Trend Strength: Indicators like the Average Directional Index (ADX) and Bollinger Bands are used to assess how strong a trend is. A rising ADX signals increasing momentum, while Bollinger Bands widening can indicate higher volatility, suggesting the trend might persist.
- Spotting Momentum Shifts: Lagging indicators such as the Moving Average Convergence Divergence (MACD) or moving average crossovers can highlight shifts in momentum. For instance, when the MACD line crosses the signal line, it suggests a change in momentum, which could signal the continuation or reversal of a trend.
- Filtering Noise: Lagging indicators help traders filter out short-term market noise. By focusing on longer periods, like a 200-period moving average, traders can avoid being misled by temporary price fluctuations, ensuring they base decisions on potentially more stable trends.
Drawbacks and Common Mistakes with Lagging Indicators
While lagging indicators can be helpful, they come with limitations that traders should be aware of.
- Delayed Signals: Lagging indicators rely on historical data, which means they often confirm trends after they’ve already started. This delay can cause traders to enter or exit positions too late, missing a significant portion of the move.
- False Confidence in Trending Markets: Traders might over-rely on lagging indicators during sideways or choppy markets, leading to misleading signals. For example, the MACD might generate false crossovers, causing unnecessary trades in non-trending environments.
- Overuse Without Confirmation: A common mistake is using a single lagging indicator without additional tools for confirmation. This can result in trades based solely on outdated data, ignoring real-time market shifts. Combining lagging indicators with leading ones, like the RSI, can help avoid this trap.
The Bottom Line
Lagging indicators are valuable tools for confirming trends and helping traders make informed decisions based on historical data. While they have their limitations, such as delayed signals, they remain essential for understanding market momentum. Ready to apply these insights to more than 700 live markets? Open an FXOpen account today and start trading on four advanced trading platforms with low costs and rapid execution speeds.
FAQ
What Is a Lagging Indicator?
The lagging indicators definition refers to a tool used in technical analysis that confirms trends based on historical price data. It provides insight into the strength and direction of trends after they’ve already started, helping traders to confirm the momentum. Such indicators are moving averages and the Average Directional Index (ADX).
What Are Forward (Leading) vs Lagging Indicators?
Forward (leading) indicators attempt to determine future market movements while lagging indicators confirm past trends. Forward indicators, like the stochastic oscillator, signal potential price changes, while lagging indicators, like moving averages, confirm established trends.
This article represents the opinion of the Companies operating under the FXOpen brand only. It is not to be construed as an offer, solicitation, or recommendation with respect to products and services provided by the Companies operating under the FXOpen brand, nor is it to be considered financial advice.
Boost Your Trading Game With Bollinger BandsIf you understand the market environment, you'll be a better trader. I've been using Bollinger Bands to identify the market environment for over 20 years. In today's video, I'll explain how to use them to identify a two-way tape, when a market will keep trending, and when it will revert back to the trend.
Super Swing Strategy - Bollinger Bands, RSI, and ADX Strategy"Super Swing Strategy" - Bollinger Bands, RSI, and ADX Strategy
Indicators Used:
- Bollinger Bands
- Relative Strength Index (RSI)
- Average Directional Index (ADX)
Bollinger Bands for volatility, RSI for overbought and oversold conditions, and ADX for strength of the trend.
How it Works:
Add Bollinger Bands, a 14-period RSI, and a 14-period ADX to your chart.
When the price touches the upper Bollinger Band, the RSI shows overbought conditions (above 70), and the ADX is above 20, it's a potential bearish signal.
A bullish signal occurs when the price touches the lower Bollinger Band, the RSI shows oversold conditions (below 30), and the ADX is above 20.
You can use additional indicators or price action analysis to confirm signals.
2nd Pine Script Lesson: Coding the Entry Logic - Bollinger BandWelcome back to our Trading View tutorial series! In this second lesson, be learning how to code the entry logic for a Bollinger Band indicator using Pine Script.
If you're new here and missed the first lesson, we highly recommend starting there as it provides a solid foundation for understanding the concepts we'll be covering today:
In this hands-on lesson, we'll guide you through every step of coding the entry logic for your own Bollinger Band indicator using Pine Script. By the end of this lesson, you'll have a functional indicator that you can use to inform your trading decisions. So, sit back, grab a cup of coffee, and let's get started!
Code the entry logic
a) This is where we are calling the Mikilap function with two arguments:
- the coinpair and
- the timeframe we want to use.
// Calling the Mikilap function to start the calculation
int indi_value = Function_Mikilap(symbol_full, time_frame)
b) In the function initiation we convert the strings into simple strings.
// Definition of a Pine Script individual function to handle the Request and avoid Repainting Errors
Function_Mikilap(simple string coinpair, simple string tf_to_use) =>
c) As we are calling the function to get an integer value, we have to define an output variable as an integer and place this variable as the last line in the local scope of the function code to return the integer value.
int function_result = 0
// placeholder for indicator calculations
function_result
Step 1:
Using the lower bandwidth of the Bollinger Band based on SMA (close, 21) and a standard deviation of 2.0 and try to highlight bars, where close is next to the lower band
a) Requesting the values for the coinpair with request.security()
= request.security(coinpair, tf_to_use, )
We recommend using repainting functions like request or barstate only in a local scope (inside a function) and not to request complex calculated values. For saving calculation capacity it is useful to only request the classic four OHLCs and do any calculation with these four after the r equest.security() .
b) Calculation of the lower Bollinger Bands values as we need the global info, which type of source, length, and deviation value to use for the calculation, let‘s cut & paste the input for the Bollinger Band in the general starting section of the code and as we want to look for close values „next“ to the lower bandwidth, we need to define what „next“ means; let‘s do it in another input variable, perhaps we want to play with the definition later.
string symbol_full = input.symbol(defval = "BINANCE:BTCUSDT", title = "Select Pair:", group = "General")
string time_frame = input.string(defval = "60", title = "Timeframe:", tooltip = "Value in minutes, so 1 hour = 60", group = "General")
int length = input.int(defval = 21, title = "BB Length:", group = "Bollinger Band Setting")
src = input(defval = close, title="BB Source", group = "Bollinger Band Setting")
float mult = input.float(defval = 2.0, title="BB Standard-Deviation", group = "Bollinger Band Setting")
float lower_dev = input.float(defval = 0.1, title="BB Lower Deviation in %", group = "Bollinger Band Setting")/100
First, let‘s make it visible on the chart by re-writing the Bollinger Bandplot, which is not needed anymore.
// Calling the Mikilap function to start the calculation
int indi_value = Function_Mikilap(symbol_full, time_frame)
// Output on the chart
// Part 2 - plotting a Band around the lower bandwidth of a Bollinger Band for the active CoinPair on the chart
lower_bb = ta.sma(src, length) - (mult*ta.stdev(src, length))
lower_bb_devup = lower_bb + lower_bb * lower_dev
lower_bb_devdown = lower_bb - lower_bb * lower_dev
upper = plot(lower_bb_devup, "BB Dev UP", color=#faffaf)
lower = plot(lower_bb_devdown, "BB Dev DOWN", color=#faffaf)
fill(upper, lower, title = "BB Dev Background", color=color.rgb(245, 245, 80, 80))
c) Now we use the same calculation for the coinpair inside the function and start with the selection of the source (OHLC) to use, which is activein the respective input variable.
// Defintion of a Pine Script individual function to handle the Request and avoid Repainting Errors
Function_Mikilap(simple string coinpair, simple string tf_to_use) =>
int function_result = 0
bool barstate_info = barstate.isconfirmed
= request.security(coinpair, tf_to_use, )
src_cp = switch src
open => open_R
high => high_R
low => low_R
=> close_R
lower_band_cp = ta.sma(src_cp,length) - (mult*ta.stdev(src_cp, length))
lower_band_cp_devup = lower_band_cp + lower_band_cp * lower_dev
lower_band_cp_devdown = lower_band_cp - lower_band_cp * lower_dev
// placeholder for indicator calculations
d) As the bandwidth for the interesting close values is defined by our band, the only thing missing for the part of the Bollinger Band in our Mikilap indicator is to check if the close value of a bar is inside our band. As we are talking about closed bars, let‘s be sure that it is really closed by using barstate.isconfirmed (repainting built-in function!) and save it in a variable in the head of the function to avoid requesting this info too often.
bool barstate_info = barstate.isconfirmed
Now let‘s check if the close value of a bar is inside our band.
bool bb_entry = close_R < lower_band_cp_devup and close_R > lower_band_cp_devdown and barstate_info
And increase the output variable by 1 in case the close value is inside.
if bb_entry
function_result += 1
By using bb_entry , we are referring to the last bar next to the actual bar, because we want to enter on the opening of the bar after the criteria has been met.
e) And to make these possible entries visible, we want to place a label below the bar and show the entry price (=open value of the bar) as mouseover (tooltip). This should only happen if the active coinpair on the chart is the same coinpair, which is in the calculation of the function.
if function_result == 1 and ticker.standard(syminfo.tickerid) == coinpair
label LE_arrow = label.new(x = bar_index, y = low_R, text = " ↑ LE", yloc = yloc.belowbar, color = color.rgb(255,255,255,25),style = label.style_none, textcolor = color.white, tooltip = str.tostring(open_R))
Note:
You will love labels (!) and in case you are looking for text symbols that can be used as labels, look here: www.messletters.com
If you need help use the Pine Script Reference Manual, which explains 99% of everything in Pine Script, here: www.tradingview.com
f) As our function now returns different integer values (0 or 1), we can use this info to color the background on the actual chart in case it is 1.
// Calling the Mikilap function to start the calculation
int indi_value = Function_Mikilap(symbol_full, time_frame)
color bg_color = indi_value ? color.rgb(180,180,180,75) : color.rgb(25,25,25,100)
bgcolor(bg_color)
g) To finish this little Pine Script lesson and to achieve our initial targets, we just need to integrate the second indicator (RSI) into the function. We want to use the RSI for 0,5 days (12 hours) and use it to ensure to not go into a long entry in an oversold (< 25) or overbought (> 70) market. We will use RSI (low, 12) within 25 to 45 as the range to go for.
Your tasks:
define new input variables for RSI: src_rsi and length_rsi
define new input variables for the RSI range we want to use: rsi_minand rsi_max(please use the „inline“ format of an input type)
calculate the RSI (src_rsi, length_rsi) inside our Mikilap-function
define a boolean variable (rsi_entry) to check if the calculated RSI value is inside the range (please add as last check the barstate_info)
add the RSI entry check to the Bollinger Band entry check to combine them
Congratulations on finishing the second lesson on Trading View - we hope you found it informative and engaging!
We're committed to providing you with valuable insights and practical knowledge throughout this tutorial series. So, we'd love to hear from you! Please leave a comment below with your suggestions on what you'd like us to focus on in the next lesson.
Thanks for joining us on this learning journey, and we're excited to continue exploring Trading View with you!
1st Pine Script Lesson: Coding an Indicator - Bollinger Band
Welcome to this lesson on Trading View, where we will be learning how to create a Bollinger Band indicator using Pine Script.
Bollinger Bands are a popular tool that helps measure an asset's volatility and identify potential trends in price movement. Essentially, the indicator consists of three lines: a middle line that's a simple moving average (SMA), and an upper and lower band that are two standard deviations away from the SMA. The upper band represents the overbought level, meaning the price of the asset is considered high and may be due for a correction. The lower band represents the oversold level, meaning the price is considered low and may be due for a rebound.
Pine Script is a programming language specifically used for creating custom indicators and strategies on Trading View. It's a powerful tool that allows traders to customize their technical analysis to fit their special trading needs and gain deeper insights into the markets..
In this lesson, we'll be taking a hands-on approach to learning. We'll walk through each step of creating our own Bollinger Band indicator using Pine Script, with the goal of helping you gain confidence in your ability to customize and create indicators that meet your unique trading needs. So, grab a cup of coffee and let's get started!
Step 1: Set up a new chart
Let‘s set up a new clean chart to work with for this example. You will find the menu to manage your layouts on the top right of the TradingView screen.
a) add a new layout
b) rename it to „Mizar Example“
c) select BTCUSDT from Binance
d) set the time frame to 1 hour
e) clean the screen (closing the Volume indicator)
f) save it
Step 2: Coding an indicator
Let‘s code our new indicator („Mizar-Killer-Long-Approach“)and make the possible entry moments visible on the chart. You will find the Pine Editor on the bottom left of the TradingView screen.
a) open the Pine Editor
b) use „Open“ in the Pine Editor menu bar
c) use the item: create a new indicator
d) let‘s use full screen for a better overview use the three dots on the right end of the Pine Editor menu bar and open the script in a separate new browser tab
e) rename it to “Mikilap“ by clicking on the current name
f) save it
Step 3: Coding an indicator
Let‘s start coding Our target:
1. create an own new indicator: Mikilap, which bases in general on RSI and Bollinger Band
2. define the parameter for Mikilap, to select the long entries
3. show the long entries on the chart by - putting a label below the bar - change the background color of the timeframe for the bar on the chart
Initiation/Generals
• Indicator initiation
//Indicator script initiation
indicator(title = "Mizar-Killer-Long-Approach", shorttitle = "Mikilap", overlay = true, max_labels_count = 300)
indicator = Pine keyword for an indicator script
title = Long form of the name
short title = Short form of the name as shown on the chart
overlay = true: output like labels, boxes, … are shown on the chart
false: output like plots, … are shown in a separate pane
• General variables and input
// Coin Pair with PREFIX
// Bitcoin / USDT on Binance as an example / standard value on an 60 minutes = 1-hour timeframe
string symbol_full = input.symbol(defval = "BINANCE:BTCUSDT", title = "Select Pair:", group = "General")
string time_frame = input.string(defval = "60", title = "Timeframe:", tooltip = "Value in minutes, so 1 hour = 60", group = "General")
Using the input type of a variable allows you to change this setting in the setup on the chart without changing the Pine Script code.
Framework Code on Main Level
• Framework code on the main level around the indicator calculation function
// Defintion of a Pine Script individual function to handle the Request and avoid Repainting Errors
Function_Mikilap(simple string coinpair, simple string tf_to_use) =>
int function_result = 0
// placeholder for indicator calculations
function_result
// Calling the Milky Way function to start the calculation
int indi_value = Function_Mikilap(symbol_full, time_frame)
Output on the chart - Part 1
// Output on the chart
// Part 1 - plotting a Bollinger Band for the active CoinPair on the chart
int length = input.int(defval = 21, title = "BB Length:", group = "Bollinger Band Setting")
src = input(defval = close, title="BB Source", group = "Bollinger Band Setting")
float mult = input.float(defval = 2.0, title="BB Standard-Deviation", group = "Bollinger Band Setting")
upper_band = ta.sma(src, length) + (mult * ta.stdev(src, length))
lower_band = ta.sma(src, length) - (mult * ta.stdev(src, length))
upper = plot(upper_band, "BB Upper", color=#faffaf)
lower = plot(lower_band, "BB Lower", color=#faffaf)
fill(upper, lower, title = "BB Background", color=color.rgb(245, 245, 80, 80))
Done for today!
• Let‘s save our current script and take a look if we see our Bollinger Band plotted on the chart.
• Step 1: Save (top right)
• Step 2: check in the compiling section, that there are no errors (separate pane below the code)
• Step 3: go to the Mizar Example chart and add an Indicator
How does it look now?
You will see the Bollinger Band as a yellow area around the candles. By pressing the „Settings“ button behind the name of our indicator, the menu for Mikilap will open and you can adjust all the settings we have done with input type variables.
Congrats if you‘ve made it until here! Get prepared for the next lesson, where we will continue with the indicator/entry logic.
Bollinger Bands; Key to boost your profitThe Bollinger Bands indicator is one of the popular technical analysis tools used in Forex trading. Here are some ways you can use Bollinger Bands in Forex trading:
Identifying support and resistance levels
The Bollinger Bands indicator can help you identify support and resistance levels. If the price of a currency pair approaches the lower line of the Bollinger Bands, this may suggest that it is a support level. On the other hand, when the price approaches the upper line, it may suggest that it is a resistance level. You can then look for confirmation of these levels using other indicators or technical analysis methods to decide whether to enter a long or short position.
Identifying trends
The Bollinger Bands indicator can also help you identify trends. If the price of a currency pair exceeds the upper line of the Bollinger Bands, it means that the uptrend will continue, and if the price falls below the lower line, the downtrend will continue. Then you can look for confirmation with other indicators or technical analysis methods to decide whether to enter a long or short position.
Price fluctuation analysis
The Bollinger Bands indicator can also help you analyze price fluctuations. When the prices of a currency pair are close to the lower Bollinger Bands line, it means that the currency pair is undervalued, so you can consider buying. On the other hand, when prices are near the upper line of the Bollinger Bands, it means that the currency pair is overvalued, so you can consider selling.
Detecting periods of volatility
The Bollinger Bands indicator can also help detect periods of volatility. When the Bollinger Bands lines are narrowed, it means that the currency pair is in a period of low volatility, so this may suggest that the following trend or price movement may be sharp. On the other hand, when the lines are widened, it means that the currency pair is in a period of high volatility, so the price movement may be more stable.
In conclusion, the Bollinger Bands indicator can be a useful tool in Forex technical analysis. It can help identify support and resistance levels, identify trends, analyze.
At Manticore investments we use it in conjunction with Haiken Ashi candles and RSI in our scalping - swing strategy. This combination allows us to more effectively read the supports and resistances of the bollinger bands and whether the price will break through them or not.
📊Bollinger Bands In A Trending MarketBollinger Bands are a widely used chart indicator for technical analysis created by John Bollinger in the 1980s. They offer insights into price and volatility and are used in many markets, including stocks, futures, and currencies. Bollinger Bands have multiple uses, such as determining overbought and oversold levels, as a trend following tool, and for monitoring for breakouts.
📍 Strategy
Bollinger Bands measure deviation and can be helpful in diagnosing trends. By generating two sets of bands using different standard deviation parameters, traders can gauge trends and define buy and sell zones. The bands adapt dynamically to price action, widening and narrowing with volatility to create an accurate trending envelope. A touch of the upper or lower band is not a signal in and of itself, and attempting to "sell the top" or "buy the bottom" can lead to losses. Standard deviation is a statistical measure of the amount of variation or dispersion of a set of prices or returns from its average value. The higher the standard deviation, the wider the Bollinger Bands, indicating greater price volatility, and vice versa. Traders may use standard deviation to set stop-loss and take-profit levels or to help determine the risk-to-reward ratio of a trade.
📍 Calculation
First, calculate a simple moving average. Next, calculate the standard deviation over the same number of periods as the simple moving average. For the upper band, add the standard deviation to the moving average. For the lower band, subtract the standard deviation from the moving average.
Typical values used:
Short term: 10 day moving average, bands at 1.5 standard deviations. (1.5 times the standard dev. +/- the SMA)
Medium term: 20 day moving average, bands at 2 standard deviations.
Long term: 50 day moving average, bands at 2.5 standard deviations.
👤 @AlgoBuddy
📅 Daily Ideas about market update, psychology & indicators
❤️ If you appreciate our work, please like, comment and follow ❤️
Bollinger Bands Explained, All you need to know Hello everyone, as we all know the market action discounts everything :)
_________________________________Make sure to Like and Follow if you like the idea_________________________________
In today’s video we are going to be talking about the Bollinger bands , How are they constricted and how to use to try to identify trades in different financial markets.
Some people think about the Bollinger bonds as a complicated indicator but after you watch this video you will see how easy it is to use.
Lets start with the theory before we see a real life example :
The Bollinger bands were developed by a man called John Bollinger, so no surprised where the name came from.
So the Bollinger breaks down to a Moving average and some volatility bands around that, What we have first is a moving average and on the top and bottom of that moving average we have our bands and they usually are located 2 standard deviations away from the Moving Average.
The idea here is to describe how prices are dispersed around an average value, so basically, these bands are here to show where the price is going and how it's moving for about 95% of the time.
So how do we use this indicator :
1) The first way people use this indicator is when the market price reaches the edges of the Bands, The upper end for example shows that it's possible that the market is overextended and a drop in price will happen, if the price reached the lower end then the market will be oversold and a bounce in price is due.
2) The second way to use this indicator is called Targets, It simply allows us to set up targets for the trade, if we buy near the lower Band then we could set a target above the Moving average or near the higher Band.
Because these bands are based on price volatility they won't stay at the same place from the MA, That means if the volatility drops then the bands will get tighter (Squeeze) , and if the volatility goes up then the bands will go further away from each other (Width).
People use this method to try to understand what's going on with the current trend, so basically if the bands are really far away then it’s a sign that the trend is currently ending, and if they are really close then we could be seeing an explosive move in the trend
IMPORTANT
I always say that you always need to use different indicators when you analyze any chart, this way you will minimize your risk and have a better understanding on how the market is currently doing.
I hope I’ve made the Bollinger Bands easy for you to understand and please ask if you have any questions .
Hit that like if you found this helpful and check out my other video about the Moving Average, Stochastic oscillator, The Dow Jones Theory, How To Trade Breakouts, The RSI and The MACD, links will be bellow
Bollinger Bands - Contraception for your Price ActionSo i thought i’d do another educational post, this time on the Bollinger Bands. I’ll try and keep this as a brief introduction to the basics of Bollinger Bands so you can do your own research to fully understand what the indicator is doing and showing, there is no point putting a fancy indicator on your chart if you have no idea what it is showing you. Bollinger Bands measure, Price & Volatility, potential Support and Resistance, & it can also give you a sense of if an asset is Overbought or Oversold, although its best practice to use another indicator to get confirmation of being Oversold or Overbought because the price can walk the Upper and Lower Bands for extended Periods. The Standard Bollinger Bands is composed of a 20-period Simple Moving Average (SMA) which is its Middle Band, it also has an Upper Band & a Lower Band which envelopes the SMA. The outer bands are a +/- 2 Standard Deviation (StdDev) of the 20-period SMA in whatever timeframe you are in. A Simple Moving Average (SMA) is an unweighted average of the Previous 20-period Values in whatever timeframe you are in, so for the 1min chart, the SMA period will be an unweighted average of the previous 20 mins, for the 1hr chart, the SMA period will be an unweighted average of the previous 20 hours, for the Daily chart, the SMA period will be an unweighted average of the Previous 20 days and so on and so on. You are able to change the SMA to any period you want, some trading sites also allow you to change the SMA into an Exponential Moving Average (EMA). Changing the timeframe from the standard 20-period SMA to a faster SMA like a 10-period, will allow faster entry into possible buy & sell points but could be prone to false signals, because of this, most people keep the SMA at the Default of 20-periods to avoid possible false buy/sell signals. You can change the StdDev settings, but you must know what you are doing as you cannot just add any number for shits and giggles, for example, a 20-period SMA is 2 StdDev, a 10-period SMA is 1.5 StdDev and a 50-period SMA is 2.5 StdDev as default. For those interested, & from my understanding of it, the Population Standard Deviation used in the Bollinger Bands system is a measure of the +/- dispersion/variation of the mean or the sum of a collection of values, the values being the 20 periods, so a +/- deviation value away from its Midpoint Basis in whatever timeframe you are in. I won’t go into the calculations because everyone will stop reading & it’ll also hurt my head because i cannot even count. So the + is the Upper Band and the - is the Lower Band. So looking at the Bollinger Bands, we now know that the Middle Band is the basis & the Upper and Lower Bands are +/- Standard Deviations of that Middle Band Basis in whatever timeframe you are in. With Low Volatility, the closer the Upper and Lower Bands are to its Price & Middle Band Basis. The more volatile the Price action is in either direction, the further away the Price will move from its Middle Band and move closer to its Upper or Lower Bands depending on if it’s Bullish or Bearish. Along with the Price, the Upper and Lower Bands will also expand outwards and move away from its Middle Band. With extreme volatility the Price may even wick out or close a candle out of its Upper or Lower Bands. If there has been a period of Volatility which has come to an end, then you will see the Upper and Lower Bands start to contract inwards. You can use the Middle Band as potential Support and Resistance Levels depending on if the Price is above or below it. You can also use the Upper and Lower Bands as potential Resistance Levels, and also as potential entry levels for longs or shorts respectively. The Lower and Upper bands will point outwards and inwards depending on if the Price is contracting or expanding respectively. With normal volatility, if you use the default 20-period SMA & 2 StdDev settings, then the price action will possibly remain within the bands for roughly about 90% of the time. The Price will eventually move back in to the Upper or Lower Bands if there has been a period that the Price has been outside of the Upper or Lower Bands. What is great about the Bollinger Bands is that you can apply it to any chart and timeframe that has enough previous trading data, and use it to get a feel for the assets volatility over time. A key thing to look out for is the Bollinger Bands Squeeze, this happens when you buy latex contraception that’s too tigh……… sorry…… this happens when volatility has slowed & the Upper and Lower Bands contract, envelope and stay close to the Price & Middle Band so essentially Price action is trading sideways within a channel made up of the Lower and Upper Bands. The Bollinger Bands Squeeze Pattern can potentially end in a big breakout upwards or downwards. Bollinger Bands can also be used to see Bullish W-Bottoms or Bearish M-Top signals in the Price. These signals have 4 steps that need to happen for it to be considered valid but i’ll let you do your own research on that. The Price can also walk along the Upper and Lower Bands for an extended period of time depending on if the Price is Bullish or Bearish. It’s best practice to use complementary indicators like Volume, RSI, ADX, STOCH or MACD to try and get confirmation or any potential breakout. I actually use the Bollinger Bands on my charts in conjunction with the Ichimoku Cloud.
On a side note, having a grasp of the basics of the original Bollinger Bands crated by John Bollinger is the first step to really understanding it and properly using it to enable you to make wise decisions with your money/investments. If you have an understand of the original Bollinger Bands, then that can help you with understanding other price enveloping indicators like what David ‘WycoffMode’ Ward has created. David has created his own genius take on the Bollinger Bands called Bad Ass Bollinger Bands, which is quite fascinating because it shows multiple +/- Standard Deviations for whatever timeframe you are in. You could potentially use these as multiple Support and Resistance Levels for whatever timeframe you are in and also look for any potential cascading effect from lower to higher timeframes using these multiple +/- StdDev levels, he does state however that to get the best out of it, you have to use it with his Phoenix Ascending indictor, which from what I’ve seen, i think it complements his Bad Ass Bollinger Bands by showing Momentum, Upwards and Downwards Pressure & potential Trend Crossover, this agrees with what i have said above, about using other complimentary indicators with your Bollinger Bands like RSI or MACD. From what I have seen of David’s Bad Ass Bollinger Bands, one of the many benefits of having multiple +/- Standard Deviations, 8 in total, 4+ & 4-, is that you end up with a closer to 95-99% of the Price action staying within the Bollinger Bands for more accuracy. 99% because if there is extreme volatility, that may still cause a Candle Wick to poke its head out. This new indicator is potentially a real game changer. This is just my opinion from what i have seen of it, so i could be completely wrong & David could say it doesn’t mean anything that i've typed and he’s gonna hunt me down for typing complete bollox. Below is a pic to show you the differences between the original Bollinger Bands and the Bad Ass Bollinger Bands.
In any case, it’s best practice that when using your charts, you should have a range of indicators to complement each other, an indicator for Momentum, Volatility, Trend, Price, Volume ect. You do not need to add 4 indicators on your chart that show the same thing. If your using RSI then you don’t really need the STOCH, If you’re using MACD then you don’t really need ADX or Parabolic SAR.
If you’re interested in learning more about the Ichimoku Cloud System, please click on the below pic which will take you to an educational post i did about it.
I hope you have found this brief intro helpful & i hope it encourages you to do your own research to find the best trading strategy for you. Cheers 👍