DasanC

MESA Adaptive Moving Average

DasanC 업데이트됨   
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

Need Indicators/Strategies for TradingView? -> t.me/pinescripters_jobs
General questions about Pinescript? -> t.me/pinescripters
오픈 소스 스크립트

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

면책사항

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

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