similar to: Need help in doing EMA(Exponential Mean Average).

Displaying 20 results from an estimated 4000 matches similar to: "Need help in doing EMA(Exponential Mean Average)."

2011 Jan 30
1
SMA and EMA in package TTR
Hi, Just wondering for the SMA and EMA in package TTR, is it possible to me to code it so that, say if I need to calculate SMA (x, n=100), when the sample size is less than 100, it will give me the SMA (x, k) where k is the sample size of the data? Right now it only gives me an invalid n error. Thanks! [[alternative HTML version deleted]]
2008 Sep 25
3
OHLC Plot with EMA in it
Hi there I have some timeseries data which I plot in a OHLC Plot. In the same plot I'd like to have the EMA of this timeseries. I tried to add the EMA point to OHLC with lines(), but this doesn't work. Has anyone an idea how to handle it? Regards, Michael Zak
2012 Dec 12
1
EMA Package
Hi, I'm currently using EMA package to make clustering and heatmaps. The online doc concerning the package gives the following example code: data(marty) c<-clustering(marty, metric="pearson", method="ward") clustering.plot(c, title="Hierarchical Clustering\nPearson-Ward") which is working perfectly, However, when I'm changing the method to
2010 Aug 15
1
Moving average in R
Hi, I want to fit moving average trend in R. In google, I see that it is in the package 'TTR'. But, I can't install this package. I have used the following code: >install.packages("TTR") But, it says there is no package called 'TTR'. Can you help me? Regards, Suman Dhara [[alternative HTML version deleted]]
2009 Jun 19
1
(FULL) Need help to optimize a piece of code involving zoo objects
(Sorry, sent the message before I finished it) Hello, everyone I have a long script that uses zoo objects. In this script I used simple moving averages and these I can very efficiently calculate with filter() functions. Now, I have to use special "exponential" moving averages, and the only way I could write the code was with a for-loop, which makes everything extremely slow. I don't
2011 Sep 02
2
Avoiding for Loop for moving average
Hello, I need to calculate a moving average and an exponentially weighted moving average over a fairly large data set (500K rows). Doing this in a for loop works nicely, but is slow. ewma <- data$col[1] N <- dim(data)[1] for(i in 2:N){ data$ewma <- alpha * data$ewma[i-1] + (1-alpha) * data$value[i] } Since the moving average "accumulates" as we move through the data,
2011 May 05
1
quantmod's addTA plotting functions
Hi, I'm having trouble with quantmod's addTA plotting functions. They seem to work fine when run from the command line. But when run inside a function, only the last one run is visible. Here's an example. test.addTA <- function(from = "2010-06-01") { getSymbols("^GSPC", from = from) GSPC.close <- GSPC[,"GSPC.Close"] GSPC.EMA.3
2009 Jun 19
1
Need help to optimize a piece of code involving zoo objects
Hello, everyone I have a long script that uses zoo objects. In this script I used simple moving averages and these I can very efficiently calculate with filter() functions. Now, I have to use special "exponential" moving averages, and the only way I could write the code was with a for-loop, which makes everything extremely slow. I don't know how to optimize the code, but I need to
2000 Feb 28
1
Parser Bug Somewhere.... (PR#460)
Full_Name: John P Cavanaugh Version: .99 OS: linux Submission from: (NULL) (24.116.10.99) dataset$ema12 <- EMA (dataset$Close,12) dataset$ema26 <- EMA (dataset$Close,26) dataset$MACD_fast <- dataset$ema26 - dataset$ema12 dataset$MACD_slow <- EMA(dataset$MACD_fast,9) dataset$MACD_hist <- dataset$MACD_fast - dataset$MACD_slow # This line doesnt work!!! But... if I does work if I
2012 Apr 05
1
is parallel computing possible for 'rollapplyr' job?
  Hi,   The code below does exactly what I want in sequential mode. But, it is slow and I want to run it in parallel mode. I examined some windows version packages (parallel, snow, snowfall,..) but could not solve my specific problem. As far as I understood, either I have to write a new function like sfRollapplyr or I have to change my code in a way that it utilizes lapply, or sapply instead of
2011 May 07
2
Convenience-at-the-expense-of-clarity (was: quantmod's addTA plotting functions)
Thanks, Writing plot(addTA()) worked fine. I find myself with such mixed feelings about R. After finding that addTA worked fine at the command line but not in a function, I puzzled for a long time about what kind of virtual machine structure could possibly account for that. I couldn't think of any. It turns out that this isn't due to an R virtual machine structure. The reason addTA adds
2009 Feb 26
3
Moving Average
I am looking for some help at removing low-frequency components from a signal, through Moving Average on a sliding window. I understand thiis is a smoothing procedure that I never done in my life before .. sigh. I searched R archives and found "rollmean", "MovingAverages {TTR}", "SymmetricMA". None of the above mantioned functions seems to accept the smoothing
2007 Dec 26
2
Two lines for outgoing calls
Dear All, I'm using Asterisk 1.4.16.2 with Zaptel 1.4.7 on Debian with kernel 2.6.18. I have two analog lines Zap/1 and Zap/2 as group 1 in zapata.conf. I'm using below context for dialing out. [outbound-local] exten => _9XXX,1,Dial(Zap/g1/${EXTEN:1},30,tTr) exten => _9XXXXX,1,Dial(Zap/g1/${EXTEN:1},30,tTr) exten => _9ZXXXXXX,1,Dial(Zap/g1/${EXTEN:1},30,tTr) exten =>
2005 Aug 05
1
TE405P Dropping Calls
Hi, Urgently response would be wonderful, system is a Fedora Core 2. I have a Ericsson BP250 connected to 1 port on the TE405P and another connected to a local telco ISDN30. I have been running CVS-HEAD from about a 2 months ago and upgraded it again just in cause it was a version issue (didn't fix it) but this is what I am getting. When a person calls out from an extension on the BP250 to
2010 Aug 30
1
How to Remove Autocorrelation from Simple Moving Average time series
Hi R experts, I am trying to remove autocorrelation from Simple Moving Average time series. I know that this can be done by using seasonal ARIMA like, library(TTR) data <- rnorm(252) n=21 sma_data=SMA(data,n) sma_data=sma_data[-1:-n] acf(sma_data,length(sma_data))
2007 Feb 08
1
Re : Re: setting a number of values to NA over a data.frame.
Hi again, Awfully sorry John, I should have been sleeping and did not see your full post.... here is a way, unless I miss the point again : fake<-as.data.frame(cbind(seq(1,10,by=1),c(rep(1,4),rep(0,4),rep(2,2)))) # from my previous post # one moree column this time ! fake3<-cbind(fake,fake$V2) index<-c(2,3) fake3[,index][fake3[,index]==0]<-NA not nice, but seems to do the job.
2010 Aug 30
2
help with dialplan
Todd How do you have the context in the phones sip configs set? Bryant From: "Todd Reese" treese65 at gmail.com Hi all, I've been have problems with getting this system on line and would like to acquire some help with the extensions.conf. My current problem is that the phones won't dialout.on the VOIP lines listed as dialout1, dialout2, dialout3. This version of asterisk
2006 May 29
2
Asterisk Internal sip calls I can´t send/recive
When i made internal call into my LAN using x-lite sip phone client I retrive in askterisk CLI : ----------- ERROR ---------- Verbosity is at least 6 -- Remote UNIX connection -- Executing Dial("SIP/201-979d", "SIP/201|60|t") in new stack -- Called 201 May 29 18:09:28 WARNING[6082]: chan_sip.c:694 retrans_pkt: Maximum retries exceeded on call
2011 Sep 13
1
Getting Rcpp SEXP data in C++
Friends I am looking at Rcpp and I am a bit stuck on a simple matter. (I am calling R from c++, if there is a better way...) Given this simple example using the TTR package and the SMA function which returns a simple moving average.... Rcpp::NumericVector rv; for(int i = 0; i < 100; i++){ rv.push_back(rand()); } Rcpp::Environment TTR("package:TTR");
2005 Jun 14
2
# no longer working
Hi list, For months everything worked super here in our setup. This week I implemented some new idea in our webbased calendar system. I thought it would be nice to have an option that tells asterisk you are not available for calls during an appointment. For this to work I could no longer use the ringgroup setup: Dial(SIP/10&SIP/11&SIP/12,40,tr) So I thought, why not use the Local channel