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
(847)
Projects
1449
72%
Arbitration
120
28% / 47%
Overdue
355
24%
Working
Published: 3 articles
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
(83)
Projects
143
52%
Arbitration
8
13% / 75%
Overdue
22
15%
Free
5
Developer 5
Rating
(574)
Projects
945
47%
Arbitration
309
58% / 27%
Overdue
125
13%
Free
6
Developer 6
Rating
(11)
Projects
17
59%
Arbitration
2
0% / 100%
Overdue
2
12%
Free

Project information

Budget
30 - 130 USD
Deadline
to 3 day(s)