Welles Wilder Smoothing Indicator for Technical Analysis

Article

A technical implementation guide of Welles Wilder Smoothing Indicator using LightningChart JS Trader for developing Fintech applications.
Soroush Sohrabian

Ahmad Omid

Data Science Developer

LinkedIn icon
welles-wilder-smoothing-Cover

What is the Welles Wilder Smoothing Indicator?

The Welles Wilder Smoothing Indicator is a cornerstone in the realm of technical analysis, developed by J. Welles Wilder Jr., a pioneer in market indicators. First introduced in Wilder’s seminal book, New Concepts in Technical Trading Systems, in 1978, this indicator was designed to help traders and analysts make more informed market predictions.

Wilder’s work is renowned for indicators that capture market momentum and direction, and the Welles Wilder Smoothing Indicator is no exception. This indicator aims to smooth price data over time, enabling traders to identify trends with greater accuracy by filtering out market “noise.”

Primarily, the Welles Wilder Smoothing Indicator has been instrumental in generating trend signals, with applications in various trading strategies. By using this indicator, traders gain insights into price direction and momentum, helping them assess entry and exit points with greater precision.

How the Welles Wilder Smoothing Indicator Works in Technical Analysis

The Welles Wilder Smoothing Indicator is built on a smoothing technique developed to reduce volatility in the observed data and highlight the true trend in price movements. Unlike simple moving averages that respond directly to price fluctuations, the Welles Wilder Smoothing Indicator is calculated using a recursive formula that weights historical prices more heavily, enabling a slower, more consistent reaction to price changes.

Formula for the Welles Wilder Smoothing Indicator

The Welles Wilder Smoothing (WWS) formula is calculated as follows:

welles wilder smoothing-Formula

Where:

  • WWSt: Welles Wilder Smoothed value for the current period
  • WWSt-1: Smoothed value from the previous period
  • Pt: Price at the current period
  • n: Smoothing period length (often set at 14 by default)

This calculation is recursive, meaning each current value depends on the previous one, with the chosen period ? influencing the level of smoothing applied. A longer period produces a smoother result, while a shorter period allows more responsiveness to price changes.

Example and Calculations

Let’s go deeper into the calculations of the Welles Wilder Smoothing Indicator (WWS) with a hypothetical example to illustrate how it’s applied in technical analysis. This section will guide you through calculating the initial and subsequent values, clarifying how each data point influences the resulting smoothed trend.

Let’s say we have a 14-day period and the following hypothetical daily closing prices:

Day
Closing Price (P)
Day
Day 1
Closing Price (P)
100
Day
Day 2
Closing Price (P)
102
Day
Day 3
Closing Price (P)
101
Day
Day 4
Closing Price (P)
103
Day
Day 5
Closing Price (P)
102
Day
Day 6
Closing Price (P)
104
Day
Day 7
Closing Price (P)
105
Day
Day 8
Closing Price (P)
106
Day
Day 9
Closing Price (P)
108
Day
Day 10
Closing Price (P)
107
Day
Day 11
Closing Price (P)
109
Day
Day 12
Closing Price (P)
110
Day
Day 13
Closing Price (P)
111
Day
Day 14
Closing Price (P)
113
  1. Initial WWS Value Calculation

The initial value of the Welles Wilder Smoothing Indicator is often calculated as the simple average of the prices over the first 14 days:

welles wilder smoothing-Formula-Initial
welles wilder smoothing-WWS-Initial
welles wilder smoothing-WWS-Initial-Result
  1. Subsequent WWS Value Calculation

After calculating the initial WWS value, we use the formula for each subsequent day, incorporating the previous day’s WWS value and the current closing price. Let’s calculate WWS15 for Day 15, assuming the closing price on Day 15 is 115.

Using the formula for WWSt

welles wilder smoothing-WWSt-Formula

Where:

  • WWS14 = 99.36
  • P15 = 115
  • n = 14

 Substitute and calculate:

welles wilder smoothing-Calculation-Example

This recursive process continues for each subsequent day, with each new WWS value depending on the previous WWS value and the latest closing price.

