Convert my tradingview indicator to xm mt4 (mq4)

MQL4 전환

작업 종료됨

실행 시간 5 일

명시

I would like to convert my tradingview indicator to the xm metatrader 4 (remembering that there is this mt4 from xm that has some details).

I tried the conversion via AI but it was not possible, since the indicator is not similar and useful as it was in tradingview.


//@version=5

indicator(title="JR INDEX", shorttitle="JR INDEX", overlay=false)


// Input

fastLength = input.int(12, title="Fast Length", minval=1)

slowLength = input.int(26, title="Slow Length", minval=1)

src = input(close, title="Source")

cciLength = input.int(14, title="CCI Length", minval=1)

overSold = input.int(-100, title="Over Sold")

overBought = input.int(100, title="Over Bought")


// Calculation

fastMA = ta.ema(src, fastLength)

slowMA = ta.ema(src, slowLength)

macdLine = fastMA - slowMA

signalLine = ta.ema(macdLine, 9)

macdHistogram = macdLine - signalLine

cci = ta.cci(src, cciLength)


// Plotting

plot(macdHistogram, title="MACD", color=macdHistogram > 0 ? color.green : color.red, style=plot.style_columns, transp=0)

plot(cci, title="CCI", color=color.purple)

plot(overSold, title="Over Sold", color=color.green, transp=0)

plot(overBought, title="Over Bought", color=color.red, transp=0)


// Entry and Exit conditions

longCondition = ta.cross(macdHistogram, 0) and cci > overSold

shortCondition = ta.cross(0, macdHistogram) and cci < overBought

bgcolor(longCondition ? color.green : shortCondition ? color.red : na, transp=70)


응답함

1
개발자 1
등급
(337)
프로젝트
624
38%
중재
40
23% / 65%
기한 초과
93
15%
무료
게재됨: 4 기고글, 19 코드
2
개발자 2
등급
(268)
프로젝트
603
34%
중재
65
22% / 57%
기한 초과
147
24%
작업중
게재됨: 1 기고글, 22 코드
3
개발자 3
등급
(132)
프로젝트
178
39%
중재
4
25% / 50%
기한 초과
14
8%
무료
4
개발자 4
등급
(574)
프로젝트
945
47%
중재
309
58% / 27%
기한 초과
125
13%
무료
5
개발자 5
등급
(171)
프로젝트
195
42%
중재
13
8% / 54%
기한 초과
9
5%
무료
게재됨: 3 코드
6
개발자 6
등급
(2)
프로젝트
2
0%
중재
1
0% / 0%
기한 초과
2
100%
무료

프로젝트 정보

예산
50+ USD
기한
 2 일