0 beğenilme 0 beğenilmeme
670 kez görüntülendi

merhaba

 

elimde trading bir kod var al sat veren bir sistem bu sistemi robota bağlamak istiyorum. al ve sat için çevirmemiz mümkünmüdür acaba 

 

trading deki ismi UT BOT ALERTS 

 

kodları ise aşağıdaki gibidir. 

 

//@version=4

study(title="UT Bot Alerts", overlay = true)

 

// Inputs

a = input(1,     title = "Key Vaule. 'This changes the sensitivity'")

c = input(10,    title = "ATR Period")

h = input(false, title = "Signals from Heikin Ashi Candles")

 

xATR  = atr(c)

nLoss = a * xATR

 

src = h ? security(heikinashi(syminfo.tickerid), timeframe.period, close, lookahead = false) : close

 

xATRTrailingStop = 0.0

xATRTrailingStop := iff(src > nz(xATRTrailingStop[1], 0) and src[1] > nz(xATRTrailingStop[1], 0), max(nz(xATRTrailingStop[1]), src - nLoss),

   iff(src < nz(xATRTrailingStop[1], 0) and src[1] < nz(xATRTrailingStop[1], 0), min(nz(xATRTrailingStop[1]), src + nLoss),

   iff(src > nz(xATRTrailingStop[1], 0), src - nLoss, src + nLoss)))

 

pos = 0  

pos :=   iff(src[1] < nz(xATRTrailingStop[1], 0) and src > nz(xATRTrailingStop[1], 0), 1,

   iff(src[1] > nz(xATRTrailingStop[1], 0) and src < nz(xATRTrailingStop[1], 0), -1, nz(pos[1], 0)))

   

xcolor = pos == -1 ? color.red: pos == 1 ? color.green : color.blue

 

ema   = ema(src,1)

above = crossover(ema, xATRTrailingStop)

below = crossover(xATRTrailingStop, ema)

 

buy  = src > xATRTrailingStop and above

sell = src < xATRTrailingStop and below

 

barbuy  = src > xATRTrailingStop

barsell = src < xATRTrailingStop

 

plotshape(buy,  title = "Buy",  text = 'Buy',  style = shape.labelup,   location = location.belowbar, color= color.green, textcolor = color.white, transp = 0, size = size.tiny)

plotshape(sell, title = "Sell", text = 'Sell', style = shape.labeldown, location = location.abovebar, color= color.red,   textcolor = color.white, transp = 0, size = size.tiny)

 

barcolor(barbuy  ? color.green : na)

barcolor(barsell ? color.red   : na)

 

alertcondition(buy,  "UT Long",  "UT Long")

alertcondition(sell, "UT Short", "UT Short")

Grafik kategorisinde (18 puan) tarafından | 670 kez görüntülendi

1 cevap

0 beğenilme 0 beğenilmeme

merhaba,

diğer dillere pek hakim olmadığımızdan bu tür formül isteklerine olumlu dönüş yapamıyoruz,

ancak görebildiğimiz kadarıyla ATRSTOP indikatörü heiken ashi olarak çalıştırılmış,

aşağıdaki formülleri bir deneyiniz

al için

period:=5;
coeff:=5;
AP:=C;
OFFSET:=coeff*ATRe(period);
STR:=AP+OFFSET;
STS:=AP-OFFSET;
FUB:=IF(STR<PREV OR REF(C,-1)>PREV,STR,PREV);
FLB:=IF(STS>PREV OR REF(C,-1)<PREV,STS,PREV);
ATRStop:=IF(PREV=REF(FUB,-1) AND C<FUB,FUB,IF(PREV=REF(FUB,-1) AND C>FUB,FLB,IF(PREV=REF(FLB,-1) AND C>FLB,FLB,IF(PREV=REF(FLB,-1) AND C<FLB,FUB,fub))));
c>ATRStop

sat için

period:=5;
coeff:=5;
AP:=C;
OFFSET:=coeff*ATRe(period);
STR:=AP+OFFSET;
STS:=AP-OFFSET;
FUB:=IF(STR<PREV OR REF(C,-1)>PREV,STR,PREV);
FLB:=IF(STS>PREV OR REF(C,-1)<PREV,STS,PREV);
ATRStop:=IF(PREV=REF(FUB,-1) AND C<FUB,FUB,IF(PREV=REF(FUB,-1) AND C>FUB,FLB,IF(PREV=REF(FLB,-1) AND C>FLB,FLB,IF(PREV=REF(FLB,-1) AND C<FLB,FUB,fub))));
c<ATRStop

 

sistem çalıştırıken de heiken ashi yi seçmeyi unutmayınız,

bilgilerinize

(40,139 puan) tarafından
0 0

merhaba yardımlarınız için sağolun ama bende orası kitli gözüküyor.   elinizde buna benzer hazır kod var mı veya nereden ulaşabilirim.

 

0 0

 

merhaba test bölgesine tıklayıp test bölgesine gelin,

seçekneklerde heiken ashi yi seçiyor olmanız gerekir,

eğer yapamazsanız egitim birimine ulaşın 

Hoş geldiniz, Matriks Destek Platformu sizlere sorularınızın hızlıca cevaplanması için bir ortam sağlar. Sorduğunuz ve cevapladığınız soruların ve yorumlarınızın aldığı oylar üzerinden puan kazanırsınız. Puan sistemine bağlı kampanyamızla ücretsiz kullanım avantajlarından faydalanabilirsiniz.



7,625 soru
7,627 cevap
4,445 yorum
10,796 kullanıcı