Pine Code into the MQL4

MQL4 转化中

工作已完成

执行时间3 天
客户反馈
Great work. Just in time as promised.
员工反馈
He is a good and kind customer.

指定

I want to use the pine code below as an MT4 or MT5 EA. Additioanly I need alerts when enter a trade . When close long open short and same for the reverse. Just like in the pine strategy tester area it should be always in a trade. 
I am aware of the feed changes can effect the entry and exit points but the code should work with same consistancy on Metatrader. Thanks in advance.
strategy("Forex Capraz", overlay=true)

fark = input(title="pip farkı", type=input.integer, defval=320)
length = input(title="ATR Period", type=input.integer, defval=22)
mult = input(title="ATR Multiplier", type=input.float, step=0.1, defval=3.0)
wicks = input(title="Take Wicks into Account ?", type=input.bool, defval=false)
showLabels = input(title="Show Buy/Sell Labels ?", type=input.bool, defval=true)
highlightState = input(title="Highlight State ?", type=input.bool, defval=true)

atr = mult * atr(length) 

longStop = hl2 - atr
longStopPrev = nz(longStop[1], longStop)
longStop := (wicks ? low[1] : close[1]) > longStopPrev ? max(longStop, longStopPrev) : longStop
longStop2 = longStop + (fark * syminfo.mintick)


shortStop = hl2 + atr 
shortStopPrev = nz(shortStop[1], shortStop)
shortStop := (wicks ? high[1] : close[1]) < shortStopPrev ? min(shortStop, shortStopPrev) : shortStop
shortStop2 = shortStop - (fark* syminfo.mintick)
dir = 1
dir := nz(dir[1], dir)
dir := dir == -1 and (wicks ? high : close) > shortStopPrev ? 1 : dir == 1 and (wicks ? low : close) < longStopPrev ? -1 : dir

longColor = color.green
shortColor = color.red
noneColor = color.new(color.white, 100)


strategy.entry(id="long",long =true, limit= shortStop2)
strategy.entry(id="short",long=false , limit = longStop2)

反馈

1
开发者 1
等级
(38)
项目
50
10%
仲裁
1
0% / 0%
逾期
8
16%
空闲
2
开发者 2
等级
(851)
项目
1463
72%
仲裁
122
29% / 48%
逾期
358
24%
空闲
发布者: 3 文章
3
开发者 3
等级
(132)
项目
178
39%
仲裁
4
25% / 50%
逾期
14
8%
空闲
4
开发者 4
等级
(14)
项目
19
11%
仲裁
1
0% / 100%
逾期
5
26%
空闲
5
开发者 5
等级
(412)
项目
543
75%
仲裁
9
44% / 0%
逾期
24
4%
空闲
6
开发者 6
等级
(214)
项目
316
34%
仲裁
63
37% / 40%
逾期
102
32%
工作中
7
开发者 7
等级
(564)
项目
845
73%
仲裁
15
53% / 13%
逾期
193
23%
空闲

项目信息

预算
60 - 80 USD
截止日期
 5 天