similar to: SMA and EMA in package TTR

Displaying 20 results from an estimated 2000 matches similar to: "SMA and EMA in package TTR"

2012 May 21
1
Need help in doing EMA(Exponential Mean Average).
Can somebody help me in finding package/Example in R which could do EMA(Exponential Mean Average). I installed "TTR" package but the 'EMA" function which I was trying to use is giving the following error. Error: Could not find function "EMA" Thanks & Regards, Thomas [[alternative HTML version deleted]]
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");
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
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
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
2010 Jan 29
5
random permuted block randomization
Hi, I am very new to R. Just started yesterday. I have to generate a sequence of 40 random treatments using permuted block randomization with a block size of 8. Then I have to plot moving averages for the resulting sequence. I have tried the sample function but I dont know if wht i did is right or not > sample(c(1,1,1,1,2,2,2,2),8) Any ideas please? -- Ayesha Khan MS Bioinformatics Dept. of
2010 May 11
3
Smoothing Techniques - short stepwise functions with spikes
R Friends, I have data from which I would like to learn a more general (smoothened) trend by applying data smoothing methods. Data points follow a positive stepwise function. | x x | xxxxxxxx xxxxxxxx | x x |xxxx xxx xxxx | xxxxxxxxxxxxxxxxx | |
2011 Nov 30
1
sma installation error
I tried different versions of sma**.tar.gz file either with "R CMD INSTALL -l packagepath sma**.tar.gz", "R INSTALL -l path sma**.tar.gz" and under R windows by "install.packages("sma_0.5.15.tar.gz",repos=NULL)" . I got same error ====== * installing *source* package 'sma' ... ** Creating default NAMESPACE file Warning in .write_description(db,
2007 Jun 15
2
sma package, and MouseArray data set
Hi all I have just downloaded the sma package from CRAN. On installing on my linux machine, I get the message > library(sma) > data(MouseArray) Warning message: file 'MouseArray.RData' has magic number 'RDX1' Use of save versions prior to 2 is deprecated Hereafter, MouseArray is not found: > MouseArray Error: object "MouseArray" not found We were
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
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,
2003 Apr 17
3
sma
in the sma library, I m trying to use stat.t2 but I don t know what the parameter cl actually means!! cheers
2012 Sep 04
1
Producing a SMA signal when closing price is above the moving average for 3 days
I have loaded price data for GE and then calculated a 50 day simple moving average. Then I have a created a ifelse statement that produce a 1 when GE's closing price is above the simple moving average and a 0 when GE Closing price is below the 50 day simple moving average. However, what I really want to do is to produce a 1 for when the price is above the simple moving average for 3 days
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))
2010 May 13
1
ggplot2: qplot won't work
I have a script running in the StatET Eclipse environment that executes the ggplot2 command qplot in a function: # Creates the plot createPlot <- function(){ print("Lets plot!") qplot(1:10, letters[1:10]) } When executing the qplot line directly, it works. When executing the script it does not open a window and it it does not plot. Is there something important I have forgotten? I
2012 May 22
1
Quantmod, Xts, TTR and Postgresql
Hi Everyone, I'm currently using the latest build of R and R-Studio server (both are amazing products) I'm still very new to this but I came across this issue: I'm trying to do a select from postgres and put the data into and xts object like so: # Libs library('RPostgreSQL') # http://code.google.com/p/rpostgresql/ library('quantmod') library('TTR')
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
2010 Oct 10
1
Help needed for getYahooData in TTR package & writing the Yahoo data to excel
Dear all, I'm totally new to R. Recently I've been trying to use getYahooData in TTR package in order to download stock index daily open/high/low/close. The downloaded data is in the format of Open High Low Close Volume 2000-01-04 18937.45 19187.61 18937.45 19002.86 0 2000-01-05 19003.51 19003.51 18221.82 18542.55 0 2000-01-06
2004 Oct 31
2
samba 3.0.7 and os/2
Hello, samba v3.0.7 on suse linux v9.1 os/2 v4.x I have started the process of replacing our os/2 hosts with linux, starting with the server(s). Most of the problems have been firewall related, a topic only briefly discussed in the docs (nudge). Some of the hosts can now interact with the linux samba shares; not all though. I have run ip traces and have gotten to a point that is a
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