Jump to content

Moving Average Angle Indicator


PyeR2

Recommended Posts

Hi everyone. I am sharing an idea that I have in the hope that I can get one of the talented coders in this forum interested enough to create an indicator. Before you stop reading and bail to the next thread just let me say that this is not your usual newbie request. I am a profitable forex trader with 9+ experience. I believe my concept to be unique and elegant & most likely useful in the development of future EA's down the track.

 

I believe that it would be very useful to be able to measure the steepness or angle of a trend, however the major problem in achieving this is automatic scaling of the price scale which depends on the range of the price action on the screen and the zoom setting selected on your chart. I'm sure you've all experienced those big spike candles or broker price anomalies that totally distort the look of the chart. I do realize that it is possible to view the chart at a fixed scale however this is impractical as the scale constantly needs to be reset depending on the time-frame / pair / etc etc.

 

ENTER MY SOLUTION:

An indicator that calculates the specific angle of a moving average based on a time to price scale that is determined by the ATR of the pair and time-frame that you are viewing - In other words it would self adjust to whatever time-frame and pair so that it gave a meaningful angle. I also have an idea for a 'hybrid ATR' - more on that later.

 

http://www.mediafire.com/file/zbnznyd5kyy/MA_Angle.rar (download diagram)

 

I would like to point out that this is a very different concept to the MA_AngleZeroSigma indicator that has been used in many of the scalping EA's such as My_Lucky etc etc.

 

THE CALCULATIONS:

To calculate the angle of a moving average it is a simple trig calculation using the TAN function.

The length of the 'opposite' side is simply the difference between the MA price at the close of the current period minus the MA price at the close of the previous period.

The length of the 'adjacent' side is a value we assign to the distance from the center of one candle to the next. I believe the best way to determine this value is to use the ATR value over a reasonable length (eg 50 period ATR) so that it does not vary too much but gives us a value that is characteristic of the volatility of that pair and time-frame.

 

The 'Hybrid ATR' that I mentioned earlier would differ in that it would calculate the ATR based on the average range of the last n periods for a specific time of the day. So instead of simply averaging the last 50 periods, it would average the last 50 periods for that time of the day over the last 50 days. ie todays 10.05 candle + yesterdays 10.05 candle + the day befores 10.05 candle etc etc divided by 50. I believe the advantage this would have is that it would compensate for the lag that the ATR has when you move from the Asian session into European session. The volatility of the hybrid ATR should increase much more quickly than the standard ATR. It should also compensate more effectively for other known periods of higher volatility such as the US open when news is often released and also the waning volatility seen as the US market closes and drifts into the Asian session.

I must say that I am not 100% convinced that the hybrid ATR would improve the functionality of the indicator and I would be more than happy to see a version created that uses a simple ATR calculation, however I would be very interested to also see a version with the hybrid ATR to see the difference and whether there was an advantage to it.

USING THE INDICATOR:

The main use of the indicator would be to determine the strength of a trend based on the angle of the moving average (eg a 21 period MA). A threshold would be set for the angle by the user and if this threshold was reached or exceeded then the market is considered to be trending strongly and we look for a trade. I cannot be certain what the threshold would be, however I would hazard a guess at 45deg.

The indicator could be displayed in the chart window, with the color of the MA changing - for example green if >+45deg, white if between -45deg and +45deg and red if <-45deg. Sound alerts may also be useful too.

 

The other way to display the indicator would be as a separate lower indicator similar to an RSI with a center line and your threshold lines being similar to the overbought / oversold levels. The right hand scale would be in degrees for example from -60deg to +60deg. Once again if our indicator meets or exceed our thresholds then the market is considered to be trending strongly.

 

Another potential use may be as a filter for scalping if the market is seen to be not trending. Perhaps the thresholds could be set a lot lower for example 30deg for this purpose.

 

Obviously both versions would be nice to have however I would be most grateful for anything at all.

Other nice to haves would be the ability to choose MA types, MA price and also MTF.

 

Well if you're still reading I'm amazed! I hope I have managed to make sense. I have attached a diagram to better illustrate the concept. I hope that I have been successful in kindling enough enthusiasm in someone with some coding ability to create this indicator for our forum. I have searched the internet quite thoroughly & don't believe there is anything else like it in existence. I am 100% available for beta testing or more information / brainstorming etc so please do not hesitate to ask.

 

Cheers Pye.

 

Download diagram of concept & a couple of other MA's in color that may be useful to anyone that wants to have a go at getting this thing working.

http://www.mediafire.com/file/zbnznyd5kyy/MA_Angle.rar

Edited by PyeR2
add download link
Link to comment
Share on other sites

the angle would change depenging on how far zoomed in you are to the chart..

having a Rise/Run indicator would be more useful

 

No my friend I don't believe it will. Visually on the chart it will change however the actual angle calculated by the indicator does not. This is the whole point of the indicator.

Link to comment
Share on other sites

Interesting idea.

 

A couple of months ago I spent some time trying to find something like this to help with trading alongside the DeMark TDCombo method but I failed to find anything other than the two that you've included in your zip file (and one more called MA_Angle_v4 which you can get via google).

 

Looking at your PDF I don't think it'd be too difficult to code but it's beyond my level. There are some good coders on here so maybe someone will step in to help.

Link to comment
Share on other sites

I agree you wouldn't think it would be all that difficult to code but not being a coder that's easy to say. Like someone once said everything always takes longer and costs more than you expect. I do hope a coder does take an interest though as I'm sure it would be of benefit.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...