everget

Ehlers MESA Adaptive Moving Averages (MAMA & FAMA)

Ehlers MESA Adaptive Moving Averages ( MAMA & FAMA) script.

These indicators was originally developed by John F. Ehlers (Stocks & Commodities V. 19:10: MESA Adaptive Moving Averages).
Release Notes: Added missed radians to degrees conversion. Thanks to @sal157011
Release Notes: Added ribbon filling
Release Notes: Refactored
Release Notes:
  • Fixed issue with decimal step in inputs
Release Notes:
  • Refactored
Release Notes:
  • Fixed error and refactored
Release Notes:
  • Converted to v4
  • Added alerts
Remove from Favorite Scripts Add to Favorite Scripts
A list of Free indicators:
https://bit.ly/2S7EPuN

A list of Paid indicators:
https://bit.ly/33MA81f

Earn $30:
https://www.tradingview.com/gopro/?share_your_love=everget

Toss a coin to your witcher:
PayPal: https://www.paypal.me/alexeverget

Comments

The code is wrong because in Tradestation the function atan() returns degrees while in PineScript returns radians.
To fix the problem the result of the function in degrees must be converted into radians multiplying it by 180/pi.
You must create de variable pi= 3.14159265359 first and
line 50 mesaPeriod:= 360/atan(Im/Re) must be rewritten into mesaPeriod:= 2*pi/atan(Im/Re)
line 72 phase:=atan(Q1/I1) must be rewritten into phase:= 180/pi * atan(Q1 / I1)

note: 360º = 2*pi radians

The chart should look something like this

+4 Reply
everget sal157011
@sal157011, thank you. My bad.
Reply
How would you compare this to the JMA (jurik moving average)? Have you tested/compared it?
+2 Reply
everget janor123
@janor123, yup
Reply
This is awesome!

I was thinking of working on this lately. I want to experiment with different alphas on the EMA.
+1 Reply
Thanks!! Youre really on a roll releasing all these quality Alogrithms :)
Keep up the good work!
+1 Reply
everget Neverstorm
@Neverstorm, okay)
+3 Reply
I guess my comment/question really won't apply because according to other comments, it is not working correctly. Has anyone updated it to working correctly status? Thank you
Reply
everget forexmike
@forexmike, what?
Reply
Hello, Do I just copy and paste this code into trading view to create and use the indicator? Thanks, Mike
Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Refer a friend My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out