I need to convert a TRADING VIEW PINE CODE to MQL5. and create an expert based on it

MQL5 Experts Converting

Job finished

Execution time 3 days
Feedback from customer
very nice job

Specification

I need to convert a very simple code on PINE to MQL5 and create a simple expert based on this signal to buy or sell.
This expert needs to have a leverage variant to define size. Also the same indicator in another timeframe and with diff setups will work as a stop.

This is the PINE code:

src = input(close)
length = input(10)

a = 0.,b = 0.
a := max(src,nz(a[1])) - nz(a[1] - b[1])/length
b := min(src,nz(b[1])) + nz(a[1] - b[1])/length
avg = avg(a,b)
plot(avg,"Average",color=orange,linewidth=2,transp=0)


Responded

1
Developer 1
Rating
(801)
Projects
1372
72%
Arbitration
112
29% / 48%
Overdue
341
25%
Working
2
Developer 2
Rating
(130)
Projects
210
40%
Arbitration
90
20% / 43%
Overdue
85
40%
Free
3
Developer 3
Rating
(137)
Projects
167
35%
Arbitration
11
91% / 0%
Overdue
0
Free
4
Developer 4
Rating
(73)
Projects
121
52%
Arbitration
4
25% / 75%
Overdue
19
16%
Free
5
Developer 5
Rating
(563)
Projects
932
47%
Arbitration
301
59% / 25%
Overdue
124
13%
Working
6
Developer 6
Rating
(11)
Projects
17
59%
Arbitration
2
0% / 100%
Overdue
2
12%
Free

Project information

Budget
30 - 130 USD
For the developer
27 - 117 USD
Deadline
to 3 day(s)