EA developer for gold trading bot

Specification

Below is the pine eidtor script convert it to MQL5 coding language and create bot based on following condition

1. This all should be on 5-minute chart timeframe 

2. For Buy side, buy after closing of second candle when buy signal is given and hold buy position until sell signal is given.

3. For sell side, sell after closing of second candle when sell signal is given and hold sell position until next buy signal will be given.

4. Stoploss should be the low of previous 4 candles after giving buy signal

5. for buy position lot size should be 0.01

6. for sell position lot size should be 0.01


//@version=5
strategy("Gold Bot", overlay=true)

// Inputs
a = input(2, title='Key Value (Sensitivity)')
c = input(1, title='ATR Period')
h = input(false, title='Signals from Heikin Ashi Candles')

// EMA Smoothing Inputs
len = input.int(9, minval=1, title="EMA Length")
offset = input.int(title="Offset", defval=0, minval=-500, maxval=500, display=display.data_window)
typeMA = input.string(title="Smoothing Method", defval="SMA", options=["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"], group="Smoothing", display=display.data_window)
smoothingLength = input.int(title="Smoothing Length", defval=5, minval=1, maxval=100, group="Smoothing", display=display.data_window)

// ATR Calculation
xATR = ta.atr(c)
nLoss = a * xATR

// Source Selection
src = h ? request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, close, lookahead=barmerge.lookahead_off) : close

// ATR Trailing Stop Calculation
xATRTrailingStop = 0.0
iff_1 = src > nz(xATRTrailingStop[1], 0) ? src - nLoss : src + nLoss
iff_2 = src < nz(xATRTrailingStop[1], 0) and src[1] < nz(xATRTrailingStop[1], 0) ? math.min(nz(xATRTrailingStop[1]), src + nLoss) : iff_1
xATRTrailingStop := src > nz(xATRTrailingStop[1], 0) and src[1] > nz(xATRTrailingStop[1], 0) ? math.max(nz(xATRTrailingStop[1]), src - nLoss) : iff_2

// Position Calculation
pos = 0
iff_3 = src[1] > nz(xATRTrailingStop[1], 0) and src < nz(xATRTrailingStop[1], 0) ? -1 : nz(pos[1], 0)
pos := src[1] < nz(xATRTrailingStop[1], 0) and src > nz(xATRTrailingStop[1], 0) ? 1 : iff_3

// EMA Calculation
ema = ta.ema(src, len)

// Smoothing Calculation
smoothingLine = switch typeMA
    "SMA" => ta.sma(ema, smoothingLength)
    "EMA" => ta.ema(ema, smoothingLength)
    "SMMA (RMA)" => ta.rma(ema, smoothingLength)
    "WMA" => ta.wma(ema, smoothingLength)
    "VWMA" => ta.vwma(ema, smoothingLength)

// Buy and Sell Conditions
above = ta.crossover(ema, xATRTrailingStop)
below = ta.crossover(xATRTrailingStop, ema)
buy = src > xATRTrailingStop and above
sell = src < xATRTrailingStop and below

// Stop Loss Calculation
stopLossLevel = ta.lowest(low, 3)

// Strategy Execution
if (buy)
    strategy.entry("Long", strategy.long, stop=stopLossLevel)

if (sell)
    strategy.close("Long")

