EA to Close Trades Using Exchange File

MQL4 Experts

Trabalho concluído

Tempo de execução 20 horas
Comentário do desenvolvedor
His project description is very clear. He is smart and professional in EA description.5 stars. Thank you.
Comentário do cliente
He demonstrated his professional skills when he completed the job correctly and promptly. Great work!

Termos de Referência

I need an EA that compares the candle close price of 2 MT4 terminals, and closes trades according to a formula. I already have a seperate arbitrage EA to open and close the trades. This EA that you are doing will add an additional method to close the trade, in case the original EA fails to close it. Reliability and stability of this EA is the priority.


On the same computer, I will use 2 MT4 terminals - Primary MT4 and Secondary MT4. There will also be 2 EAs - Primary EA and Secondary EA. The Primary EA will be installed in Primary MT4 M1 chart. Secondary EA will be installed in Secondary MT4 M1 chart. There will be one Secondary EA, and one Primary EA.

The Secondary EA will send candle close prices (bid price) of all the symbols in the market watch to an exchange file. This exchange file is to be located in C:\Users\Username\AppData\Roaming\MetaQuotes\Terminal\Common\Files. The secondary will send the candle close prices of the previous minute and the previous previous minute, as well as the corresponding time of the candle. For example, if the broker time is 10:03:23, secondary EA will send the close prices of the 10:02 and 10:01 candles, and their candle times. For each symbol in the secondary market watch, the exchange file will contain 4 data: 10:01 candle close price, 10:01 candle time, 10:02 candle close price, 10:02 candle time. Secondary EA will update the exchange file every second. So whenever a new candle is formed, the exchange file will get updated. The exchange file will contain data for all the symbols in the market watch.

This is an example of what the exchange file should look like. You can use a different format, as long as all the required data is included.
AUDCAD 10:01 0.91978
AUDCAD 10:02 0.91944
AUDJPY 10:01 80.381
AUDJPY 10:02 80.393
GBPAUD 10:01 1.87760
GBPAUD 10:02 1.87743

etc



The Primary EA will read the exchange file every second. First, it will look at the same symbol. Then, it will look at the secondary MT4 candle times, and compare that candle to the same candle in the primary MT4. For example, for each symbol, the primary EA will look at the 10:01 and 10:02 candle in the primary MT4, and compare it to the same candle in the exchange file.


The Primary EA will close trades according to the following formula:

Close trade condition:
(ClosePrimary - CloseSecondary) of previous minute = (ClosePrimary - CloseSecondary) of previous previous minute

ClosePrimary- Candle closing price of primary MT4
CloseSecondary- Candle closing price of secondary MT4


The Primary EA will do this calculation every second to check the close trade condition. This calculation is done for all the symbols. For any particular symbol, if the close trade conditions are met, all trades of that symbol will close.

Please show the calculation in the Experts log when Primary EA closes a trade. This is so that I can check if calculation is correct. 

Sometimes, the broker will have missing candles. If any of the 4 candles are missing, calculation cannot be done and EA does not close trade. EA will wait until all 4 candle data are present before doing a calculation.



Note 1: Primary MT4 and Secondary MT4 are using same broker and have the same broker time.
Note 2: The suffix of the Primary and Secondary MT4 are different. Maybe I need to input the suffix in the EA settings.


Respondido

1
Desenvolvedor 1
Classificação
(30)
Projetos
52
52%
Arbitragem
6
0% / 100%
Expirado
18
35%
Livre
2
Desenvolvedor 2
Classificação
(104)
Projetos
120
33%
Arbitragem
4
0% / 50%
Expirado
2
2%
Livre
3
Desenvolvedor 3
Classificação
(5)
Projetos
6
50%
Arbitragem
2
0% / 50%
Expirado
0
Livre
4
Desenvolvedor 4
Classificação
(42)
Projetos
47
30%
Arbitragem
12
17% / 75%
Expirado
6
13%
Livre
5
Desenvolvedor 5
Classificação
(155)
Projetos
239
70%
Arbitragem
3
67% / 33%
Expirado
20
8%
Livre
6
Desenvolvedor 6
Classificação
(63)
Projetos
84
26%
Arbitragem
23
22% / 48%
Expirado
23
27%
Livre
Pedidos semelhantes
Indicator in use: Bollinger Bands Mechanism (See diagrams provided for help) Sells: 1. Trigger candle: When candle low is above the top Bollinger band - accurate to the lowest point scale (e.g. On EURUSD if candle low is 1.07915 and the value of top bollinger is 1.07914 - this is a sell signal; or if on Futures if the increment is .25 or .10 then this is used) 2. Enter sell ONLY on the next candle if price breaks
Indicator in use: Bollinger Bands Mechanism: (See diagrams provided for help) Sells: 1. Trigger candle: When candle low is above the top Bollinger band - accurate to the point scale (e.g. On EURUSD if candle low is 1.07915 and the value of top bollinger is 1.07914 - this is a sell signal) 2. Enter sell ONLY on the next candle if price breaks below the trigger candle LOW (using the e.g. above- if next candle price
hey guys, im looking for an auto mt5 license system through a web app i have already, i simply want it so a unique license key is generated for memebers, they input this onto the EA input and then it checks if its valid. active license per user capped at 5. i already have an mt5 coder and dec team for the app so i dont know if youd prefer to intergrate onto the webapp yourself or simply provide the code and doc so my
I need a simple panel to execute both buy and sell operations with very basic things like stopp loss take profit that functions for both market orders such as buy stop sell stop buy limit sell limit I don't care about colors or design I just want how you can do it what interests me most are the functions
I want to create an EA that can take bids according to information of a logic I have developed to give indication of a BUY or SELL opportunity. The EA will then be able to activate the BUY at the lowest possible position once the indicator clears it for a BUY and take bid upwards or identify the highest point and clears it for a SELL and take bids downwards. As you can see from example of JULY 2024 data to see how
We are seeking a skilled developer who can convert a Tradingview indicator written in Pinescript to a NinjaTrader indicator written in C#. The goal is to create a profitable trading strategy using this indicator. The successful candidate will have expertise in both Pinescript and C# programming languages, as well as a strong understanding of trading indicators and strategies. The main responsibilities will include
I am seeking an experienced MQL5 developer to create a user-friendly manual Grid Trading Expert Advisor (EA) with the following key features: Dynamic Grid Trading: Adjustable Grid Distance: Traders can manually input grid distance in pips via an intuitive, movable table. Take Profit Management: Fixed TP for the initial positions (e.g., first 5 trades). Stop-Loss (Optional): Traders can choose to use a stop-loss with
I want have the possibility to increase lotsize not alone by Lot-multiplier rather I want add a fix-lot increase for excample for 0,05 lot. I want have this for buy / sell and hedge-buy and hedge sell
Develop EA to track performance metrics of strategies I would like to develop an EA that will track the performance metrics of the strategies I have running on a terminal, If any of the metrics start to under perform then the EA/Indictor should alert me with a pop up alert that specify's the metric that has triggered the alert. The EA should also display the metrics in a dashboard - please see my example screen shot
I would like to modify the RSI Epert Avisor with a developer. I would like to use the RSI Expert on the inverse mode and the base setting doesnt conatain this strategy mode

Informações sobre o projeto

Orçamento
50+ USD
Desenvolvedor
45 USD