EmpiricalFX

MESA Adaptive Moving Average

Intro
One of Ehlers most well-known indicators! I've seen many variations of this on TradingView, however, none seem to be true to the original released by Ehlers himself.
I've taken it upon myself to simply translate the MAMA into Pinescript, instead of re-writing like some others have done.

You can use it as a very effective & adaptive moving average with other signals or
as a standalone signal.

In the case that you're going to use it for signals and not simple technical trading (non-quantitative),
I've also added a threshold parameter to filter out weak signals.

My MAMA indicator is different from others in very simple ways - I don't use the nz () command, which sets all "Not a Number" values to 0. In others' scripts, you immediately load the indicator with several 0 values,
causing a slight lag in future calculations since this code is recursive (refers to previous values it generated).

In my version, I simply wait until the script has access to all the bar data it needs, instead of instantly performing calculations and
setting erroneous values to 0. In this case, we start with the correct values (or closer to correct).

If you want to compare this indicator the current most popular MAMA by LazyBear, you'll notice it often gives buy and sell crosses one bar earlier than theirs.

Setting Parameters
  • Source - the data series to perform calculations on. (Initially, Ehlers himself favored hl/2, but conceded that there isn't empirical benefit over close.)
  • Fast Limit - controls how quickly the MAMA will "ratchet up" fast price action. (Higher values are faster)
  • Slow Limit - controls how closely the FAMA will follow the MAMA . (Again, higher is faster. You typically want the FAMA to be slower though.)
  • Crossover Threshold - simple error thresholding to limit the number of weak trade signals. (Lower means lower tolerance)
  • Show Crosses? - show/hide the arrows at moving average crosses
릴리즈 노트: Forgot to convert one Trig operation to Radians
릴리즈 노트: Update as requested by user @ant187:
- You now have the option to fill the area between the moving averages (disabled by default)
릴리즈 노트: An additional quick update to change the fill color based on the crossover status.
-Default is red and blue, with a transparency of 90%
릴리즈 노트: LOTs of changes here!
  • Updated to Pinescript version 4.0
  • Removed confusing settings
  • Added Multi-timeframe plotting support (defaults to current chart timeframe)
  • Bug fixes with logic
오픈 소스 스크립트

진정한 TradingView의 정신에 따라, 이 스크립트의 작성자는 스크립트를 오픈소스로 게시했기에 거래자들이 이해하고 확인할 수 있습니다. 작가님께 건배! 스크립트를 무료로 사용할 수 있지만, 게시물에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 당신은 스크립트를 차트에 사용하기 위해 그것을 즐겨찾기 할 수 있습니다.

Want to use this script on a chart?

코멘트

This is awesome, and as you mentioned more accurate than other mesa's on this site.

I use MESA extensively in my trading and I vastly prefer yours...however, the other ones have a "FILL" option and I've grown accustomed to utilizing that, is there any possible chance you could find it in your heart to make a version with the fill added?

Would be greatly appreciated by myself, and I'm sure many others that utilize this awesome tool.

Either way, thanks again for your contribution, it's a marked improvement on a great and undervalued indicator..and hey...lets keep it that way..can't let the algo's know we're using their stuff now can we ;P

Thanks again regardless
+1 응답
@ant187, Done! Glad you're enjoying the script :)
응답
Thanks for the indicator, it works great! After some observations seems to be really reliable catching mid term trends avoiding whipsaws, even working in lower timeframes.
응답
ecletv ecletv
Using crossings to know the actual trend, works similar to the one I am using: Hurst cycle channel oscillator, applied to the VIDYA of the price (with R2 k constant instead of CMO). The 0 crossings are lagging but very specific, tend to coincide with your MESA crossings.
응답
Probably one of the most complex user defined single functions ever! Great work man!
응답
Thanks for sharing!
응답
홈으로 스탁 스크리너 포렉스 스크리너 크립토 스크리너 이코노믹 캘린더 사용안내 차트 특징 프라이싱 프렌드 리퍼하기 하우스룰(내부규정) 헬프 센터 웹사이트 & 브로커 솔루션 위젯 차팅 솔루션 라이트웨이트 차팅 라이브러리 블로그 & 뉴스 트위터
프로화일 프로화일설정 계정 및 빌링 리퍼드 프렌즈 코인 나의 서포트 티켓 헬프 센터 비밀메시지 채팅 로그아웃