Without repeating all the tons of documentation about what does, let's quickly re-visit the concept from a 10-mile altitude (note we're keen on simplifying here rather than being technically accurate - so please forgive the use of any "common lingos")
- goal is to represent the distance between 2 Moving Averages (MAs) - one fast and one slow, relatively - as an unrestricted zero-based oscillator.
- The value of the main line is the distance, or the displacement between the 2 MA's
- usually a signal line is used (which is another MA of that distance value) to enable better visualization of the change (and , since this is all depicted on a time axis) of that displacement - this represents price momentum (price movement in the recent period versus movements for a relatively longer period).
- the difference between the main line and its signal is then represented as a histogram above and below the zero line. in this case, that histogram is really redundant, since it shows a value that is already represented visually by the main line and its signal line.
How K-MACD is different
K-MACD takes that simple concept of the classic and expands around it - the idea is to use the same simple approach to representing price momentum while bringing in more insight to price moves in the short, medium and long terms, ability to represent more than 2 MA's and to enable better identification of tradeable patterns (like Contraction and others) - while still keeping things simple and visually clean.
K-MACD is an indicator that allows us to view how price moves against 3 moving averages: a fast / slow pair, and a "market" Filter or Baseline (very long) that will be used as a flag for Bear/Bull market mode. Many traders and trading literature use the 200 day ( 40 week) as that key filter
so in total, there are 4 MA lines in K-MACD (excluding the "orange" signal line):
* Price Proxy: Which is a very fast moving average that will represent the price itself - let's use a (3) or something close to that here - there will be a signal line to enable better visualization of this similar to a classic - that's the orange line
* Fast & Slow MA's : Use whatever represents the "medium term" momentum for your trading - Some traders use 20 and 50, others use 10 and 20 .. if on your price chart, you keep using a pair of MA's for this, use the same settings in K-MACD - these will be represented by the 3-color Momentum Bars that fluctuate above and below the baseline
* Filter/Baseline MA: Should be your long ( / Mode) MA. so 100 or 200 or any other value you consider your market to be below and above. on K-MACD this is actually the blue zero line - everything else is "relative" to it
Review the sample chart which explains various elements and the "price chart" setup that K-MACD represents. With K-MACD you can clean up your chart from those various Moving Averages - or use a different set than the ones you already have K-MACD represent - or other indicators (like ATR channels..etc)
Other "muscles" in the K-MACD
- Relative vs Classic Calculation Mode
A key issue with the classic is that the displacement between the 2 moving averages is represented as "absolute or direct" values - as the price of the underlying increases with time, you can't really use these values to make useful comparison between the past and now (see below example) - also you can't use them to compare 2 different instruments.
- The "Relative" calculation option in K-MACD addresses that issue by relating all "distances" to the Baseline MA as percentage (above or below) - you can see this clear when you look at the above chart the far left versus the far right and compare K-MACD with the classic - the Classic option is still available
- More MA "type" options for all MA lines: choose between , , , and RSS_WMA (which i use a lot in my trading and is my default for the Price Proxy)
- More Alerts: a total or 9 alerts (in 3 groups) are available with K-MACD (Momentum above or below baseline, Price Proxy crossing signal line, and Price Proxy crossing baseline)
- New 52 week High / Low markers: These will show as Green/red circles on the zero line in K-MACD. this will only work for 1D timeframe and above, i'm just using a simple approach and would like to keep it that way.
- i know i added some more features not covered above :) -- if you have questions about any of the settings, feel free to ask below
K-MACD is a combination of couple of indicators i published in the past (xMACD and Mo_Bars) - so you can go back and read about them if needed - I then added improvements to accommodate ideas from swing trading literature and common practices that i plan to focus on in future. So K-MACD is really part of my own trading setup.
I assume here that most traders are familiar with what a is - so kept this post short - if you thing we should expand more about the concepts covered here let me know in the comments - i can make some separate posts with examples and more details.
I hope many fellow traders find this work useful - and feel free let me know in comments below if you do.
Made few updates based on initial feedback and my to-do list
- Improved the "New 52Wk Hi/Lo" approach to support symbols with less than 53 Weeks from IPO (like MBLY). Starting week #2, new all-time Hi/Lo's will be flagged - doesn't affect symbols that are already > 52 weeks since IPOs
- Added value for "Price % within 52Wk Hi/Lo range" - will print on the indicator status line and in the data window (see below chart) - and although this will not work for timeframe less than 1D (cause the calculation is based on the daily bar close) - i decided to leave it on lower TF's cause i believe it's still valuable (in lower TFs, may show values above 100% or below 0 - that's not a bug)
- The Price Proxy line is now dual-color similar to the xMACD -- changed default color of the signal line from orange to aqua which works (visually) better against a green/red main line.
- added Moving Average Type option for the Proxy Signal line, with default as EMA .. which can work better as a signal line compared to WMA -- but can be changed back in the settings
- couple other minor code tweaks and clean-ups
- Quick code fix for calculating all-time Hi/Lo instead of "new 52-wk Hi/Lo" for periods before 52 weeks since IPO
قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.