Need an Expert Advisor for MT4 based on multiple standard moving averages

MQL4 Эксперты

Работа завершена

Время выполнения 9 дней
Отзыв от исполнителя
Good customer. Very clear task description.
Отзыв от заказчика
Elena coded an EA for me. Great communication, finished ahead of deadline and the EA met my requirements on the first try. Excellent Developer.

Техническое задание

Trading Idea

It is a simple daily break-out system, based on how far price has been moving away from the opening price each day.

This EA is to be based on three moving averages to develop a trade signal. The moving averages operate on daily OHLC values. A value is calculated from the moving averages that establishes a buy limit price and sell limit price for the day. The buy limit is above the opening price and the sell limit is below the opening price. These limit values are not sent to the broker as limit orders, but held by the EA until the buy/sell trigger occurs then market orders sent to broker.

The buy and sell triggers will come from the closing price of the last bar. The timeframe of the bar is dependent on the chart that the EA is attached to.If either limit is triggered during that day and a position is opened, a trailing stop will be used to close the position. The trailing stop will always move based on close of 1 minute bars. If the position is not closed by the trailing stop, the EA is to close the order at the end of the day. It is possible that both buy and sell limits will be hit in a day, but the stop loss will be between them so there will only be one open position at a time.

The Indicators

  1. MA_Open is the moving average of the daily open prices
  2. MA_High is the moving average of the daily high prices
  3. MA_Low is the moving average of the daily low prices
  4. Avg_Up = MA_High - MA_Open
  5. Avg_Down = MA_Open - MA_Low
  6. Excursion = Max(Avg_Up, Avg_Down)
  7. Threshold = Excursion*Multiplier
  8. Buy_Limit = the opening price for the current day plus the value of Threshold
  9. For example, if the opening prices for today is 1.20000 and Threshold = 0.00500 then Buy_Limit = 1.20500.
  10. Sell_Limit = the opening price for the current day minus the value of Threshold
  11. For example, if the opening prices for today is 1.20000 and Threshold = 0.00500 then Sell_Limit = 1.19500.
  12. The Moving Averages are to share the following input variables so that each moving average has the same parameter values exept of the price they operate on (open, high, low).
  13. MA_Period : Default = 10
  14. MA_Shift : Default = 0
  15. MA_Method : Default = Simple
  16. Multiplier is to be set by user : Default = 1.0
Variables Avg_Up and Avg_Down, Excursion, Threshold , Buy_Limit and Sell_Limit are set by the EA and have no user defined parameters.


Rules to Open a New Position

  1. Check for pending orders and open positions. Only place an order to open when no pending orders or open positions exist. There is to be at most one open position at any time.
  2. Place a buy-to-open marked order when the closing price of the most recent 1-minute bar is greater than Buy_Limit.
  3. Place a sell-to-open market order when the closing price of the most recent 1 minute bar is less than Sell_Limit.

Rules to Close a Position

  1. Use a trailing stop loss at a Threshold*Tstop_Modifier
  2. Default value for input variable Tstop_Modifier = 1.0

    1. For example, if a buy order was executed at 1.20500, Threshold is 0.00500, and Tstop_Modifier = 0.5 then the initial value of the trailing stop is to be set at 1.20500 – (0.00500*0.5) = 1.20250

  3. The Trailing Stop is to be limited by input variable Max_SL : Default value = 50. Units are pips. Meaning that the stop loss price will always be 50 pips (the value of Max_SL) or less from the opening trade execution price.
  4. The trailing stop is to be moved based on the closing price of one-minute bars.
  5. Stop Loss cannot be moved towards the loss direction, i.e. the Stop Loss value cannot be increased.
  6. Close the open position using a market order when the close price of the most recent 1 minute bar crosses the stop loss.
  7. Before sending an order to close a position, check the following
    1. There is an open position
    2. The type of position (long or short)
    3. That the order type is the correct type to close close open position
  8. Only send a Market Sell order when there is an open long position and

  9. Only send a Market Buy order when there is an open short position

Other Inputs

  1. MagicNumber : Default = 88991

  2. Lot_Sizing : Menu of Fixed or Proportional. Default to be Fixed

  3. Fixed_Lots : Default = 0.1. This is the number of lots to be bought and sold

  4. Proportional_Pct : Default = 2.0. This is the percent of the account balance to be used as initial margin for the position. Lots are to be calculated from this value, the account balance and the margin required.

Graphical

The following will show on the chart and in the visualization of back tests.

  1. Green solid thin lines at Buy_Limit and Sell_Limit prices for the day

  2. Red solid thin lines at the trailing stop

  3. Green up arrow where buy orders are placed

  4. Red Down arrow where sell orders are placed

  5. Green dashed thin lines between the buy-to-open order and the sell-to-close order

  6. Red dashed thin lines between the sell-to-open order and the buy-to-close order

Error Handling

I don’t know. Apply best practices.

Logging

The EA is to log the following events and values

  1. Order execution time and price

  2. Reason for closing position – “Closed on trailing stop”or “Closed on end of day”.

  3. If Threshold < Threshold_Min

  4. Any errors reported by the trading console or the broker

Other

If possible please keep the onTick actions to a minimum for faster backtesting. I tried to make it so that everything is done on 1 minute or daily values.

Thank you and please me know if you have questions.




Откликнулись

