TradingView
everget
2018년 9월 20일 오후 4시 30분

Ehlers MESA Adaptive Moving Averages (MAMA & FAMA) 

U.S. Dollar/Japanese YenFXCM

설명

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).

릴리즈 노트

Added missed radians to degrees conversion. Thanks to @sal157011

릴리즈 노트

Added ribbon filling

릴리즈 노트

Refactored

릴리즈 노트

  • Fixed issue with decimal step in inputs

릴리즈 노트

  • Refactored

릴리즈 노트

  • Fixed error and refactored

릴리즈 노트

  • Converted to v4
  • Added alerts

릴리즈 노트

  • Update
코멘트
sal157011
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

everget
@sal157011, thank you. My bad.
janor123
How would you compare this to the JMA (jurik moving average)? Have you tested/compared it?
everget
janor123
@everget, which one seemed better?
everget
@janor123, I have a backtester for that
tradingview.com/script/d04pccrq-STRATEGY-Moving-Average-Crossover/

Over 60 different types of moving averages are available
AlexTail
thnax 4 update!
everget
@Kunzat, you're welcome!
blackcat1402
thanks for sharing this
everget
@blackcat1402, you're welcome
더보기