| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| New MA MTF indicator https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5318 |
Page 1 of 4 |
| Author: | tomele [ Fri Oct 27, 2017 5:08 pm ] |
| Post subject: | New MA MTF indicator |
Hello @all. This is for all fans of one of the oldest and simpliest indicators - moving average. A single moving average may be simple, but how about the interaction of five? You all know this: If MA1 crosses MA2 and price is there and there... It quickly adds up. There are basically three ways to derive information from a set of moving averages: The slope of each, the relative position of any two of them and the relative position of price action to each of them. With five moving averages, you get exactly 20 different puzzle pieces. My approach to this is a very simple "fuzzy logic". I mix them all up and convert this into a score ranging from -100 to +100. This score now tells you the grade of bullishness or bearishness of all this information put together. The inputs are mostly self-explaining. You may input period and method for 5 or less MAs, you may ignore some of the calculations and so forth. Please obey the directive about the ascending order of the MA periods or you will confuse the calculation. The ouput comes in two flavours: As used from my last project, 4 bars for 4 timeframes (the actual and the next 3 higher ones). Flavour 1 plays with the brightness of the datapoints. The brighter they are, the higher is their score. Nice and fuzzy. Flavour 2 is the "defuzzyficated" version. It simply shows green if the score is above a definable threshold and red for scores below minus the threshold. The rest inbetween stays black. The MA defaults are taken from one of my trading setups. Feel free to play with them and to propose setfiles that work better. UPDATE 29-10-17: This indi has now evolved into a workbench for mimicing nearly every strategy that involves moving averages. I have added a few features: 1. An input for the type of price calculation to use for every MA 2. A mask to define which of the timeframes to display and respect in the calculation 3. Masks to define which of the MAs to respect in each timeframe 4. An overall strategy for calculation of the final signal from the timeframe signals 5. An option to show signals in the main chart as result of the overall strategy Yes, it got a little bit complicated. But as powerful. To help you in using this beast and give you a starting point for your own research, I provide some very well-known strategies based on moving averages as setfiles: 1. MultiMovingAverage by Alex5757000 v2.1. This is the indicator that @fxozgirl uses very succesfully, see here: http://www.stevehopwoodforex.com/phpBB3 ... 827#p99364 Its basically about using slopes of 4 different EMAs on the same timeframe. Because of the same timeframe, it condenses to one bar in my indi. The signals are the same. 2. A system called "3 Little Pigs". One of the first MA-based trading systems I stumbled upon in my trading. It uses price action compared to three different MAs on three timeframes. Hence I had to introduce the "TimeframeXMAsToUse" mask. Have a look at it, its still valid and profitable. It is intended to be used on the H4 trading timeframe. 3. "Three Ducks" system. Price action compared to SMA 60 on three time frames, while the second of the timeframes in my equidistant system is ignored. Also interesting signals. I had to introduce the "TimeframesToShow" mask to implement this. It is intended to be used on the M5 trading timeframe. Play with it. There is a lot in it. Use the setfiles to learn about already profitable setups and develop your own. Then let the others participate on your findings. No knee-capping on most questions how to use it. Only on very stupid ones. UPDATE 6-11-17 The input section has changed, so save your settings before loading the new versions. Two new smoothing algorithms are available: First is TMA (Triangular Moving Average) in the way it is normally calculated in this forum. There are other ways though. You can use this for example to implement a very interesting HURST-alike trading system using TMA(5) and TMA(11). I have uploaded the setfile as well and the signals look awesome. Second is TPB (Ehler's Smoothed Two Pole Butterworth). @pacinvest asked to implement that one and will hopefully provide us with a killer setup to use it. Thanks, Vince. Other changes: Alerts on new strategy signals are now selectable. And then there is a new toy: Originally written as a tool to check my coding of smoothing methods, this has evolved into something own. It is an indi to visualize all the MAs you can configure in "MTF MA Bars" and is called "MTF MA Lines". It can be used independently with its own inputs or take its configuration from "MTF MA Bars". Then you can see everything that influences the calculation of "MTF MA Bars". See last picture attached. Of course I dont trade with 20 MAs on the screen. But if you use few MAs like in the attached setfiles, it is a real good visualization. Before you ask, the step lines are normal for higher timeframes. Outlook: I receive requests to add different smoothing methods to this system. I will, if they look interesting and are codeable without extreme effort. But everyone who asks me to implement a method will have the obligation to provide a setfile for this method then. I will eviscerate everyone who sends me a "nice to have" request and doesnt deliver afterwards. UPDATE 8-11-17 A quick excursion on "repainting" of MTF indicators It is common to many MTF indicators: They dont actively repaint, but on refreshing the chart the historical values of higher timeframes change. This has a simple reason: If you ask Empty4 for the values of a historical bar, you receive OHLC of the finished bar. If you need an historical value for a point in time somewhere inside this higher timeframe bar, you dont receive the then-known close. You receive the final close value that - seen from that point in time - lies in the future. That of course causes a difference between actual values (where you dont know the future) and historical values. And as the realtime calculated values become historical ones as soon as you refresh, they get "repainted". There is a very simple solution to solve this dilemma: Let the indi only use values that were really known at each point in time. So if you want to have historical values identical to realtime values, base all your calculations on the OPEN of the bars. Then there will be no difference between realtime and history. By the way, the TPB smoothing method doesnt have this problem as it is solely based on OPEN values. An even better solution would be to implement calculations for higher timeframes that are based on the then-known values (and quasi hide the future). One of the next versions of my indi will possibly have this capability. UPDATE 10-11-17 A quick excursion on TMA and its perils. TMA puzzled me, so I had a deep dive into its mechanisms. You might know this: All over the internet, there are people warning you that TMA always repaints. I was one of them. Today I am a little bit more educated: TMA has two souls in it, one good and one evil. Let me explain. For a given point in time, TMA calculates back in time (good), then it calculates forward in time (evil). Of course, in realtime the evil part doesnt work. It then is simply ignored. That means every history bar is fake as it is based on a future that wasnt know then. Sounds familiar? Yes, we know this problem with higher timeframes if we base our calculation on anything other than the OPEN of the bars. The real evil part is that TMA does this with the actual timeframe regardless of price. Why would anyone invent a smoothing method like this? I really dont know. It looks like an attempt to make something look better than it is. It might have its merits if you look back in time to highs and lows of it like a ZigZag indicator. For my purposes, it is bollocks. So do we throw it into the bin? Naa. So many trading systems are based on it. To be exact, on the realtime part. There must be something in it. And now we can use it. I have sneakyly murdered the loook-into-the-future part and now you have an indi that shows you for all bars what you would have seen in realtime then. I call it the realtime TMA or "RTMA". Have fun. |
|
| Author: | Wavegarrick [ Fri Oct 27, 2017 5:29 pm ] |
| Post subject: | New MA MTF indicator |
Thomas, You have a very creative mind, let alone the fact that you can code. I am impressed. Not many like you Cheers Leon |
|
| Author: | tomele [ Fri Oct 27, 2017 5:48 pm ] |
| Post subject: | New MA MTF indicator |
Thank you, Leon. I only search for things to compensate my trading disability. |
|
| Author: | thomasmore [ Fri Oct 27, 2017 9:02 pm ] |
| Post subject: | New MA MTF indicator |
Wow ! Thats all I can say :yahoo: cheers , thomasmore |
|
| Author: | tomele [ Fri Oct 27, 2017 9:25 pm ] |
| Post subject: | New MA MTF indicator |
Thank you. Stay tuned. A few more things yet to come. |
|
| Author: | tomele [ Sun Oct 29, 2017 5:36 pm ] |
| Post subject: | New MA MTF indicator |
Hi @all. A new version with some important additions is in post 1. Please read the EDIT in the post thoroughly. Have fun. |
|
| Author: | thomasmore [ Sun Oct 29, 2017 6:55 pm ] |
| Post subject: | New MA MTF indicator |
:clap: :clap: :clap: :clap: :clap: !! |
|
| Author: | renexxxx [ Sun Oct 29, 2017 7:13 pm ] |
| Post subject: | New MA MTF indicator |
This is truly amazing! You are on a roll my friend! |
|
| Author: | taipan [ Mon Oct 30, 2017 8:12 am ] |
| Post subject: | New MA MTF indicator |
Thank you for your sharing, Thomas. |
|
| Author: | vsmakkal [ Mon Oct 30, 2017 8:19 am ] |
| Post subject: | New MA MTF indicator |
Yes, Thomas. Thank you very much! Sara |
|
| All times are UTC | Page 1 of 4 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|