Introduction

An exponential moving average (EMA) is a type of moving average that places a greater weight and significance on the most recent data points.

An exponentially weighted moving average reacts more significantly to recent price changes than a simple moving average, which applies an equal weight to all observations in the period.

Lines that were a certain amount above and below the moving average form the envelopes.

Indicator type

Trend

Formula

movav = prev * (1.0 – smoothfactor) + newdata * smoothfactor​                        where smoothfactor =1- 2 / (1 + period)

Top or Upper value of the band calculated as ema*(100+perc)/100

Bottom or Lower value of the band calculated as ema*(100-perc)/100

How to use:

The EMA is a moving average that places a greater weight and significance on the most recent data points. Like all moving averages, this technical indicator is used to produce buy and sell signals based on crossovers and divergences from the historical average. Traders often use several different EMA lengths, such as 10-day, 50-day, and 200-day moving averages.

Bullish Scenario

  • When the price crosses above the upper band, it indicates that the current price is greater than the average of the defined period, hence the market is in an upward trend

Bearish Scenario

  • When the price crosses down the lower band, it indicates that the current price is lower than the average of the defined period, hence the market is in a downward trend.

Building On Mudrex:

You can create strategies on Mudrex using simple ‘blocks’. You can connect multiple blocks and define conditions on those connections or ‘paths’ to create your strategy on Mudrex.

As discussed above, lets first write our entry/exit conditions so that we know what to do:

BUY: When price crosses up the upper band.

Compare Block for BuySignal over Mudrex

SELL: When price crosses down the lower band.

Compare Block for Sell Signal over Mudrex

Final Strategy: The final strategy on Mudrex looks like this

EMA Envelope Trading Strategy over Mudrex

Testing

We can now run a quick back-test to see how our strategy performs.

Back-Test Results for EMA Envelope

Quick links