This calculations cause the WWS values change gradually and “smoothing” the price movements. But in practice, these calculations are easily handled by charting software like LightningChart JS Trader, where traders can overlay the WWS on price charts to visually identify trends, bullish and bearish crossovers, and potential trade signals.

How to Create the Technical Indicator Using LC JS Trader

Step 1: Get LightningChart JS Trader

To begin, you’ll need access to LightningChart JS Trader. This library provides the tools necessary to create advanced technical indicators, including the Welles Wilder Smoothing (WWS) indicator. Visit the LightningChart JS Trader page to download the required components and review the documentation.

Step 2: Review the Interactive Example

LightningChart JS Trader includes interactive examples that demonstrate how to create custom technical indicators. Start by reviewing the documentation, focusing on how to integrate the Welles Wilder Smoothing (WWS) indicator into your chart setup. The interactive examples will guide you through the process of setting up the WWS, from importing the necessary modules to modify the chart settings.

Step 3: Code Explanation

In this step, we will break down the code that creates the chart with the Welles Wilder Smoothing (WWS) indicator, as shown in the image, using LightningChart JS Trader. The code demonstrates how to initialize a trading chart, apply the WWS indicator, and customize its appearance.

welles-wilder-smoothing-Chart-Example

Here’s a detailed breakdown of each section:

A. Importing the Required Libraries:

   const lcjsTrader = require('@arction/lcjs-trader')
   const lcjs = require('@arction/lcjs')
   const { Themes } = lcjs
  • lcjsTrader: This library provides access to the LightningChart JS Trader functionalities, allowing you to create advanced financial charts.
  • lcjs: The main LightningChart JS library, used for general charting functionality.
  • Themes: A property within lcjs that provides access to pre-built themes. In this case, we are using the darkGold theme to style the chart.

B. Initializing the Trading Chart:

   lcjsTrader.trader(TRADER_LICENSE).then(async (trader) => {
    // Create a trading chart.
    const tradingChart = trader.tradingChart({ loadFromStorage: false, colorTheme: Themes.darkGold })
  • trader(TRADER_LICENSE): Initializes the LightningChart JS Trader with the provided license key (TRADER_LICENSE). This is required to access the charting functionalities for financial data.

Note you can request a LightningChart JS Trader trial license, which is free.

  • tradingChart(): This function creates a trading chart with certain options.
  • loadFromStorage: false: This disables the loading of previously stored chart data from local storage, ensuring a fresh chart setup.
  • colorTheme: Themes.darkGold: This applies the darkGold theme to the chart, which influences the background color, gridlines, and other visual elements.

C. Adding and Customizing the Indicator

    // Add a Welles Wilder Smoothing Indicator
    const wws14 = tradingChart.indicators().addWellesWilderSmoothingAverage()
    wws14.setPeriodCount(14)
    wws14.setLineColor('#1496FF')
    wws14.setLineWidth(3)
  • addWellesWilderSmoothingAverage(): WWS is a moving average that smoothens out price movements, which helps spotting bullish and bearish trends.
  • setPeriodCount(14): Sets the time period for the WWS to 14. This means the WWS will calculate the average based on the last 14 days.
  • setLineColor('# 1496FF'): Changes the color of the WMA line to blue, making it visually distinct on the chart.
  • wws14.setLineWidth(3): Increases the line thickness of the WWS to 3 pixels, making the line more prominent on the chart.

D. Loading Data from a CSV File

    // Reading data from a file.
    await fetch(`${document.head.baseURI}examples/assets/0000/Alphabet Inc (GOOGL).csv`).then((res) => res.text()).then((text) => {
        tradingChart.readCsvString(text, 'Alphabet Inc (GOOGL)')
    })
  • fetch(): This function retrieves a CSV file containing historical data for Alphabet Inc. (GOOGL). The CSV file includes pricing information for the company’s stock, which is plotted on the chart.
  • readCsvString(): This function reads the CSV data and interprets it as pricing data for Alphabet Inc. The second argument (‘Alphabet Inc (GOOGL)’) sets the label for the chart, as seen at the top of the chart image.

E. Setting the Currency for the Chart

    tradingChart.setCurrency('USD')
   })
  • setCurrency('USD'): This sets the currency of the chart to USD, ensuring that the pricing data is interpreted and displayed in US dollars.

