Re: [R] editor for MacOS X

2008-11-28 Thread Michael Zak
Why don't you use the bult-in editor from R under OS X? It's much  
better as the windows pendant.


Take care, Michael

On 28.11.2008, at 12:15, Bunny, lautloscrew.com wrote:


Hi all,

just wondered again, if there is some R editor for Mac OS X  
comparable to TINN-R on windows.


thx in advance..

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How to optimize a trading singal generator (for-loop)?

2008-11-27 Thread Michael Zak

Hi guys,

I've got some performance troubles with my trading signal generator,  
which indicates when the system goes long or short.
I'm playing with some historical data and the for-loop isn't doing his  
job very efficient. Is there some vectorial solution for this?


Here the for-loop:

> trade.long  <- 0
> trade.short <- 0
> for (j in peak.days : dim(commodities[[i]])[1]) {
># Trading Signal Long
> 	if (commodities[[i]][j, "High"] >= commodities[[i]][j,  
"HighestHigh"] && trade.long == 0) {

>commodities[[i]][j, "Long"] <- 1
>trade.long <- 1
>}
> 	if (commodities[[i]][j, "Low"] <= commodities[[i]][j, "emaH"] &&  
trade.long == 1) {

>commodities[[i]][j, "Long"] <- -1
>trade.long <- 0
>}
># Trading Signal Short
> 	if (commodities[[i]][j, "Low"] <= commodities[[i]][j, "LowestLow"]  
&& trade.short == 0) {

>commodities[[i]][j, "Short"] <- 1
>trade.short <- 1
>}
> 	if (commodities[[i]][j, "High"] >= commodities[[i]][j, "emaL"] &&  
trade.short == 1) {

>commodities[[i]][j, "Short"] <- -1
>trade.short <- 0
>}
> } # for (j in peak.days : dim(commodities[[i]])[1])


Any ideas are very appreciated, because this for-loop takes about 2 -  
3 hours to finish...


Thank you, Michael

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Multidimensional array with R

2008-11-19 Thread Michael Zak

Hi there

I know, I'm sure you discussed this stuff 100 times, but I really have  
a basic understanding problem, if and how do I create a  
multidimensional array in R. I'm coming from MATLAB and there it's as  
easy as you ever could imagine.


Ok, so, I want to have an array, where I can fill in data from a Excel  
spreadsheet. The array should be addressed like this:


data["Cacao"]["Open"] or data["Cotton"]["Close"], you get me? Ok,  
that's fine. Otherwise feel free to ask questions. Because I tried to  
build such an array but without success (even with googling)...


Thank you, Michael

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] OHLC Plot with EMA in it

2008-09-25 Thread Michael Zak

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

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.