As an aspiring algorithmic trader, you're stepping into a realm where the mastery of various trading indicators can significantly enhance your trading decisions. One such powerful tool that deserves your attention is the True Range Adjusted Exponential Moving Average (TRAdj EMA) .
The TRAdj EMA is not just another trading indicator. It distinguishes itself from traditional moving averages by integrating volatility into its calculation, providing a more responsive indicator to market trends. This unique feature makes it an invaluable tool for algorithmic traders, especially those trading in volatile markets.
This article dives deep into the TRAdj EMA, exploring its calculation, application, and performance in trading scenarios. Our discussion is inspired by the article "True Range Adjusted Exponential Moving Average" by Vitali Apirine, found in the January 2023 issue of Stocks & Commodities magazine.
Whether you're a novice trader looking to expand your toolkit or an experienced trader keen to explore new strategies, understanding the TRAdj EMA could be a helpful tool in your arsenal. And here at EasyLanguage Mastery, we're committed to helping you master such powerful tools through our comprehensive System Development Master Class.
Lets get going!
Understanding the True Range Adjusted Exponential Moving Average
The TRAdj EMA is a unique trading indicator that goes beyond the traditional moving averages. It's a trend-following indicator that adjusts for a market's volatility, making it a valuable tool for traders operating in volatile markets.
At its core, the TRAdj EMA incorporates the concept of 'true range,' a measure of volatility introduced by J. Welles Wilder. The true range is the greatest of the following:
- the current high less the current low,
- the absolute value of the recent high less the previous close and
- the absolute value of the current low less the previous close.
By integrating this measure of volatility, the TRAdj EMA provides a more accurate and responsive representation of market trends. At least, that's the theory!
Moreover, by using TRAdj EMA with different lengths, traders can define turning points and filter price movements more effectively.
Understanding the TRAdj EMA is the first step towards leveraging its power in your trading strategy as we delve deeper into its calculation and application in the following sections. The main point of this article will be to test the TRAdj EMA indicator to see if it can help use build strategies. In short, is this indicator useful to us?
Calculating the True Range Adjusted Exponential Moving Average
Calculating the True Range Adjusted Exponential Moving Average (TRAdj EMA) may seem complex at first glance, but it's quite straightforward once you understand the components involved.
Let's break it down step by step.
The TRAdj EMA is calculated using the formula:
TRAdj EMA = Prior TRAdj EMA + MLTP * (1+TRAdj*MLTP_TRAdj) * (Price − Prior TRAdj EMA).
- The multiplier (MLTP) is calculated as 2 / (Time periods + 1). This multiplier gives more weight to recent prices, making the TRAdj EMA more responsive to recent price changes.
- The true range (TR) is calculated as the greatest of the following: current high less the current low, the absolute value of the current high less the previous close, and the absolute value of the current low less the previous close.
- The True Range Adjustment (TRAdj) is calculated as (Current TR − Minimum TR) / (Maximum TR − Minimum TR). The TRAdj fluctuates between 0 and 1, and it's then multiplied by MLTP_TRAdj, which can vary from 5 to 10.
OK that was a bit complex for my taste! I think I followed that but no worries if you don't. Then it comes to these indicators we're going to focus on the practical side of things and test if this indicator can be helpful to us. Can it help us build winning trading systems.
In the next section, we'll explore how to apply this powerful indicator in your trading strategy.
Applying the True Range Adjusted Exponential Moving Average in Trading
Now that we understand what the True Range Adjusted Exponential Moving Average (TRAdj EMA) is and how it's calculated let's explore how to apply it in your trading strategy.
The True Range Adjusted Exponential Moving Average (TRAdj EMA) offers two possible applications for building trading systems.
1. Trend Identification: The TRAdj EMA can be used with an exponential moving average of the same length to help identify the overall trend. TRAdj EMAs with different lengths can define turning points and filter price movements. For instance, the 200-day EMA and TRAdj EMA(200,200,10) captured the 2000–2003 bear market.
Pictured below is the daily chart of the E-mini S&P. The redline is the TRAdj EMA, and the thicker dark blue line is a 200 EMA. When the TRAdj EMA crosses below the EMA that would be a bearish signal. When the TRAdj EMA crosses above the EMA that would be a bullish signal. We can see how these two indicatommmrs defined the most recent bearish action starting and 2022 and ending in 2023.
2. Signal Generation: Moreover, the TRAdj EMA can be used to generate buy and sell signals based on crossovers with the price or another moving average. A bullish crossover, where the TRAdj EMA crosses above the price or another moving average, can be seen as a buy signal. On the other hand, a bearish crossover, where the TRAdj EMA crosses below the price or another moving average, can be seen as a sell signal.
It's important to remember that, like all trading indicators, the TRAdj EMA should not be used in isolation. It's most effective when used in conjunction with other technical analysis tools and market indicators. In the next section, we'll put the TRAdj EMA to the test and see how it performs in different trading scenarios.
Trend Testing the TRAdj EMA
I'm most interested in how this indicator may work as a trend filter. I often use the 200-bar simple moving average to define bullish and bearish regimes. For example, if the current price is above the 200-day SMA, I consider the market in a bullish regime. On the other hand, if it's below the 200-day SMA, it's in a bearish regime. Can this indicator do better? This test can easily be coded using EasyLanguage.
I coded a switch in EasyLanguage to switch between calculating a bullish or bearish regime usng my 200-bar SMA vs the new 200-bar TRAdj EMA. For this test I open a long trade during a bullish regime and sell short during a bearish regime. Then I used TradeStation optimization feature to optimize over the two different options. I did not account for slippage or commissions. I tested from 2006 through June of 2023.
Here is the code:
SMAorTRAdjEMA(0) {0-traditional 1-TRAdjEMA},
Periods(20),
Pds(20),
Mltp(5);
variables:
mySMA(0),
myEMA(0),
TRAdjEMA( 0 );
TRAdjEMA = True_Range_EMA( Periods, Pds, Mltp );
MyEMA = Xaverage(Close, Periods);
mySMA = average(Close,Periods);
if ( SMAorTRAdjEMA = 1 ) Then
Begin
if ( TRAdjEMA >= MyEMA ) then buy next bar at market;
if ( TRAdjEMA < MyEMA ) then sellshort next bar at market;
End
Else Begin
if ( Close >= mySMA ) then buy next bar at market;
if ( Close < mySMA ) then sellshort next bar at market;
End;
E-mini S&P Trend Results
SMA | TRAdj EMA | |
---|---|---|
Net Profit | $68,867 | $37,812 |
Profit Factor | 1.36 | 1.28 |
Total Trades | 149 | 28 |
Avg.Trade Net Profit | $462 | $1,350 |
Max Drawdown | $59,337 | $88,987 |
NPDD | 1.16 | 0.61 |
The SMA captures more profit. That's clear. It also produces a smaller drawdown. This is good. But look at the number of trades. The standard SMA regime filter has 149 trades vs the 28 with the TRAdj EMA. What does this mean? The standard SMA regime filter has a lot more whipsaws as seen below.
The image on the left is the standard SMA regime filter. As the price bounces above and below the 200-period simple moving average, several trades occur. Contrast that with the TRAdj EMA on the right-hand side. This cleanly calls the bear regime's end and a bull regime's start.
In short, the SMA will capture more profit but at the cost of many more trades. The TRAdj EMA will be more selective, capturing the major trend. We can see this in the number of trades and the average profit per trade.
So, which one is better? That depends. The standard SMA regime filter will react quicker but at the cost of more false signals. On the other hand, the TRAdj EMA is more efficient at calling the major trends. I like that. Both indicators will still have value, but I could see why the TRAdj EMA may work well as a regime filter.
Trend Results for Other Markets
Crude Oil
SMA | TRAdj EMA | |
---|---|---|
Net Profit | $95,560 | $138,170 |
Profit Factor | 1.38 | 2.48 |
Total Trades | 192 | 25 |
Avg.Trade Net Profit | $497 | $5,526 |
Max Drawdown | $119,320 | $120,240 |
NPDD | .80 | 1.15 |
Soy Beans
SMA | TRAdj EMA | |
---|---|---|
Net Profit | $72,087 | $46,000 |
Profit Factor | 1.71 | 1.98 |
Total Trades | 150 | 20 |
Avg.Trade Net Profit | $480 | $2,300 |
Max Drawdown | $38,000 | $31,112 |
NPDD | 1.90 | 1.48 |
Euro Futures
SMA | TRAdj EMA | |
---|---|---|
Net Profit | $107,700 | $59,413 |
Profit Factor | 1.85 | 1.88 |
Total Trades | 139 | 26 |
Avg.Trade Net Profit | $774 | $2,285 |
Max Drawdown | $49,368 | $77,350 |
NPDD | 2.18 | 0.77 |
As a trend filter it looks like the TRAdj EMA does well. It's consistently taking fewer trades and generating more profit per trade. I take this as a sign of defining the major trend better than the popular 200-bar simple moving average. It really reduces the number of false signals (whipsaws).
What do you think? Post your thoughts or questions in the comments below this post.
As I wrap up this post, I did not even test the TRAdj EMA as a signal for opening trades. That will be for another post.
Conclusion
In conclusion, the True Range Adjusted Exponential Moving Average (TRAdj EMA) presents a compelling alternative to the traditional Simple Moving Average (SMA) as a regime filter. While the SMA may capture more profit and produce a smaller drawdown, it also results in more trades, indicating more whipsaws. On the other hand, the TRAdj EMA is more selective, capturing the major trends with fewer trades, thus increasing the average profit per trade.
The choice between the two depends on the trader's strategy and risk tolerance. The SMA will react quicker but at the cost of more false signals, while the TRAdj EMA is more efficient at calling the major trends. Both indicators have their value and can be powerful tools in your toolbox. I plan to use TRAdj EMA and SMA in my strategy development process.
This exploration of the TRAdj EMA underscores the importance of understanding and experimenting with different trading indicators. As we've seen, even a slight adjustment to a traditional indicator can significantly impact trading outcomes.
As we've seen, the True Range Adjusted Exponential Moving Average (TRAdj EMA) is a powerful tool that can significantly enhance your trading strategy. But mastering this tool requires more than just understanding its calculation and application. It requires hands-on experience, guided learning, and the opportunity to apply your knowledge in real-world trading scenarios. That's where System Development Master Class comes in.
My System Development Master Class is a comprehensive 90-day program designed to fast-track your journey to becoming a profitable system trader. We focus on teaching you to code in EasyLanguage, build and validate trading systems, and deploy those strategies to the live market. Join our System Development Master Class today and take a giant leap forward in your trading career.
Remember, the key to successful trading lies not just in the tools you use, but also in the strategies you develop and your understanding of these tools.
Happy trading!
Excellent article Jeff, thank you. Worth investigating further, I’m sure. Thanks for bringing it up.
You’re welcome!
Hello can not use True_Range_EMA( Periods, Pds, Mltp ); What is it ?
Can you be more specific? Why can’t you use it? What error are you getting? Did you load the ELD file?
cannot find the downloads
Did you watch the “Start Here!” video?
https://easylanguagemastery.com/learn/login