Pine script small indicator to MQL4

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
評価
(635)
プロジェクト
1005
47%
仲裁
33
36% / 36%
期限切れ
99
10%
仕事中
パブリッシュした人: 6 codes
2
開発者 2
評価
(217)
プロジェクト
369
33%
仲裁
34
41% / 29%
期限切れ
108
29%
パブリッシュした人: 1 code
3
開発者 3
評価
(268)
プロジェクト
602
34%
仲裁
64
20% / 58%
期限切れ
147
24%
仕事中
パブリッシュした人: 1 article, 22 codes
4
開発者 4
評価
(611)
プロジェクト
711
33%
仲裁
45
49% / 42%
期限切れ
14
2%
仕事中
5
開発者 5
評価
(17)
プロジェクト
21
14%
仲裁
8
38% / 38%
期限切れ
3
14%
取り込み中
6
開発者 6
評価
(78)
プロジェクト
246
74%
仲裁
7
100% / 0%
期限切れ
1
0%
パブリッシュした人: 1 article
7
開発者 7
評価
(1)
プロジェクト
1
0%
仲裁
1
0% / 0%
期限切れ
0
8
開発者 8
評価
(2672)
プロジェクト
3407
68%
仲裁
77
48% / 14%
期限切れ
342
10%
パブリッシュした人: 1 code
9
開発者 9
評価
(252)
プロジェクト
462
26%
仲裁
139
20% / 60%
期限切れ
100
22%
10
開発者 10
評価
(2)
プロジェクト
4
0%
仲裁
0
期限切れ
0

プロジェクト情報

予算
37+ USD
締め切り
最高 2 日