1
Разработчик 1
Оценка
Проекты
1393
67%
Арбитраж
117
32% / 42%
Просрочено
215
15%
Работает
2
Разработчик 2
Оценка
Проекты
21
38%
Арбитраж
3
33% / 33%
Просрочено
4
19%
Свободен
3
Разработчик 3
Оценка
Проекты
1382
72%
Арбитраж
113
29% / 48%
Просрочено
343
25%
Свободен
4
Разработчик 4
Оценка
Проекты
111
26%
Арбитраж
17
6% / 71%
Просрочено
15
14%
Свободен
5
Разработчик 5
Оценка
Проекты
46
28%
Арбитраж
9
0% / 100%
Просрочено
7
15%
Свободен
6
Разработчик 6
Оценка
Проекты
15
27%
Арбитраж
1
0% / 100%
Просрочено
1
7%
Свободен
7
Разработчик 7
Оценка
Проекты
148
59%
Арбитраж
16
38% / 13%
Просрочено
25
17%
Свободен
8
Разработчик 8
Оценка
Проекты
1
100%
Арбитраж
0
Просрочено
0
Свободен
9
Разработчик 9
Оценка
Проекты
13
85%
Арбитраж
1
0% / 100%
Просрочено
0
Свободен
10
Разработчик 10
Оценка
Проекты
143
76%
Арбитраж
0
Просрочено
2
1%
Свободен
11
Разработчик 11
Оценка
Проекты
933
47%
Арбитраж
302
59% / 25%
Просрочено
125
13%
Загружен
12
Разработчик 12
Оценка
Проекты
2671
62%
Арбитраж
114
46% / 25%
Просрочено
420
16%
Загружен
13
Разработчик 13
Оценка
Проекты
540
50%
Арбитраж
55
40% / 36%
Просрочено
224
41%
Работает
14
Разработчик 14
Оценка
Проекты
369
66%
Арбитраж
10
50% / 0%
Просрочено
46
12%
Свободен
15
Разработчик 15
Оценка
Проекты
34
26%
Арбитраж
7
14% / 43%
Просрочено
7
21%
Свободен
Похожие заказы
Looking for someone to implent the following grid strategy into my existing EA: Overview : I need a skilled developer to implement a grid recovery strategy into my existing Expert Advisor (EA) for MetaTrader 4 (MT4). The strategy involves adding grid trades based on price movement and adjusting lot sizes according to specific rules. It also includes closing trades at breakeven points and full position closure when a
Hey Guys i've a PineScript /Source Code / ( Trading View ) indicator which has Buy and Sell Sign . i wanna make a MT5/4 Robot by it with some features . I need it has a simple panel to shows some details of robot at screen
Hi dear coders, I have an EA and for this EA I want additional code for Risk Management at my code, trade is triggered with this line int TheTicket = OrderSend(_Symbol,TradeType,(double)DoubleToString(TheLots,2),TradeType==OP_BUY?Ask:Bid,10,TheSL,TheTP,TheComment,MagicNumber,0,TradeType==OP_BUY?clrBlue:clrRed); I want you create a code and tutorrial how to change my code. the new code will be Risk Management Inputs
I'm seeking a Forex HFT Scalping EA that operates on live streaming tick data and candlestick patterns, executing a high frequency of trades without balance restrictions. The EA should be compatible with major currency pairs like EUR/USD, GBP/USD, USD/JPY, AUD/USD, GBP/JPY, GBP/AUD, and XAU/USD, as well as US30 indices. Given its HFT nature, it should focus on the 1-minute, 5-minute, 15-minute, and 30-minute
I need a custom MT5 EA that can place trades (Buy & Sell) from two Telegram channels. One telegram channel will give the trend signal (Bullish or Bearish) and the second telegram channel will give buy and sell signals
hello i like to have zigzag added to my EA and set orders when it makes a pullback strategy (Higerlow/Lowerhigh) or break of market structure strategy Higherhigh/Lowerlow break set order entry I want it to be able to do these 2 things but one at a time. -Zigzag makes a pullback into an HigherLow/LowerHigh set order entry -Zigzag breaks structure HigherHigh/LowerLow set order entry - For PULLBACK STRATEGY i just want
Looking for a indicator that can show where the majority of retail stop losses are placed Please can someone advise me how best to achieve this but it needs to be accurate
I have a grid trading bot that needs debugging. its perfect apart from a random stop loss I encountered. It’s supposed to have a stop loss at 99% but it one time closed trades at around 25% loss. Here is a list of potential things causing it to bug out (it’s running on MQL VPS MT5, I also want to retain the ability to close positions manually); - Chart change (symbol or timeframe) - Recompiling the EA - Server
Me gustaría poder crear automaticamente varias ordenes que se queden pendientes pudiendo definir los siguientes parámetros: Tipo de orden (Buy y sell stop, buy y sell limit. Precio de compra / venta. Pudiendo entrarlo manualmente o como un numero de puntos a sumar/restar del precio actual de marcado. Numero de puntos que ocuparan en total las ordenes y numero de ordenes a insertar (Ejemplo: 200 puntos, 4 ordenes, es
tardes desarolladores, quiero hacer un sistema semiatomatico, el deberia abrir las operaciones de venta o compra en un punto donde yo haga el analisis cumpliendo siertos criterios, por ejemplo abrir la operacion despues de que tresvelas del mismo color salga de un punto donde yo deje marcado , abriendo una operación 1/1 tenuendo en cuenta dos lineas que yo dejare marcadas

Информация о проекте

Бюджет
50 - 150 USD
Исполнителю
45 - 135 USD