IkkeOmar

Normalized Adaptive Trend Lines [MAMA and FAMA]

These indicators was originally developed by John F. Ehlers (Stocks & Commodities V. 19:10: MESA Adaptive Moving Averages). Everget wrote the initial functions for these in pine script. I have simply normalized the indicators and chosen to use the Laplace transformation instead of the hilbert transformation

How the Indicator Works:
The indicator employs a series of complex calculations, but we'll break it down into key steps to understand its functionality:

  • LaplaceTransform: Calculates the Laplace distribution for the given src input. The Laplace distribution is a continuous probability distribution, also known as the double exponential distribution. I use this because of the assymetrical return profile

  • MESA Period: The indicator calculates a MESA period, which represents the dominant cycle length in the price data. This period is continuously adjusted to adapt to market changes.

  • InPhase and Quadrature Components: The InPhase and Quadrature components are derived from the Hilbert Transform output. These components represent different aspects of the price's cyclical behavior.

  • Homodyne Discriminator: The Homodyne Discriminator is a phase-sensitive technique used to determine the phase and amplitude of a signal. It helps in detecting trend changes.

  • Alpha Calculation: Alpha represents the adaptive factor that adjusts the sensitivity of the indicator. It is based on the MESA period and the phase of the InPhase component. Alpha helps in dynamically adjusting the indicator's responsiveness to changes in market conditions.

  • MAMA and FAMA Calculation: The MAMA and FAMA values are calculated using the adaptive factor (alpha) and the input price data. These values are essentially adaptive moving averages that aim to capture the current trend more effectively than traditional moving averages.



But Omar, why would anyone want to use this?
The MAMA and FAMA lines offer benefits:
The indicator offers a distinct advantage over conventional moving averages due to its adaptive nature, which allows it to adjust to changing market conditions. This adaptability ensures that investors can stay on the right side of the trend, as the indicator becomes more responsive during trending periods and less sensitive in choppy or sideways markets.

One of the key strengths of this indicator lies in its ability to identify trends effectively by combining the MESA and MAMA techniques. By doing so, it efficiently filters out market noise, making it highly valuable for trend-following strategies. Investors can rely on this feature to gain clearer insights into the prevailing trends and make well-informed trading decisions.

This indicator is primarily suppoest to be used on the big timeframes to see which trend is prevailing, however I am not against someone using it on a timeframe below the 1D, just be careful if you are using this for modern portfolio theory, this is not suppoest to be a mid-term component, but rather a long term component that works well with proper use of detrended fluctuation analysis.

Dont hesitate to ask me if you have any questions

Again, I want to give credit to Everget and ChartPrime!

Join my community where i share signals and my secret algos:

Telegram:
t.me/ikkeomarfree

I can also help you get $50.000 funded!

Just dm my Telegram @IkkeOmar
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?