R - lütfen deneyimlerinizi paylaşın - sayfa 5 12345678 Yeni yorum Sergey Kovalyov 2012.06.03 16:40 #41 R ile sorun, test cihazı ile birlikte çalıştırılamamasıdır ve kâse raporları çizemez . =) TheXpert 2012.06.03 16:46 #42 wise : R ile sorun, test cihazı ile birlikte çalıştırılamamasıdır ve kâse raporları çizemez. =) Seni ne durduruyor? Sergey Kovalyov 2012.06.03 16:57 #43 bilmiyorum. Sadece forexfactory'de bunun hakkında konuşan insanlar gördüm. Belki bir şeyi yanlış anladım. =) TheXpert 2012.06.03 17:00 #44 hm. Ya da belki bilmiyorum. Henüz ciddi olarak kullanmadım. anonymous 2012.06.03 17:41 #45 wise : R ile sorun, test cihazı ile birlikte çalıştırılamamasıdır ve kâse raporları çizemez. =) Bu bir R sorunu değil, bir rapor çekmecesi sorunudur. Araştırma için, beş dakika içinde kendiniz basit bir test cihazı yazmanız yeterlidir. library(TTR) library(zoo) # get some data num.points <- ... midprices <- ... spreads <- ... bids <- midprices - 0.5 * spreads asks <- midprices + 0.5 * spreads # length(midprices) == num.points; length(spreads) == num.points ma.fast <- EMA(midprices, 15) ma.slow <- EMA(midprices, 50) # compute entry/exit signals open.long.position <- (ma.fast > ma.slow) & (ma.slow > midprices) close.long.position <- (ma.fast < midprices) open.short.position <- (ma.fast < ma.slow) & (ma.slow < midprices) close.short.position <- (ma.fast > midprices) signals.to.position <- function (num.points, signal.open, signal.close) { pos <- rep(NA, num.points) pos[signal.open] <- 1 pos[signal.close] <- 0 pos <- na.locf(pos, na.rm = F) pos[is.na(pos)] <- 0 pos } # compute strategy positions pos.long <- signals.to.position(num.points, open.long.position, close.long.position) pos.short <- signals.to.position(num.points, open.short.position, close.short.position) pos.total <- pos.long - pos.short # compute equity commission <- 1 trade.size <- c(0, pos.total[2 : num.points] - pos.total[1 : (num.points - 1)]) fees <- abs(trade.size) * (commission + 0.5 * spreads) equity <- midprices * pos.total + cumsum(-midprices * trade.size - fees) # compute balance balance <- rep(NA, num.points) balance[trade.size != 0] <- equity[trade.size != 0] balance <- na.locf(balance, na.rm = F) balance[is.na(balance)] <- 0 # display results par(mfrow = c(2, 1)) plot(midprices, t = 'l', col = 'gray', lty = 'dashed') lines(bids, col = 'blue') lines(asks, col = 'red') points(which(trade.size > 0, arr.ind = T), asks[trade.size > 0], col = 'blue') points(which(trade.size < 0, arr.ind = T), bids[trade.size < 0], col = 'red') plot(equity, t = 'l') lines(balance, col = 'gray', lty = 'dashed') R - please share EA ? i have Newbie can not interpret Serge 2012.06.03 18:26 #46 Birisi MT5 + R'yi çalıştırmayı başardı mı? Алексей Тарабанов 2012.06.03 20:05 #47 anonymous : Bu bir R sorunu değil, bir rapor çekmecesi sorunudur. Araştırma için, beş dakika içinde kendiniz basit bir test cihazı yazmanız yeterlidir. library(TTR) library(zoo) # get some data num.points <- ... midprices <- ... spreads <- ... bids <- midprices - 0.5 * spreads asks <- midprices + 0.5 * spreads # length(midprices) == num.points; length(spreads) == num.points ma.fast <- EMA(midprices, 15) ma.slow <- EMA(midprices, 50) # compute entry/exit signals open.long.position <- (ma.fast > ma.slow) & (ma.slow > midprices) close.long.position <- (ma.fast < midprices) open.short.position <- (ma.fast < ma.slow) & (ma.slow < midprices) close.short.position <- (ma.fast > midprices) signals.to.position <- function (num.points, signal.open, signal.close) { pos <- rep(NA, num.points) pos[signal.open] <- 1 pos[signal.close] <- 0 pos <- na.locf(pos, na.rm = F) pos[is.na(pos)] <- 0 pos } # compute strategy positions pos.long <- signals.to.position(num.points, open.long.position, close.long.position) pos.short <- signals.to.position(num.points, open.short.position, close.short.position) pos.total <- pos.long - pos.short # compute equity commission <- 1 trade.size <- c(0, pos.total[2 : num.points] - pos.total[1 : (num.points - 1)]) fees <- abs(trade.size) * (commission + 0.5 * spreads) equity <- midprices * pos.total + cumsum(-midprices * trade.size - fees) # compute balance balance <- rep(NA, num.points) balance[trade.size != 0] <- equity[trade.size != 0] balance <- na.locf(balance, na.rm = F) balance[is.na(balance)] <- 0 # display results par(mfrow = c(2, 1)) plot(midprices, t = 'l', col = 'gray', lty = 'dashed') lines(bids, col = 'blue') lines(asks, col = 'red') points(which(trade.size > 0, arr.ind = T), asks[trade.size > 0], col = 'blue') points(which(trade.size < 0, arr.ind = T), bids[trade.size < 0], col = 'red') plot(equity, t = 'l') lines(balance, col = 'gray', lty = 'dashed') Her şey olduğu gibi... Kafesleri deşifre edelim mi? [Silindi] 2012.06.04 15:32 #48 TheXpert : hm. Ya da belki bilmiyorum. Henüz ciddi olarak kullanmadım. Eşzamansızlıktan dolayı olabilir mi? R, eşzamansız olarak çalışabilir, ancak bir test cihazı çalıştıramaz. Ancak asenkroni hala egzotik. [Silindi] 2012.06.04 15:34 #49 tara : Her şey olduğu gibi... Kafesleri deşifre edelim mi? Eh.... R, mql değil, bir terminal dili olacaktır. [Silindi] 2012.07.10 11:26 #50 Lütfen yardım edin. R EURUSD'ye yönlendirildi. Modeli hesapladım ve katsayısını hesapladım. Bir grafik nasıl çizilir ve bir alıntı ile nasıl birleştirilir? > x.ar<-ar(eur[1:256],method="mle") > x.ar aramak: ar(x = eur[1:256], yöntem = "mle") katsayılar: 1 ........2 .........3 0,9420 0,1955 -0,1644 Seçilen sipariş 3 sigma^2 tahmini 2.73e-06 R - please share Sharpe oranı MQL4 ve MQL5 ile 12345678 Yeni yorum
R ile sorun, test cihazı ile birlikte çalıştırılamamasıdır ve kâse raporları çizemez. =)
R ile sorun, test cihazı ile birlikte çalıştırılamamasıdır ve kâse raporları çizemez. =)
Bu bir R sorunu değil, bir rapor çekmecesi sorunudur.
Araştırma için, beş dakika içinde kendiniz basit bir test cihazı yazmanız yeterlidir.
library(TTR)
library(zoo)
# get some data
num.points <- ...
midprices <- ...
spreads <- ...
bids <- midprices - 0.5 * spreads
asks <- midprices + 0.5 * spreads
# length(midprices) == num.points; length(spreads) == num.points
ma.fast <- EMA(midprices, 15)
ma.slow <- EMA(midprices, 50)
# compute entry/exit signals
open.long.position <- (ma.fast > ma.slow) & (ma.slow > midprices)
close.long.position <- (ma.fast < midprices)
open.short.position <- (ma.fast < ma.slow) & (ma.slow < midprices)
close.short.position <- (ma.fast > midprices)
signals.to.position <- function (num.points, signal.open, signal.close) {
pos <- rep(NA, num.points)
pos[signal.open] <- 1
pos[signal.close] <- 0
pos <- na.locf(pos, na.rm = F)
pos[is.na(pos)] <- 0
pos
}
# compute strategy positions
pos.long <- signals.to.position(num.points, open.long.position, close.long.position)
pos.short <- signals.to.position(num.points, open.short.position, close.short.position)
pos.total <- pos.long - pos.short
# compute equity
commission <- 1
trade.size <- c(0, pos.total[2 : num.points] - pos.total[1 : (num.points - 1)])
fees <- abs(trade.size) * (commission + 0.5 * spreads)
equity <- midprices * pos.total + cumsum(-midprices * trade.size - fees)
# compute balance
balance <- rep(NA, num.points)
balance[trade.size != 0] <- equity[trade.size != 0]
balance <- na.locf(balance, na.rm = F)
balance[is.na(balance)] <- 0
# display results
par(mfrow = c(2, 1))
plot(midprices, t = 'l', col = 'gray', lty = 'dashed')
lines(bids, col = 'blue')
lines(asks, col = 'red')
points(which(trade.size > 0, arr.ind = T), asks[trade.size > 0], col = 'blue')
points(which(trade.size < 0, arr.ind = T), bids[trade.size < 0], col = 'red')
plot(equity, t = 'l')
lines(balance, col = 'gray', lty = 'dashed')
Bu bir R sorunu değil, bir rapor çekmecesi sorunudur.
Araştırma için, beş dakika içinde kendiniz basit bir test cihazı yazmanız yeterlidir.
library(TTR)
library(zoo)
# get some data
num.points <- ...
midprices <- ...
spreads <- ...
bids <- midprices - 0.5 * spreads
asks <- midprices + 0.5 * spreads
# length(midprices) == num.points; length(spreads) == num.points
ma.fast <- EMA(midprices, 15)
ma.slow <- EMA(midprices, 50)
# compute entry/exit signals
open.long.position <- (ma.fast > ma.slow) & (ma.slow > midprices)
close.long.position <- (ma.fast < midprices)
open.short.position <- (ma.fast < ma.slow) & (ma.slow < midprices)
close.short.position <- (ma.fast > midprices)
signals.to.position <- function (num.points, signal.open, signal.close) {
pos <- rep(NA, num.points)
pos[signal.open] <- 1
pos[signal.close] <- 0
pos <- na.locf(pos, na.rm = F)
pos[is.na(pos)] <- 0
pos
}
# compute strategy positions
pos.long <- signals.to.position(num.points, open.long.position, close.long.position)
pos.short <- signals.to.position(num.points, open.short.position, close.short.position)
pos.total <- pos.long - pos.short
# compute equity
commission <- 1
trade.size <- c(0, pos.total[2 : num.points] - pos.total[1 : (num.points - 1)])
fees <- abs(trade.size) * (commission + 0.5 * spreads)
equity <- midprices * pos.total + cumsum(-midprices * trade.size - fees)
# compute balance
balance <- rep(NA, num.points)
balance[trade.size != 0] <- equity[trade.size != 0]
balance <- na.locf(balance, na.rm = F)
balance[is.na(balance)] <- 0
# display results
par(mfrow = c(2, 1))
plot(midprices, t = 'l', col = 'gray', lty = 'dashed')
lines(bids, col = 'blue')
lines(asks, col = 'red')
points(which(trade.size > 0, arr.ind = T), asks[trade.size > 0], col = 'blue')
points(which(trade.size < 0, arr.ind = T), bids[trade.size < 0], col = 'red')
plot(equity, t = 'l')
lines(balance, col = 'gray', lty = 'dashed')
Her şey olduğu gibi...
Kafesleri deşifre edelim mi?
hm. Ya da belki bilmiyorum. Henüz ciddi olarak kullanmadım.
Her şey olduğu gibi...
Kafesleri deşifre edelim mi?
Lütfen yardım edin.
R EURUSD'ye yönlendirildi. Modeli hesapladım ve katsayısını hesapladım. Bir grafik nasıl çizilir ve bir alıntı ile nasıl birleştirilir?
> x.ar<-ar(eur[1:256],method="mle")
> x.ar
aramak:
ar(x = eur[1:256], yöntem = "mle")
katsayılar:
1 ........2 .........3
0,9420 0,1955 -0,1644
Seçilen sipariş 3 sigma^2 tahmini 2.73e-06