kan iemand deze code omzetten

Vragen en suggesties over Vesticode

Moderator: Perry

kan iemand deze code omzetten

Berichtdoor stm1954 » vr 29 jan 2010, 10:04

Geachte,



Is het mogelijk deze code om te zetten?
Alvast dank bij voorbaat.

Jo

input price = close, Rsi = 14, Bollinger = 20, Ema = 5, hi_baseline = 80, lo_baseline = 20;
draw line("RSI",solid_line,green,1), ema_line("Ema",solid_line,blue,1),
line_mid("Mid BB",solid_line,red,1), line_upper("Upper BB",solid_line,dark_yellow,1),line_lower("Lower BB",solid_line,dark_yellow,1),
line_hi("HI Base",solid_line,black,1), line_lo("LO Base",solid_line,black,1), mid("Mid",solid_line,black,1);
vars i(number), u(series), d(series), au(series), ad(series), dif(number), f(number), tmp(series);
begin
line_hi := makeseries(front(close), back(close), hi_baseline);
mid := makeseries(front(close), back(close), 50);
line_lo := makeseries(front(close), back(close), lo_baseline);
f := front(price);
u[f] := 0;
d[f] := 0;
for i := f + 1 to back(price) do begin
dif := ((price[i]+price[i]+high[i]+low[i])/4) - ((price[i - 1]+price[i - 1]+high[i - 1]+low[i - 1])/4);
if dif > 0 then begin
u[i] := dif;
d[i] := 0;
end else begin
u[i] := 0;
d[i] := -dif;
end;
end;
au := mma(u, Rsi);
ad := mma(d, Rsi);
line := 100 * au / (au + ad);
ema_line := displace(ema(line,Ema),0);
line_mid := displace(sma(line, Bollinger), 0);
tmp := displace(2 * stddev(line, Bollinger), 0);
line_upper := line_mid + tmp;
line_lower := line_mid - tmp;
end.
stm1954
 
Berichten: 1
Geregistreerd op: do 28 jan 2010, 20:25

Keer terug naar Vesticode

Wie is er online

Gebruikers op dit forum: Geen geregistreerde gebruikers en 2 gasten

cron