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 天