EA developer for gold trading bot

İş Gereklilikleri

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')


Yanıtlandı

1
Geliştirici 1
Derecelendirme
(214)
Projeler
347
16%
Arabuluculuk
22
41% / 32%
Süresi dolmuş
18
5%
Meşgul
2
Geliştirici 2
Derecelendirme
(21)
Projeler
20
10%
Arabuluculuk
2
50% / 50%
Süresi dolmuş
0
Çalışıyor
3
Geliştirici 3
Derecelendirme
(11)
Projeler
13
0%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
1
8%
Yüklendi
4
Geliştirici 4
Derecelendirme
(172)
Projeler
245
22%
Arabuluculuk
17
65% / 18%
Süresi dolmuş
1
0%
Yüklendi
5
Geliştirici 5
Derecelendirme
(7)
Projeler
9
0%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
0
Serbest
6
Geliştirici 6
Derecelendirme
Projeler
1
0%
Arabuluculuk
2
0% / 0%
Süresi dolmuş
0
Çalışıyor
7
Geliştirici 7
Derecelendirme
(4)
Projeler
5
0%
Arabuluculuk
1
0% / 0%
Süresi dolmuş
2
40%
Çalışıyor
8
Geliştirici 8
Derecelendirme
(1)
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
9
Geliştirici 9
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
10
Geliştirici 10
Derecelendirme
(63)
Projeler
194
73%
Arabuluculuk
4
100% / 0%
Süresi dolmuş
1
1%
Çalışıyor
Benzer siparişler
I require an MT4 Expert Advisor (EA) that automatically places hedge orders when a buy or sell order is placed by me or another EA. The hedge orders will consist of a stop order (either Buy Stop or Sell Stop), with the same lot size as the original order, deployed at a predefined price distance. The EA must ensure that only one hedge order is placed for each trade. The system should monitor trades based on specific
Hello there, am in need of an expert pinescript programmer who can work on an existing code to add some indicators and features. Please bid if you understand pinescript well and can work on existing code
FUNCTION 1 When I set max open orders to one it won't close the order. Changed should work as following When max open order is True and set to one it should still be able to close the open order. Finish today within next hour //+------------------------------------------------------------------+ //| Function to count orders | //+------------------------------------------------------------------+
I need help with creating a website traders chatroom, it must show traders online,offline,inactive. the chatroom top section must show four clocks with different times and time scale like this.. the chatroom must have a history data of up to 10days, then longer history must be deleted automatically. if you have better chatroom please say your recommendations
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
NRTR - indicator for MetaTrader 5 NRTR (Nick Rypock Trailing Reverse) - indicator for MetaTrader 4 NRTR WATR - indicator for MetaTrader 4 NRTR GATOR - indicator for MetaTrader 5 X2MA NRTR - indicator for MetaTrader 5 NRTR - indicator for MetaTrader 5 NRTR GATOR - indicator for MetaTrader 4 NRTR - indicator for MetaTrader 4 Stalin_NRTR - indicator for MetaTrader 5 NRTR Color Line - indicator for MetaTrader 5 NRTR Rosh
Martingale Strategy EA 50 - 300 USD
Dear , I hope this message finds you well. I would like to request the development of a trading robot (Expert Advisor) that incorporates the following strategies and features: Strategy Requirements: 1. Martingale Strategy: The robot should include a Martingale system to increase trade sizes after losses in order to recover losses and generate profit. 2. Trend-Following: It should also be able to detect and follow
Hello, I'm seeking a freelancer with access to a ready-made server solution for an educational forex project. Requirements: Ability to control or manipulate live or historical trading data. Platform to execute simulated trades with exaggerated outcomes. Tools for real-time trade simulation (white-label or virtual dealer solutions). If you have a suitable server or can help me find one, please reach out with details
A green point should be added at the Low point of candlesticks in the oversold zone—it is the L point. If there is at least one L point between two H points, search for a LL point in the interval between two H points. The candlestick with the lowest Low price will be the LL point. Generally, the LL point is not necessarily an L point. Search for candlesticks with the lowest Low price. If there is at least one H point
algo trading application want to developed Prerequisites for ordering a trading robot Trading robots are programs, which operate according to underlying algorithms. An algorithm is a set of actions that need to be performed in response to certain events. For example, the most common task in algo trading is the identification of the "New bar" event . When the event occurs, the robot checks the emergence of trading

Proje bilgisi

Bütçe
30 - 50 USD
Son teslim tarihi
from 1 to 3 gün

Müşteri

Verilmiş siparişler1
Arabuluculuk sayısı0