// Plotting
plot(ema, title="EMA", color=color.blue, offset=offset)
plot(smoothingLine, title="Smoothing Line", color=#f37f20, offset=offset)
plotshape(buy, title='Buy', text='Buy', style=shape.labelup, location=location.belowbar, color=color.new(color.green, 0), textcolor=color.new(color.white, 0), size=size.tiny)
plotshape(sell, title='Sell', text='Sell', style=shape.labeldown, location=location.abovebar, color=color.new(color.red, 0), textcolor=color.new(color.white, 0), size=size.tiny)

barcolor(src > xATRTrailingStop ? color.green : na)
barcolor(src < xATRTrailingStop ? color.red : na)

// Alerts
alertcondition(buy, 'UT Long', 'UT Long')
alertcondition(sell, 'UT Short', 'UT Short')


Responded

1
Developer 1
Rating
(325)
Projects
505
19%
Arbitration
33
42% / 30%
Overdue
34
7%
Loaded
2
Developer 2
Rating
(22)
Projects
21
10%
Arbitration
4
25% / 75%
Overdue
0
Free
3
Developer 3
Rating
(13)
Projects
18
11%
Arbitration
4
50% / 50%
Overdue
1
6%
Working
Published: 1 code
4
Developer 4
Rating
(270)
Projects
399
27%
Arbitration
39
41% / 49%
Overdue
1
0%
Free
5
Developer 5
Rating
(39)
Projects
54
61%
Arbitration
2
50% / 50%
Overdue
0
Free
6
Developer 6
Rating
Projects
1
0%
Arbitration
4
0% / 50%
Overdue
0
Working
7
Developer 7
Rating
(7)
Projects
8
13%
Arbitration
3
0% / 67%
Overdue
2
25%
Free
8
Developer 8
Rating
(6)
Projects
6
0%
Arbitration
2
50% / 0%
Overdue
1
17%
Free
9
Developer 9
Rating
(2)
Projects
2
0%
Arbitration
0
Overdue
0
Free
10
Developer 10
Rating
(77)
Projects
243
74%
Arbitration
7
100% / 0%
Overdue
1
0%
Free
Published: 1 article
11
Developer 11
Rating
(7)
Projects
8
0%
Arbitration
4
0% / 100%
Overdue
3
38%
Free
12
Developer 12
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
13
Developer 13
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
14
Developer 14
Rating
(2)
Projects
4
0%
Arbitration
3
33% / 67%
Overdue
2
50%
Free
15
Developer 15
Rating
(295)
Projects
472
40%
Arbitration
103
40% / 23%
Overdue
78
17%
Busy
Published: 2 codes
Similar orders
Hey guys, I’ve been trading for 6 years now and I need to automate a strategy that is really simple and ove developed by myself. Can you help me on that? Here is my e-mail angelocherubini24@gmail.com
Hello developers, I am currently using a scalping EA on XAUUSD (M1) based on pending orders and ATR logic, and I’m looking for professional optimization and possibly strategy improvements. My main goals: High-speed scalping (fast execution and fast entry logic) Ability to trade both directions simultaneously (true hedge mode: buy and sell at the same time) Professionally optimized pending order distance based on gold
SavannaFX Pro 100+ USD
//+------------------------------------------------------------------+ //| SavannaFX Pro | //| Created for Junior | //+------------------------------------------------------------------+ #property strict input int FastMA = 20; input int SlowMA = 50; input int RSIPeriod = 14; input double LotSize = 0.1; input int StopLoss = 300; input int TakeProfit = 600; int
Hello, I have a strategy written in Pine Script (TradingView) that used to send signals to MetaTrader 5 via PineConnector. Now I want a native MT5 Expert Advisor (EA) written in MQL5, so I can do full backtesting and trading inside MetaTrader without any external bridge. I will provide: - Full Pine Script code - Entry and exit rules (based on BOS and OB logic) - SL/TP and dynamic risk management (R:R) - Breakeven
Specification Hi Free lancers, I need an EA which relates to Sure Fire Hedging EA base on Below parameters needed. Overview how it works: This EA will be able to open a trade with either Buy or Sell selection (manual- to be manually switch buy or sell selection ), another selection for automatic open trading can choose only buy. Once the EA already open trade (example -buy position) with starting lot size 0.01
Data Integrity 500 - 1000 USD
The trading bot is an automated software system designed to monitor financial markets, execute trades, and manage risk based on predefined strategies. The bot aims to maximize profits while minimizing human intervention and emotional decision-making. Scope: Supports automated trading on selected exchanges (e.g., Binance, Bitget, Coinbase). Executes trades based on technical indicators, signals, or AI models. Provides
1. General Objective Development of an Expert Advisor in MQL5 intended for Futures markets , based on an existing trading strategy that I will provide (described logic or precise rules). The main objectives are: Faithful implementation of the strategy , Full debugging of the EA, Validation of correct behavior through backtesting. 2. Markets and Instruments Markets: Futures Symbols: to be defined (e.g. indices
Subject: Major Upgrade Request: Auto Confluence of Signal/Trend/Momentum Scores with Multi-Timeframe SMC Hello, Your bot is excellent analytically, but I'm facing daily manual intervention due to the multiple indicators and timeframes. --- 📊 Current Situation: The bot uses: · Signal Score · Trend Score · Momentum Score · SMC Analysis · 3 Timeframes (Fast 5M, Medium 15M, Main 1H) · 4 Additional Indicators Currently
Busco programador profesional con experiencia demostrable en MQL5 para crear un Expert Advisor en MetaTrader 5 basado en Price Action , con lógica jerárquica, reglas objetivas y gestión de zonas dinámicas. La estrategia esta explicada en un documento Word de 30 páginas (con imágenes) explicado en español. Características del EA: Operaciones Buy, Sell, Buy Limit y Sell Limit (máx. 2 operaciones pendientes simultáneas
Multi-Slave Inverse Hedging EA with Martingale Grid — MT5 Category: Experts Description: I am looking for an experienced MQL5 developer to build a professional-grade Expert Advisor system called Hedging EA Trader . This is a well-documented project — I have a full 30+ page Software Requirements Specification (SRS) ready to share with the selected developer. System Overview: The EA uses a Master/Slave architecture: 1

Project information

Budget
30 - 50 USD
Deadline
from 1 to 3 day(s)