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

MQL4 Asesores Expertos

Trabajo finalizado

Plazo de ejecución 9 días
Comentario del Ejecutor
Good customer. Very clear task description.
Comentario del Cliente
Elena coded an EA for me. Great communication, finished ahead of deadline and the EA met my requirements on the first try. Excellent Developer.

Tarea técnica

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.




Han respondido

1
Desarrollador 1
Evaluación
(878)
Proyectos
1390
67%
Arbitraje
117
32% / 42%
Caducado
215
15%
Libre
2
Desarrollador 2
Evaluación
(15)
Proyectos
21
38%
Arbitraje
3
33% / 33%
Caducado
4
19%
Libre
3
Desarrollador 3
Evaluación
(782)
Proyectos
1346
72%
Arbitraje
109
28% / 49%
Caducado
340
25%
Ocupado
4
Desarrollador 4
Evaluación
(68)
Proyectos
111
26%
Arbitraje
17
6% / 71%
Caducado
15
14%
Libre
5
Desarrollador 5
Evaluación
(41)
Proyectos
46
28%
Arbitraje
9
0% / 100%
Caducado
7
15%
Libre
6
Desarrollador 6
Evaluación
(13)
Proyectos
15
27%
Arbitraje
1
0% / 100%
Caducado
1
7%
Libre
7
Desarrollador 7
Evaluación
(94)
Proyectos
148
59%
Arbitraje
16
38% / 13%
Caducado
25
17%
Libre
8
Desarrollador 8
Evaluación
(1)
Proyectos
1
100%
Arbitraje
0
Caducado
0
Libre
9
Desarrollador 9
Evaluación
(8)
Proyectos
13
85%
Arbitraje
1
0% / 100%
Caducado
0
Libre
10
Desarrollador 10
Evaluación
(96)
Proyectos
142
75%
Arbitraje
0
Caducado
2
1%
Libre
11
Desarrollador 11
Evaluación
(555)
Proyectos
922
48%
Arbitraje
300
59% / 25%
Caducado
123
13%
Trabaja
12
Desarrollador 12
Evaluación
(2044)
Proyectos
2594
62%
Arbitraje
112
45% / 26%
Caducado
417
16%
Trabaja
13
Desarrollador 13
Evaluación
(259)
Proyectos
533
50%
Arbitraje
54
41% / 37%
Caducado
224
42%
Trabaja
14
Desarrollador 14
Evaluación
(221)
Proyectos
369
66%
Arbitraje
10
50% / 0%
Caducado
46
12%
Libre
15
Desarrollador 15
Evaluación
(26)
Proyectos
34
26%
Arbitraje
7
14% / 43%
Caducado
7
21%
Libre
Solicitudes similares
I have an EA that has a nasty drawdown but otherwise is quite profitable. I am looking for a developer who can improve the drawdown by closing or hedging the older open orders. You'll need to supply a demo showing that you've solved this problem rather than just claiming that you can fix it
dear developers.i want to modify my custom indicator by adding new rules for alerts and arrows,the indicator is based upon some trend following rules and the indicator should be able to send out all types of alerts.i will need demonstration...thank you
Looking for a developer of profitable EA tested for over 2 or more years time history of profits with investors read me only access as proof of usage. MT4 or MT5
Adjust MY Hedging EA 30 - 40 USD
1. Need averaging TP for my hedging EA. (Close both Buy and Sell position with TP) 2. Add function auto/manual entry. (EA will entry based on manual position(placed by trader) or auto trade based on existing setting)
I have a robot set up that sends trading signals to my telegram group and the group sends trading signals for (28 forex pairs, 3 crypto pairs, 6 commodities, 6 indexes, & 55 stocks) basically almot 100 CFDs and sends out trend price action breakout, impulse, reversal, and exit indications to each one of those CFDs on different timeframes. I want to make it so that a person can sign up and choose which alerts they
I am in search of a skilled robot developer to craft a Martingale with Hedge strategy algorithm. The ideal candidate will possess deep expertise in algorithmic trading, proficiency in programming languages, and a keen understanding of financial markets. The role entails designing and implementing an automated system capable of effectively executing the Martingale strategy while integrating a hedge mechanism to manage
Create an EA zigzag 40 - 80 USD
Zigzag EA sends notify on MT4 mobile app indicator have 2 Conditions all are explained in the pictures accurately and clearly https://drive.google.com/file/d/10Y6SrvC2A7RTT_baAJ7vOKytTDaUvRRQ/view?usp=sharing Warning: Do not send me a notification if your offer is higher than $ 100 because I did the project twice for less than $60 And I want to do the project now because there are mistakes on my part that I want to
Hello developers, Thanks in advance for checking my order. I have been creating and trying to mastering this strategies for a long time and finally it's time to automate it. I’m not sure if everything I imagined can be done. I tried my best to explain whats needed for the ea and how it should performance but due my lack of knowledge in programming probably you will have some questions soo feel free to ask.. Only
MA Crossover EA 30+ USD
I need someone to create an MA crossover EA. This program should be able to trade the crosses. We would be using the MA indicators to make decisions about buying and selling stocks or other assets. The MA crossover would help me invest my money more effectively by automatically executing trades based on these indicators. If you can create this program, please let me know as I am interested in working with you
MT4 EA 30+ USD
I have project for expert developer here.. The task is to make the EA take trades using the indicator upper line and the lower line to take trades. When the upper line appears on the chart I need the EA to take a sell at that point. Then when the lower line shows up I need the seel trade to close. The same concept applies for the lower line. I need the EA to take a buy trade when the lower line appears and close when

Información sobre el proyecto

Presupuesto
50 - 150 USD
Para el ejecutor
45 - 135 USD