Martingale on a Moving Average strategy. Adding the feature on an existing EA

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

Modify an existing moving average crossover EA

 

We need two things to be done in our existing and functioning EA for MetaTrader 4. 

 

1.          Adding a feature that offset losses

2.          Adding brokers’ commissions cost to the EA

 

1. Offset losses

 

The existing EA, buys and sells as explain on the document attached, called “moving average strategy”.

 

Our intention is to add a feature that is triggered when a trade make a loss. The objective is to cope with the losses generating more trades, a kind of “Martingale strategy”. 

 

Bullet points

 

·       The strategy tries to offset the loss trades, generating more trades.

·       It can generate one or more trades to cope with the losses of a trade.

·       We may want to generate more than one trade to cope with the losses of a trade.

·       Those trades that are generated to offset loss trades, can generate more trades. In classic martingale, your next trade will try to cope with your previous trade loss, here we will divide in X trade to cope with the loss.

·       Be able to choose how many trades are open every time.

·       On report, we will need to be able to see how many trades still to be open. So, it needs to save information of pass trades and pending trades.

 

Parameters

 

Loss trade divided: 0 means the feature is off. 1 to XX, it will divide the loss trade in XX future trades, if parameter is 5, it will generate 5 consecutive trade to cope with the loss.

Active trades: At some point we would like to choose how many trades the EA opens. If 0, unlimited if above 0 whatever it says. With this parameter you limit the trades the EA generate every time, as market conditions could make the EA to generate lots of trades in a matter of MA crosses.

 

 

 

 

 

On report

 

On report we need the following figures;

 

Number of trades still to go in case we limit the active trades.

Value of the trades to go.

Number of trades trading.

Value of the trades trading.

Sum of commissions.

 

A compressive case

 

See on photo attached, 3.png

 

First column, called CROSS, this is when a MA cross the EA generate an order.

Second column, called profit main trade, it is simple the main trade the EA does when MA crosses, to make it easy I choose take profit on 4 pips $60 and 40 pips $600.

Third column, called loss trade trigger is a reference of each main trade that goes to losses.

Then the one called profit and loss, is a simple sum of each trade.

And the last one equity, this is the net deposit.

 

Those this exemple we hae used this parameters

 

Loss trade divided by: 10

Active trades: 0

 

So, it will dived the losses by 10 and it will allow the EA open as much trades as the MA and losses dictates.

 

1.      Cross 1 goes wrong and loss money, $600. The EA will generate 10 trades for the next Crosses to cope with loss of Cross 1, and the calculations for the next 10 trades goes as follows $600/10 + target profit / 10. This trades is 1.1.

2.      On Cross 2 the EA will generate two trades, the main one and a second one that tries to cope with losses of trade on Cross 1, trade 1.1. 

3.      Cross 3 the EA will generate two trades, the main one and a second one that tries to cope with losses of trade on Cross 1, trade 1.1.

4.      Cross 4 the EA will generate two trades, the main one and a second one that tries to cope with losses of trade on Cross 1, trade 1.1. As it goes wrong, the EA will generate trade 1.2 and 2.1, those two trades will try to cope with losses of trade 1.1 and main trade of cross 4.

5.      Cross 5 EA wil generate 4 trades Main trade plus 1.1, 2.1 and 1.2.

 

 

 


 

 

 


2. Adding brokers’ commissions cost to the EA

 

We need a parameter to be able to define commissions. 0 means no commissions, and then euros per lot.

Файлы:

PNG
1.png
229.0 Kb
PNG
2.png
232.4 Kb
PNG
3.png
335.1 Kb
PNG
4.png
44.7 Kb
PNG
1_MA.png
257.3 Kb
PNG
2_MA.png
353.7 Kb
PNG
3_MA.png
591.5 Kb

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

1
Разработчик 1
Оценка
(137)
Проекты
167
35%
Арбитраж
11
91% / 0%
Просрочено
0
Свободен
2
Разработчик 2
Оценка
(23)
Проекты
45
20%
Арбитраж
24
29% / 42%
Просрочено
12
27%
Работает
3
Разработчик 3
Оценка
(62)
Проекты
140
46%
Арбитраж
19
42% / 16%
Просрочено
32
23%
Свободен
4
Разработчик 4
Оценка
(3)
Проекты
1
100%
Арбитраж
1
0% / 0%
Просрочено
0
Свободен
5
Разработчик 5
Оценка
(250)
Проекты
399
38%
Арбитраж
82
41% / 20%
Просрочено
69
17%
Занят
6
Разработчик 6
Оценка
(8)
Проекты
10
40%
Арбитраж
0
Просрочено
0
Свободен
Похожие заказы
I am looking for a coder to code my custom Ninjatrader 8 strategy to make it work perfectly your professioalism is needed in the project Kindly cotact me now and let Proceed
Hi i would like to recreate an indicator similar to the ( chaos visual average) it has the indicator super smoother line that is added to a level chart, i have edited this ex4 file to my liking but i would like to combine it with another indicator, the only issue is that the signals i want the (chaos visual average) do not provide to combine it, i have sent image of the setting for the indicator. With settings i have
I am looking for a coder to help me code my custom Ninjatrader 8 strategy and make it work perfectly without any error, your expertise is highly needed in this job kindly reach out to me and let proceed
I need a professional or expert who is a trader and also know about coding that can quote a profitable strategy and code the strategy for me in MT4 with my specification, If you are capable of doing this I will be glad to share my requirement with you to get started
I am looking for a developer to code my custom Ninjatrader 8 strategy and make it work perfectly, your expertise is highly needed for this project kindly reach out and let's proceed
Hello I am looking for a professional in building a stock trading robot and make it work perfectly Specifically, I want to build a robot for trading in options from the IOF your expertise is highly needed in this project Kindly reach out and let proceed
Integration of Supply and Demand Zones from CSV: Develop functionality to read supply and demand zone data from a .CSV file. Define the structure of the CSV file for storing zone data (e.g., price levels, zone type). Implement a mechanism to parse the CSV file and extract relevant zone information. Dynamic Zone Detection: Integrate algorithms to dynamically identify supply and demand zones based on historical price
Hello Great Developer. I have a HFT bot for mt4. Can you copy it for ctrader? I will be looking for a Great Developer to bid for it and let talk about it now
How are you today? We’re looking for a ctrader bot that can receive signals from tradingview and place orders on different ctrader accounts, so no strategy coding is required. Here are the details: https://www.loom.com/share/d8166c67a74f46c28920be9e131f8ec7?sid=bd2c6ff2-52e4-4355-b35f-f4fc1bfb0f3b&nbsp ; We would like to know from you what’s the most cost effective method to create this bot. PDF is also attached to
Due to the complicity of the strategy on the first two orders I madeI had to create another one with a simple strategy cos many can't create what I'm asking for...Example: : When The market is buying and rejects an has created an M formation the First leg is higher than the second leg(first leg Higher high,second leg lower high then a line must touch the peak of the Higher high then connect with the peak of the lower

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

Бюджет
70 - 120 USD
VAT (21%): 14.7 - 25.2 USD
Итого: 84.7 - 145.2 USD
Исполнителю
63 - 108 USD
Сроки выполнения
от 5 до 7 дн.