Pine script small indicator to MQL4

Работа завершена

Время выполнения 21 час

Техническое задание

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

Откликнулись

1
Разработчик 1
Оценка
(636)
Проекты
1007
47%
Арбитраж
33
36% / 36%
Просрочено
99
10%
Работает
Опубликовал: 6 примеров
2
Разработчик 2
Оценка
(217)
Проекты
369
33%
Арбитраж
34
41% / 29%
Просрочено
108
29%
Свободен
Опубликовал: 1 пример
3
Разработчик 3
Оценка
(268)
Проекты
603
34%
Арбитраж
65
22% / 57%
Просрочено
147
24%
Работает
Опубликовал: 1 статью, 22 примера
4
Разработчик 4
Оценка
(619)
Проекты
722
33%
Арбитраж
46
48% / 41%
Просрочено
14
2%
Загружен
5
Разработчик 5
Оценка
(19)
Проекты
22
18%
Арбитраж
9
33% / 44%
Просрочено
3
14%
Работает
Опубликовал: 1 пример
6
Разработчик 6
Оценка
(78)
Проекты
246
74%
Арбитраж
7
100% / 0%
Просрочено
1
0%
Свободен
Опубликовал: 1 статью
7
Разработчик 7
Оценка
(1)
Проекты
1
0%
Арбитраж
1
0% / 0%
Просрочено
0
Свободен
8
Разработчик 8
Оценка
(2675)
Проекты
3414
68%
Арбитраж
77
48% / 14%
Просрочено
342
10%
Свободен
Опубликовал: 1 пример
9
Разработчик 9
Оценка
(252)
Проекты
462
26%
Арбитраж
139
20% / 60%
Просрочено
100
22%
Свободен
10
Разработчик 10
Оценка
(2)
Проекты
4
0%
Арбитраж
0
Просрочено
0
Свободен

Информация о проекте

Бюджет
37+ USD
Сроки выполнения
до 2 дн.