# How Best to Calculate EMA Angle or % change? Is this correct?

Hi, I am looking for the correct indicator that provides us with the percentage change of an EMA per candle or the %age change over a range of candles. The %age change would be higher (or lower) reflecting the Angle of the EMA.

Objective: to be able to create an alert to enter a trade when a strong trend (measured by a strong EMA angle - say 45 degrees or higher). Is there a better way than as follows?

I have created the following EMA indicator ( and attach x2 screenshots) but cannot get unit value for the %age change, therefore have to manually calculate / estimate the %age change.

Add Indicator, Indicator Selection - DIVIDE, Value 1 - Exponential Moving Average, Source Data - Median Price, Period 7 (for 7 EMA), Value 2 = 1 ( this provides me with a bigger number than if dividing the EMA by 100).

As you can see on the screen shots the EMA now has a value, therefore, it is possible to calculate manually the %age change in the angle, but this is hard work and very, very time consuming.

The results are excellent if you set up an entry when a very strong angle or EMA %age change is in progress.

Is there a better way to build the indicator? I believe such an indicator substantially increases the opportunity to enter a high probability trade in a strong market momentum - feed back and help welcomed.

File size:
388 KB
Views:
206
File size:
333.5 KB
Views:
233

2. ### roblausNew Member

This won't do?

Hi Roblaus, thank you for your feedback, as my first post its great to see members being active.

I have found this facility but my testing seems to show results is for the specific percentage, say 0.05%. When I apply the same percentage to another FX Pair whose EMA angle may deeper or stronger, then I get poor results back from back testing. That leads me to think the alert will only work when the fall of the ema is actually 0.05% ?

If we had the option " Percentage equal to or greater than" - that would be perfect because if the price rises or falls even more sharply, the greater the probability of a winning trade and the option caters for all opportunities above 0.05%.

Is this your experience or am I mistaken?

4. ### Customer CareJohn @ timetotrade

Adding to Rob's comment, you could consider taking a look at the Momentum indicators, such as: https://wiki.timetotrade.eu/Momentum

There are a number of Momentum indicators, therefore search for the key word 'momentum' in the chart settings.

In the following example the Momentum indicator source data has been set to the EMA 20, with the Momentum based on the differences between the EMA 10 candles in the past. Vary the Momentum period to change the historical reference point for calculating the Momentum:

There is a related post on calculating the gradient on a Moving Average, with a custom indicator that may also be of use: https://forum.timetotrade.eu/threads/bollinger-band®-channel-trading-strategy.274/#post-836

Hope this helps.

John

5. ### roblausNew Member

Yes, I wasn't very satisfied either and I share your suspicion. I wasn't aware of the momentum as John mentions and I am currently testing...

Have been away over Bank Holiday period, now testing the custom indicator for the Gradient of a Moving Average John mentions a few lines above. Will advise when I have some meaningful results, hopefully in the next few days. Bradlee

I am getting closer but not quite found the solution I am looking for. I attach x4 screen shots which shows how I have built the EMA Gradient Indicator, the alert parameters and the back testing results. For simplicity I will talk in terms of a Short trade requirement.

Objective: to trigger an entry when the EMA's are in a strong down trend - to capture entry points between a minimum angle, or %age descent, AND of a higher angle or %age descent e.g. when the descent is "equal to or greater than" say 15%.

Results Summary:
The back test results show where the rsi has crossed below (40) when the 36 EMA x1 candle descends 15%. However, where the descent is greater than 15%, they are not included - see x6 lines in the middle and to the right of the chart.

Is there a solution I can be advised of? These are sure fire winners and it is when the EMA is in these two steep declines that I want to enter the market.

The chart shows an EMA Gradient indicator for the 36 and 100 EMA's. They are set at x1 candle to try to reflect the EMA in the price chart.

Best Results:
Being able to set a descent "equal to or greater than" will allow for the 100 EMA Gradient indicator to be set at say 5% to reflect the 100 EMA being in a downward trend. This would remove the x 3 losing entries in an uptrend highlighted by the arrows in the backtest results.

With the x6 additional winners and the entries in the uptrend removed, we would have excellent results.

File size:
373.7 KB
Views:
187
File size:
128.2 KB
Views:
186
File size:
90.9 KB
Views:
198
File size:
107.7 KB
Views:
199

8. ### Customer CareJohn @ timetotrade

You could use the Momentum indicator to determine the rate of change in the EMA Gradient, then check if the EMA Gradient Momentum is above or below a value. Set the source data of the Momentum indicator to your EMA Gradient, or import the custom indicator that is show in the screen shot using the code: E165-B35E-95B8. Click here to learn how to import custom indicators into timetotrade.

To create alerts for when the EMA Gradient is above of below a threshold, use the threshold triggers and then edit the trigger in the Alert Builder to check if above / below:

Hope this helps.