Since the angle of an average can not be calculated (only an approximation can be calculated - see this post for further explanation : https://www.mql5.com/en/forum/173056/page3 ) using a points/pips slope as a treshold would require constant adjusting for each and every symbol and each and every time frame (because they differ a lot in all those cases) Maybe that was the reason that you could not do that?
Thank you for pointing out a possible reason for my unsuccessful experiment. Well, you are right: I forgot your earlier explanation and your indicator of Angle of average although I saw it at that time. OK, I will try to code a neutral zone again, later this week.
Try out this version. Added angle calculation as the one used in the angle of average indicator. If the AngleTreshold is > 0 then it measures the angle and if the slope is right (they are showing in the same direction) then the indicator shows according colored histo bar. If the angle is <= 0, then purely the slope of the kaufman ama is used (it works the the same way as before - without the angle treshold).
Here is the comparison of all :
Oh, thank you Mladen I really appreciate your helpfulness and incomparable programming skill!
One more average/smoother that due to its fractional calculation period possibility can be used to be made adaptive
Some call it Jurik smooth some don't. Since it is not a Jurik MA left simply the name to be "smoother". The bigest difference is that this one is adaptive too unlike the similar ones that can be found floating on the net. In this one the adapting method used is a standard deviations method
PS: to turn the adapting of, set the adapting period to 1
PPS: it seem that wit longer periods the adapting gives better results but better to experiment a bit with it (lower example has adapting period set to 50 and calculating period set to 25)
Moving Average Distance From Price And Crossover
Hi mladen, Linuxer, and all.
I appreciate all the inputs here and hope I can find a solution here as well. I am not a programmer and that's why I need your help. Could anyone create two ma indicators with the following properties:
1) moving average (ema and sma) distance from price...I should be able to change the settings for the moving averages and it should have an alert when the distance of the moving average from price reaches a certain pip level....that would be great for my strategy.
2) the second one should be a crossover of sma and ema i.e. 20 ema and 100 sma crossover.
I hope there is someone out there who could help me. thanks
For averages crosses, you can use the indicator posted at this post : https://www.mql5.com/en/forum/general . Set the MAMethod to 0 for SMA and set the another MAMethod to 1 for ema and that way you can have any cross of SMA and EMA (or any other built in averages types : 2 -> SMMA and 3 -> LWMA)
Mladen, thanks a bunch for the indicator. The MA crosses was exactly what I had in mind. Can't thank you enough for sparing your time to help. Please am sorry for being a bother but if you have any MA distance from price indicator I would really appreciate if you could share or post a link to where I can find it. The link of the one I found in this thread seems to be invalid or perhaps the attachment has been removed. Would appreciate further help on this as I have searched for it on the internet to no avail. Thank you once again, Mladen.
One version of indicator showing distance of a price from some moving average you can find at this post : https://www.mql5.com/en/forum/general
Mladen, you are a great guy. Awesome. I just downloaded that version and will check it out but I have no doubt it suits me well.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.