Converter um código do Tradingview para Mt5

작업 종료됨

실행 시간 5 분
피고용인의 피드백
Thank you!
고객의 피드백
Um profissional altamente capacitado, o melhor programador que já contratei até hoje. Pode contratar os serviços dele sem medo algum porque ele é muito bom e muito rápido para fazer os trabalhos.

명시

Converter o código de um indicador do Tradingview para rodar no MT5

O indicador tem código aberto e se chama Ut Bot Alerts (QuantNomad)

Aqui está o código que copiei do Tradingview:


//@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")


응답함

1
개발자 1
등급
(2)
프로젝트
2
0%
중재
0
기한 초과
0
무료
2
개발자 2
등급
(23)
프로젝트
29
14%
중재
3
0% / 67%
기한 초과
3
10%
작업중
3
개발자 3
등급
(542)
프로젝트
624
33%
중재
39
36% / 49%
기한 초과
11
2%
바쁜
4
개발자 4
등급
(574)
프로젝트
945
47%
중재
309
58% / 27%
기한 초과
125
13%
무료
비슷한 주문
I need to modify the CURRENCY indicator to allow viewing the same currency on different timeframes simultaneously, overlaid on the same chart. Insert the same currency multiple times into the indicator. Example: USD D1 USD H4 USD H1 USD M30 USD M15 USD M5 Display all these curves on the same chart, each representing the currency's slope on a different timeframe. Customizable settings for each line, including: Color

프로젝트 정보

예산
30 - 50 USD
기한
에서 2  5 일