Converter estrategia do tradingView para metatrader

MQL5 Converting

Specification

Olá, vi esse código no tradingView e gostaria de converter para o metatrader

Esse código eh baseado no cruzamento de medias moveis, porem o a referencia delas eh outro tempo gráfico.

exemplo, to no grafico de 1m, mas nele ta plotado a media de 5 periodos referente ao timeframe de 30m

Espero que tenha conseguido ser claro

ema5=ema(close, 5)
ema2=ema(close, 2)
 
demaFast =  security(tickerid, "30", 2 * ema5 - ema(ema5, 5)  )

plotchar((2 * ema5 - ema(ema5, 5)), "d", "", location = location.top)
plotchar(demaFast, "fast", "", location = location.top)

demaSlow  = security(tickerid,"30", 2 * ema2 - ema(ema2, 2)  )
plotchar(demaSlow, "slow", "", location = location.top)

buy = crossover(demaSlow, demaFast)
sell = crossunder(demaSlow, demaFast)
strategy.entry("BUY", strategy.long, 1, when = buy)
strategy.entry("SELL", strategy.short, 1, when = sell )


atte Lucas Andrey

Responded

1
Developer 1
Rating
(71)
Projects
115
52%
Arbitration
4
25% / 75%
Overdue
15
13%
Working
2
Developer 2
Rating
(24)
Projects
34
9%
Arbitration
3
33% / 0%
Overdue
8
24%
Free
3
Developer 3
Rating
(11)
Projects
17
59%
Arbitration
2
0% / 100%
Overdue
2
12%
Free
5
Developer 5
Rating
(555)
Projects
922
48%
Arbitration
300
59% / 25%
Overdue
123
13%
Loaded
6
Developer 6
Rating
(250)
Projects
400
38%
Arbitration
82
41% / 20%
Overdue
69
17%
Loaded

Project information

Budget
50+ USD
For the developer
45 USD