Hey there' Just need to convert pinescript to MQL in MT5.

工作已完成

执行时间2 天
客户反馈
Great service. Fast communication and patient developer.
员工反馈
thanks him for job. looking forward to have more jobs.

指定

Hi,

I have backtested this indicator on TradingView, and it works quite well. However, the problem lies in manually opening each trade due to a lack of time.

This is the idea about automation.

The critical factor is position sizing; the stoploss isn't fixed in terms of pips but depends on price action, as shown in the attachment (SL always on line of previous color)

Stoploss should be set at 0.25% of the capital per trade, and the take profit at 2R.

My envisioning of the EA is as follows: when a bomb,hammer (signal for opening long/short) appears on the chart, signals could repaint!! Therefore, it should always wait for the candle to close. If the signal remains after the candle closes, the position should be opened immediately on the next candle.

The position is opened with the correct size, considering proper risk management.


The EA strategy should resemble the following + figure out position sizing.


Hope that it's technically possible to create EA by these terms.

Thanks in advance!


//@version=4

strategy("Follow Line Indicator Strategy", overlay=true)

BBperiod = input(defval = 20, title = "BB Period", type = input.integer, minval = 1)
BBdeviations = input(defval = 0.1, title = "BB Deviations", type = input.float, minval = 0.1, step=0.05)
UseATRfilter = input(defval = true, title = "ATR Filter", type = input.bool)
ATRperiod = input(defval = 5, title = "ATR Period", type = input.integer, minval = 1)
hl = input(defval = false, title = "Hide Labels", type = input.bool)

BBUpper=sma (close,BBperiod)+stdev(close, BBperiod)*BBdeviations
BBLower=sma (close,BBperiod)-stdev(close, BBperiod)*BBdeviations

TrendLine = 0.0
iTrend = 0.0
buy = 0.0
sell = 0.0

BBSignal = close>BBUpper? 1 : close<BBLower? -1 : 0

calculateStopLossLevel() =>
    var float stopLossLevel = na
    stopLossLevel := na(stopLossLevel[1]) ? TrendLine : stopLossLevel[1]
    stopLossLevel := iTrend == 1 and iTrend[1] == -1 ? TrendLine : stopLossLevel
    stopLossLevel := iTrend == -1 and iTrend[1] == 1 ? TrendLine : stopLossLevel
    stopLossLevel

long_stop_level = calculateStopLossLevel()
short_stop_level = calculateStopLossLevel()

strategy.exit("Long Stop", from_entry="Buy", loss=long_stop_level)
strategy.exit("Short Stop", from_entry="Sell", loss=short_stop_level)

if (BBSignal == 1 and UseATRfilter)
    TrendLine := low - atr(ATRperiod)
    if (TrendLine < TrendLine[1])
        TrendLine := TrendLine[1]
else if (BBSignal == -1 and UseATRfilter)
    TrendLine := high + atr(ATRperiod)
    if (TrendLine > TrendLine[1])
        TrendLine := TrendLine[1]
else if (UseATRfilter)
    TrendLine := TrendLine[1]

if (BBSignal == 1 and not UseATRfilter)
    TrendLine := low
    if (TrendLine < TrendLine[1])
        TrendLine := TrendLine[1]
else if (BBSignal == -1 and not UseATRfilter)
    TrendLine := high
    if (TrendLine > TrendLine[1])
        TrendLine := TrendLine[1]
else if (not UseATRfilter)
    TrendLine := TrendLine[1]

iTrend := nz(iTrend[1])
iTrend := TrendLine > TrendLine[1] ? 1 : TrendLine < TrendLine[1] ? -1 : iTrend

buy_signal = iTrend[1] == -1 and iTrend == 1 ? 1 : na
sell_signal = iTrend[1] == 1 and iTrend == -1 ? 1 : na

strategy.entry("Buy", strategy.long, when=buy_signal and na(buy_signal[1]))
strategy.entry("Sell", strategy.short, when=sell_signal and na(sell_signal[1]))

plot(TrendLine, color=iTrend > 0 ? color.blue : color.red, style=plot.style_line, linewidth=2, transp=0, title="Trend Line")
plotshape(buy_signal == 1 and not hl ? TrendLine - atr(8) : na, text='💣', style=shape.labelup, location=location.absolute, color=color.blue, textcolor=color.white, offset=0, transp=0, size=size.auto)
plotshape(sell_signal == 1 and not hl ? TrendLine + atr(8) : na, text='🔨', style=shape.labeldown, location=location.absolute, color=color.red, textcolor=color.white, offset=0, transp=0, size=size.auto)

附加的文件:

反馈

1
开发者 1
等级
(30)
项目
55
22%
仲裁
12
67% / 8%
逾期
2
4%
空闲
2
开发者 2
等级
(52)
项目
97
24%
仲裁
11
18% / 18%
逾期
12
12%
工作中
3
开发者 3
等级
(158)
项目
175
43%
仲裁
6
0% / 67%
逾期
8
5%
空闲
相似订单
Modification 100+ USD
I need a modification on my existing Ea if you can Can fixed risk management to lot size instead of percentage. don’t want strategic risk management input to be based on percentage Instead lot size. The strategic risk management function I need turned from percentage to lot based And I need sells and buys to have separate tps and sl options Budget:$100 Day: 1 day
I want grate robot for making profits that know when to start a good trade and close a trade and must be active all time to avoid lost of money
Hi Guys, I am looking to someone that can generate an indicator for MT4 as explained below. Basically I would need that the indicator point out the price that will close my position in stop out/margin call. The indicator should pick automatically the level of trade out for the broker (which can be different from a broker to another broker) It should write (ideally on the bottom on the left) the following information
Programmer needed for EA 100 - 200 USD
I am looking to build an EA with set stop loss and take profit targets (take profit is based on Fibonacci levels) for stock futures markets. It is based on times of the day. Variables are: number of contracts per trade, entry price based on Fibonacci levels and take profit is also based on Fibonacci levels. The stop loss level is strict and not based on Fibonacci levels. I've been out of trading for a few years so I
Mbeje fx 50+ USD
I like to own my robot that why I want to build my own.i like to be a best to every robot ever in the life to be have more money
I need an MT5 EA that can do the following: I have to give the EA a price in advance, when the price is reached the EA has to automatically place a buy stop or sell stop order 0.5 pips below or above the price. Is this possible
Good day, I want someone to help me create a universal news filter with on/off switch, with start and end settings, and drawdown control with magic number of EAs, etc. Thanks
Hello, I am looking for a professional programmer to optimize my existing EA integrating it with ChatGPT to analyze currencies using various methods to make the right trading decisions. i want it to be an EA that can be trusted to carry trade with the help of chat gpt and also have a very low drawdown
I am looking for an experienced MQL5 developer to help me finalize and optimize an Expert Advisor (EA) for the FTMO challenge. I have already built a significant portion of the code, but it requires further refinement and optimization to ensure it functions according to the trading strategy I intend to use. I am happy to share all the resources, including the current code, reference materials, and detailed
dreams good and have a great Cash out from your smart phone , tuyoywuiy glamorous flood see full idk idk slow so dolls stupid sis workouts who's spark koalas oral waits also doggo idk

项目信息

预算
30+ USD
VAT (21%): 6.3 USD
总计: 36.3 USD
开发人员
27 USD
截止日期
 3 天