Need help converting a pinescript indicator to mql

2020.09.09 Indicators Converting

Specification

supertrend source change this pinescript  to mql4 . Will be very thankful for your help just one line to code source . Just multipling source by factor 0.5 and adding avgerage. chack the 1st line. Thans for you help . Will share useful indicator that i really use .
src = sf*source+(1-sf)*nz(avg[1],source)
source=hl2
avg = 0.
src = sf*source+(1-sf)*nz(avg[1],source)
atrsecond = sma(tr, timer)
atr= changeATR ? atr(timer) : atrsecond
up=src-(MTP*atr)
up1 = nz(up[1],up)
up := close[1] > up1 ? max(up,up1) : up


Responded

1
Developer 1
2020.09.09
Rating
5
(6)
Projects
7
43%
Arbitration
0
Overdue
0
Free
2
Developer 2
2020.09.09
Rating
4.9
(10)
Projects
20
0%
Arbitration
6
17% / 67%
Overdue
11
55%
Busy
3
Developer 3
2020.09.09
Rating
4.91
(69)
Projects
116
36%
Arbitration
18
22% / 44%
Overdue
29
25%
Loaded
4
Developer 4
2020.09.09
Rating
4.89
(102)
Projects
162
25%
Arbitration
47
32% / 26%
Overdue
36
22%
Busy
5
Developer 5
2020.09.18
Rating
4.83
(414)
Projects
724
50%
Arbitration
237
56% / 27%
Overdue
141
19%
Working

Project information

Budget
30+ USD
For the developer
27 USD

Customer

Placed orders1
Arbitrage count0