TradingView
everget
Apr 6, 2018 9:18 PM

Adaptive Moving Average 

British Pound/U.S. DollarFXCM

描述

Adaptive Moving Average indicator script. This indicator was originally developed by Vitali Apirine (Stocks & Commodities V.36:5: Adaptive Moving Averages).

版本注释

Refactored

版本注释

  • Add coloring

评论
ikoct
hi?
how to add an alert about changing the color of the indicator
thanks
DattaWelekar
Hi. I applied this very useful indicator. It is working in android application but not on computer (I use chrome browser). Also there is a difference in tradingview android app and webpage. In the app, it shows only 3 inputs as length, fast EMA and slow EMA. Whereas on webpage, it has 5 inputs and these 5 inputs are all named as moving average 1, 2, 3, 4, 5 which is confusing to understand which input is length and which is fast and slow EMA. Thank you very much in advance.
DayTradingOil
Is there anyway to convert this script, or atleast the ama(src, length, fastLength, slowLength) to Easy Language(for use with TradeStation)? I've been trying to no avail simply because I cannot find anything in their reference that mimics tradingview's (nz) function(Aka replace a nan value). Any help at all would be greatly appreciated.
PK1981
Good
chinmoyghosh84
Goid
dray10
@everget Hi, could you please make an "Alerts" version of Adaptive Moving Average, so that it generates buy/sell Tradingview alerts?
saharan262
How
canpp
Hi @everget this is a perfect script that I use all the time! is it possible to make it multi time frame? I tried but it returns an error message bellow:

"Cannot use a mutable variable as an argument of the security function."

the code I tried was:

res = input(title="Resolution", type=input.resolution, defval="360")

s1 = security(syminfo.tickerid, res, ama, gaps=true)

plot(s1, title="upper line",color=color.purple, transp=50)

Do you have a solution for that?
DayTradingOil
"

inputs:
Price( numericseries ),
EffRatioLength( numericsimple ),
FastAvgLength( numericsimple ), { this input assumed to be a constant >= 1 }
SlowAvgLength( numericsimple ) ; { this input assumed to be a constant >= 1 }

{ Eff = Efficiency }

variables:
NetChg( 0 ),
TotChg( 0 ),
EffRatio( 0 ),
ScaledSFSqr( 0 ),
SlowAvgSF( 2 / ( SlowAvgLength + 1 ) ),
FastAvgSF( 2 / ( FastAvgLength + 1 ) ),
SFDiff( FastAvgSF - SlowAvgSF ) ,
pds(0),
MLTP(0),
SSC(0);

pds = EffRatioLength + 1;
MLTP = AbsValue(Price - Lowest(low, pds)) - (highest(high, pds) - price) / (highest(high, pds) - lowest(low, pds));
SSC = MLTP * (FastAvgSF - SlowAvgSF) + SlowAvgSF;

Adaptive_MA_Kama_TradingView = Adaptive_MA_Kama_TradingView[1] + (SSC * SSC) * ( Price - Adaptive_MA_Kama_TradingView[1] );


"

This is what I have so far, when plugged into Tradestation along with an indicator to plot it the AMA comes out significantly different than the one on my chart from tradingview. Thanks in advance.
更多