Pine script small indicator to MQL4

MQL4 Indicators Converting

Job finished

Execution time 21 hours

Specification

i need to convert a TradingView (PineScript) indicator to MQL4 
name of the indicator is "Donchian Trend Ribbon"
the source code will be below. 
visuals are important. so make sure the developed indicator will have the visuals 

all ordinal input should be represented. 

General conditions

write clear and well commented code. 

delivery should be within 2 days.
deliveries are the indicator ex4 and the developed source code mq4. 


the pine source code:
//@version=4
study("Donchian Trend Ribbon", precision = 0)
dlen = input(defval = 20, title = "Donchian Channel Period", minval = 10)

dchannel(len)=>
    float hh = highest(len)
    float ll = lowest(len)
    
    int trend = 0
    trend := close > hh[1] ? 1 : close < ll[1] ? -1 : nz(trend[1])
    
dchannelalt(len, maintrend)=>
    float hh = highest(len)
    float ll = lowest(len)
    
    int trend = 0
    trend := close > hh[1] ? 1 : close < ll[1] ? -1 : nz(trend[1])
    maintrend == 1  ? trend == 1  ? #00FF00ff :  #00FF009f :
     maintrend == -1 ? trend == -1 ? #FF0000ff :  #FF00009f :
     na

maintrend = dchannel(dlen)

plot( 5, color = dchannelalt(dlen - 0, maintrend), style = plot.style_columns, histbase= 0)
plot(10, color = dchannelalt(dlen - 1, maintrend), style = plot.style_columns, histbase= 5)
plot(15, color = dchannelalt(dlen - 2, maintrend), style = plot.style_columns, histbase=10)
plot(20, color = dchannelalt(dlen - 3, maintrend), style = plot.style_columns, histbase=15)
plot(25, color = dchannelalt(dlen - 4, maintrend), style = plot.style_columns, histbase=20)
plot(30, color = dchannelalt(dlen - 5, maintrend), style = plot.style_columns, histbase=25)
plot(35, color = dchannelalt(dlen - 6, maintrend), style = plot.style_columns, histbase=30)
plot(40, color = dchannelalt(dlen - 7, maintrend), style = plot.style_columns, histbase=35)
plot(45, color = dchannelalt(dlen - 8, maintrend), style = plot.style_columns, histbase=40)
plot(50, color = dchannelalt(dlen - 9, maintrend), style = plot.style_columns, histbase=45)
//end

Responded

1
Developer 1
Rating
(636)
Projects
1008
47%
Arbitration
33
36% / 36%
Overdue
99
10%
Working
Published: 6 codes
2
Developer 2
Rating
(217)
Projects
369
33%
Arbitration
34
41% / 29%
Overdue
108
29%
Free
Published: 1 code
3
Developer 3
Rating
(268)
Projects
603
34%
Arbitration
65
22% / 57%
Overdue
146
24%
Working
Published: 1 article, 22 codes
4
Developer 4
Rating
(634)
Projects
741
34%
Arbitration
49
53% / 39%
Overdue
14
2%
Loaded
5
Developer 5
Rating
(19)
Projects
22
18%
Arbitration
9
33% / 44%
Overdue
3
14%
Working
Published: 1 code
6
Developer 6
Rating
(78)
Projects
248
74%
Arbitration
7
100% / 0%
Overdue
1
0%
Free
Published: 2 articles, 1 code
7
Developer 7
Rating
(1)
Projects
1
0%
Arbitration
1
0% / 0%
Overdue
0
Free
8
Developer 8
Rating
(2678)
Projects
3423
68%
Arbitration
78
47% / 14%
Overdue
343
10%
Working
Published: 1 code
9
Developer 9
Rating
(252)
Projects
462
26%
Arbitration
139
20% / 60%
Overdue
100
22%
Free
10
Developer 10
Rating
(2)
Projects
4
0%
Arbitration
0
Overdue
0
Free

Project information

Budget
37+ USD
Deadline
to 2 day(s)