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
등급
(630)
프로젝트
995
47%
중재
33
36% / 36%
기한 초과
98
10%
작업중
게재됨: 6 코드
2
개발자 2
등급
(216)
프로젝트
368
33%
중재
34
41% / 29%
기한 초과
108
29%
작업중
게재됨: 1 코드
3
개발자 3
등급
(266)
프로젝트
598
35%
중재
64
20% / 58%
기한 초과
147
25%
무료
게재됨: 1 기고글, 22 코드
4
개발자 4
등급
(569)
프로젝트
660
32%
중재
43
44% / 44%
기한 초과
11
2%
로드됨
5
개발자 5
등급
(16)
프로젝트
20
10%
중재
8
38% / 38%
기한 초과
3
15%
작업중
6
개발자 6
등급
(77)
프로젝트
243
74%
중재
7
100% / 0%
기한 초과
1
0%
무료
게재됨: 1 기고글
7
개발자 7
등급
(1)
프로젝트
1
0%
중재
1
0% / 0%
기한 초과
0
무료
8
개발자 8
등급
(2660)
프로젝트
3380
68%
중재
77
48% / 14%
기한 초과
342
10%
무료
게재됨: 1 코드
9
개발자 9
등급
(250)
프로젝트
460
26%
중재
140
20% / 59%
기한 초과
100
22%
작업중
10
개발자 10
등급
(2)
프로젝트
4
0%
중재
0
기한 초과
0
무료

프로젝트 정보

예산
37+ USD
기한
 2 일