Benefits of Using the Welles Wilder Smoothing Indicator

The Welles Wilder Smoothing Indicator offers traders a significant advantage by reducing market noise, which helps them stay focused on overarching trends instead of being influenced by daily price fluctuations.

This smoothing effect clarifies the direction of the market, making it easier for traders to distinguish between bullish and bearish trends. This clarity is particularly valuable in trend identification, where understanding whether the market is trending up or down helps traders make more informed decisions about when to enter or exit a trade.

In addition to revealing trends, the Welles Wilder Smoothing Indicator works well in combination with other technical tools, like moving averages or oscillators, to produce crossing signals. These crossover points can signal prime moments for entering or exiting trades, often leading to higher accuracy in timing.

Another beneficial application of this indicator is in momentum-based strategies. Here, traders use the indicator’s position in relation to recent price movements as a signal for buying or selling: a rising WWS typically suggests a potential bullish trend, while a decline indicates bearish momentum.

This versatility makes the Welles Wilder Smoothing Indicator a powerful asset in a trader’s toolkit, adaptable to both long-term trend following and shorter-term momentum strategies.

Advantages and Limitations of the Indicator

The Welles Wilder Smoothing Indicator offers a number of advantages that make it a popular choice among traders focused on technical analysis. One of its main benefits is its ability to identify trends by smoothing out price volatility, enabling traders to avoid getting distracted by minor price movements that might not reflect the broader market direction.

This smoothing effect allows traders to focus on the primary trend, making it especially valuable in markets that experience frequent short-term fluctuations. Additionally, the indicator’s formula is straightforward, allowing it to be easily implemented and used alongside other indicators.

Its simplicity does not compromise its effectiveness, and traders can seamlessly integrate it into their existing analysis setups without needing extensive adjustments. Due to its recursive nature and reliance on previous price values, the Welles Wilder Smoothing Indicator is particularly effective for long-term analysis, where a consistent view of market direction is essential.

However, the indicator is not without limitations. Because it relies on historical price data, the Welles Wilder Smoothing Indicator inherently lags behind current price action. This lag can result in delayed signals, especially during volatile market periods, which may lead traders to act on information that is slightly outdated.

Additionally, while the smoothing effect is useful for trend identification, it can also make the indicator less responsive to rapid market changes, potentially causing traders to miss short-term opportunities that might arise from sudden reversals.

Finally, as a standalone tool, the Welles Wilder Smoothing Indicator may not always provide enough information to support confident trading decisions. It tends to work best when used in conjunction with other indicators, like the Relative Strength Index (RSI) or the Average Directional Index (ADX), to create a more robust analysis of market conditions.

Conclusion

The Welles Wilder Smoothing Indicator remains an essential tool for traders who want to refine their technical analysis. Its unique smoothing effect offers a clear view of long-term price trends, making it particularly useful for strategies focused on identifying sustained market directions.

By filtering out daily fluctuations and market “noise,” the indicator allows traders to observe price movement trends with more consistency, which can help in making more confident trading decisions. However, as with any technical indicator, the Welles Wilder Smoothing Indicator has its limitations.

Its reliance on historical data causes it to lag behind real-time price movements, which may lead to slower response times during periods of high volatility or sudden reversals. Because of this, traders often pair it with complementary indicators, like oscillators or moving averages, to build a more comprehensive market view.

The importance of using tools like LightningChart JS Trader becomes evident in this context. With LightningChart’s advanced interactive capabilities, traders can visually track the Welles Wilder Smoothing Indicator in real-time and combine it with other indicators to test trading strategies, optimize their setups, and gain deeper insights into market behavior.

LightningChart JS Trader’s flexibility empowers users to integrate charting components that offer high-precision data visualizations, making it easier to recognize trends and make well-informed trading decisions.

Continue learning with LightningChart