Develop an MT4 expert advisor that triggers trades and adjusts loss making trades using the profitable trades

Job finished

Execution time 11 days
Feedback from customer
Exceptional work. Many developers tried to make this EA work for me but failed. Eric managed to get it done correctly. I am impressed. Thank you Eric.

Specification

Developers from Africa should not apply for this job.


Green candle means - Closing price is greater than Opening price.
Red candle means - Closing price is less than Opening price.

Timing Of Triggering Trades:

1 trade is triggered every time a candle closes, except on the candle that ends are rollover time. The candle that closes at 0:00 will also trigger a trade but it should be 300seconds before so it would trigger at 23:55:00

If the chart timeframe if H1 then 23 trades will be triggered when the candle closes and 1 trade will be triggered at 23:55:00
If the chart timeframe if H4 then 5 trades will be triggered when the candle closes and 1 trade will be triggered at 23:55:00
If the chart timeframe if D1 then there is only 1 trade per day and it will be triggered at 23:55:00


The conditions & direction of trades:

If a candle is green and it is time to trigger a trade EA will trigger a Buy trade
If a candle is red and it is time to trigger a trade EA will trigger a Sell trade


Types of trades & workings of EA

Settings – Input Section
Main Trade Size = 0.10 lots
Main Trade Profit = 0.00100
The EA first triggers a Main Trade let’s say it is a 0.10 lot buy order @ 1.17200 and feeds in take profit level of 1.17300
Price goes up and hits take profit. Trade closes. Next time conditions are met since there are no active trades, EA again triggers a Main Trade.


Settings – Input Section
Counter Trade Size = 0.70 lots
Counter Trade Profit = 0.00100

IF however, price does not reach 1.17300, but instead moves down. When the conditions are met EA triggers a Counter Trade and let’s say it is a 0.70 lot sell order @ 1.16850 and feeds in take profit level of 1.6750

Price moves down further, and hits take profit. A profit of 100 points x 0.70 lots = $70 – commission charges = $65 net profit

Now the EA automatically adjusts the loss of the Main trade. The Main Trade is currently making a loss of 1.17200 – 1.16750 = 450 points x 0.10 lots = $45 + commission charges = lets say this is $48

The EA just closes the entire 0.10 Main trade since the loss of the Main Trade is less than the profit of the Counter Trade.

If however, the active loss was something like $95 and the Counter Trade profit was $65 then the EA would only close part of the Main Trade. ($65/$95)x100 = It would close less than 68.42% of the Main Trade so 0.06842 lots but rounded down so it would close 0.06 lots

0.04 lots of the main trade would remain active. Now conditions for a new trade are met again and a new trade is triggered. It will be a Counter Trade again since there is an active Main Trade that is in a loss.

*Note* The gross profit must be taken from the terminal since the above calculation will not always be accurate. If we are trading the EURAUD chart and funds are in USD then there will be a conversion rate due to which the profit might be 35% or 30% lower. Therefore, we take the profit from the terminal – commission – swap charges to land the net profit.

Similarly, the loss on the loss making trade should also be calculated from the terminal.

In this way the Counter Trades will be placed again and again until all the Trades are closed. Counter Trades will also be placed to reduce losses on other loss-making counter trades. It is not only restricted to reducing the losses on Main Trades.

Counter Trades will be restricted when trades are in profit.

In some cases, I need the EA to restrict placing a trade. This is when another active trade is in profit. So, if there is a buy order at 1.12530 with take profit 1.12630 (whether it is a Main Trade or a Counter Trade). If price rises to 1.12670 and the time comes to trigger another buy order, the EA will not place this trade since there is an active buy order in profit. However, if the price was 1.12620 then it would trigger the trade.

Therefore by this logic if there is an active trade at 1.12630 then the EA will only place another buy order if the price is lower than 1.12630

The same rule applies for sell orders. If there is an active sell order at 1.10450 then it can place another sell order only at prices above 1.10450

Responded

1
Developer 1
Rating
(74)
Projects
121
43%
Arbitration
12
33% / 50%
Overdue
17
14%
Free
2
Developer 2
Rating
(555)
Projects
922
48%
Arbitration
300
59% / 25%
Overdue
123
13%
Loaded
3
Developer 3
Rating
(272)
Projects
394
63%
Arbitration
70
53% / 26%
Overdue
198
50%
Free
4
Developer 4
Rating
(11)
Projects
12
42%
Arbitration
1
0% / 100%
Overdue
0
Loaded
Similar orders
I need a proficient developer to code my NinjaTrader 8 strategy, In order to work perfectly. Your expertise is invaluable for this project's success. Let's collaborate to achieve optimal trading results
I'm looking for a skilled developer to connect my TradingView signals with cTrader, ensuring flawless functionality. Your expertise is essential for this project's success. Let's collaborate to achieve seamless trading automation
I want a simple DLL written in C# for use in an MT4 EA that demonstrates how to connect to an external database held online. This is nothing fancy and just a prototype/demonstration really of what code is needed to connect to external databases held on the web. This is for educational purposes only so I can see the source code and how I can incorporate it in my own EAs in the future. I have already set up the
Could you please review this code and provide feedback on whether you're able to assist with it? I'm seeking confirmation on whether you're comfortable working on this particular task. Your expertise would be greatly appreciated in ensuring its functionality and efficiency."
I am in search of a skilled MQL5 developer with a proven ability to optimize trading robots across various assets, including synthetic indices like V75, Boom and Crash, gold, US30, US100, and more. I'm looking for an experienced developer to enhance my multi-asset trading EA, which was originally developed exclusively for V75 and is based on the smart money concept. The developer must be free in taking up the job
Hey greetings to you all. I need an expert Metatrader 5 developer that have successfully developed a profitable Mt5 EA I can buy with high win rate . Kindly bid if you have one with backtesting results prove and let discuss about the price . Thanks
I hope this message finds you well. I am in search of a FREE skilled developer to transform three indicators into a fully functional trading robot. These indicators consist of two MACD indicators, each displaying two colors (red and green), along with a RED arrow signal. Here are the specific requirements for the project: The robot should execute trades only when the RED arrow signal appears and both MACD indicators
Hello, Thank you for reviewing the job description. We're in need of an experienced developer to finalize an EA that's currently in progress. We'll provide the source code of the EA for implementing necessary changes to resolve the existing bugs. The EA is primarily based on price action patterns and includes risk management features and an indicator. All required features have been added to the EA; we simply need to
p.p1 {margin: 0.0px 0.0px 12.0px 0.0px; font: 16.0px Times; color: #353535; background-color: #ffffff} p.p2 {margin: 0.0px 0.0px 12.0px 0.0px; font: 16.0px Times; color: #353535; background-color: #ffffff; min-height: 19.0px} I want to be clear before we start, so you are going to build me an expert advisor that works on MT5, that will also require an authorisation to work (like a license key, like the expert advisor
Hello I have Order Flow Chart & Software Depends on Ninjatrader I want to EA a trading robot that works on different platforms via API Expert NinjaTrader Programmer for Cross-Platform Trading Robot I'm in need of a skilled NinjaTrader programmer to develop a cutting-edge trading robot that seamlessly operates across various platforms via API integration? I want a customized Expert Advisors (EAs) tailored to your

Project information

Budget
50+ USD
For the developer
45 USD
Deadline
from 1 to 4 day(s)