Martingal-Hedging EA

MQL4 Asesores Expertos

Tarea técnica


Logic:

An EA that trades based on the logic from martingale and hedging strategy.


Please see attachment for better description with pictures

 

How EA prepares to begin trading:

At any given price, EA sets two opposite pending orders, with equal lot sizes (e.g = 0.1), at equal distance from the current price (this can be altered by the user, e.g, distance between pending orders = 20pips, 30pips, etc) & SL & TP are set as seen diagram.

In the illustration (diagram above) the distance between two pending from current price is set at 10pips (5pips + 5pips)

 

 

 

 

Illustrations when any of the pending orders is triggered:

 

Scenario-1

 

If price triggers buy-stop trade with (for e.g = lot size 0.1); and a TP of 10pips (& SL=30pips) (see diagram (a) below); >>>

EA Action

EA will delete the previous Sell-Stop order (of 0.1lot) and will simultaneously open NEW “Sell-Stop Pending Order” with Lot size 0.3 (ie, multiplier = 3, 3x 0.1 = 0.3) multiplier can be varied by user. (TP 10 pips, SL=30pips) at same price position that previous Sell-Stop order was deleted.

If Long Trade hits TP, >> Delete “Sell-Stop Pending Order”

 

Scenario-1 Profit Calculation:

LONG Trade from scenario-1 = $10

Deleted pending order =$ 0

Total: = $10 + $0 = $10

 

 

Scenario-2:

 

If Long position (from senerio-1) does not hit TP, and activates “Sell-Stop Pending Order” with Lot size 0.3>> (i.e Multiplier x3 of 0.1 lot of scenario-1)

 

EA Action

Open another “Buy-Stop Pending Order” (at exactly same position initial LONG position was triggered) simultaneously with Lot size (multiplier = x 3 of the previous opened position, 3x 0.3 = 0.9) and set TP 10 pips, SL = 20pips >>

If NEW Short position (i.e from activated “Sell-Stop Pending Order”) hit TP, FORCE-Close all opened position (i.e Long position from Scenario-1) and Delete all Pending orders (i.e Buy-Stop Pending Order)

 

Scenario-2 Profit Calculation:

Trade from scenario-1 = -$20

Trade from scenario-2 = $30

Deleted pending order =$ 0

Total: = -$20 + $30 + $0 = $10

 

 

 

 

 

 

Scenario-3:

 

If SHORT position from scenario-2 does not hit TP and triggers a new long position from the pending order…>>>

EA Actions

Open NEW“Long position at Lot size 0.9” (multiplier x3 of previous lot size which was 0.3 lot ie. 3 x 0.3 = 0.9 lot)

Open another “Sell-Stop Pending Order” simultaneously with Lot size 1.8 (ie. 3 x 0.9 = 1.8 lot); (10 pips below) and set TP 10 pips SL = 30 pips >>

If New LONG position (i.e from activated “Buy-Stop Pending Order” Lot size 0.9) hit TP, FORCE-Close all opened position (i.e Long position from Scenario-1 >> SHORT Position from Scenerio-2) and Delete all Pending orders (i.e NEW Sell-Stop Pending Order)

 

Scenario-3 Profit Calculation:

Trade from scenario-1 = $10

Trade from scenario-2 = -$60

Trade from scenario-3 = $90

Deleted pending order =$ 0

Total: = -$10 - $60 + $90 + $0 = $40

 

 

 

Scenario-4

 

If LONG position from activated “Buy-Stop Pending Order” does not hit TP and price triggers “Sell-Stop Pending Order” at Lot size 2.7 (multiplier = x3; ie 3 x 0.9 = 2.7),

Open another “Buy-Stop Pending Order” simultaneously with Lot size 3 x of 2.7 = 8.1 (10 pips below) and set TP 10 pips No SL >>

If New SHORT position (i.e from activated “Sell-Stop Pending Order”) hit TP, FORCE-Close all opened position (i.e Long position from Scenario-1 >> SHORT Position from Scenerio-2 >> LONG Position from Scenario-3) and Delete all Pending orders (i.e Buy-Stop Pending Order)

 

Scenario-4 Profit Calculation:

LONG Trade from scenario-1 = -$20

SHORT Trade from scenario-2 = $30

LONG Trade from scenario-3 = -$180

SHORT Trade from scenario-4 = $270

Deleted pending order =$ 0

Total: = -$20 + $30 - $140 + $270 + $0 = $140

 

Scenario-5

Keep repeating process, ie opening new positions and counter/hedging pending positions until EA activates BREAK-EVEN POSITION LOT SIZE

What is BREAK-EVEN POSITION LOT SIZE?

This is the last pending position that the EA will place with a LOT SIZE that seeks to achieve the most minimum loss (or break-even), in a case the equity balance on the account is not sufficient to keep opening more positions.

At what scenario will this BREAK-EVEN POSITION LOT SIZE be activated?

This will be determined by the user. A user may choose MAXIMUM OPENED POSITION = 3,

This implies that if Scenerio-1, Scenerio-2 does not reach TP, BREAK-EVEN POSITION LOT SIZE will be activated at Scenerio-3

 

Note:

Multiplier:           Number used to multiply previous lot-size to determine new lot size for new position to be opened

FORCE-Close:     Close all opened positions when any TP or SL of any of the opened position is reached by price.



Han respondido

1
Desarrollador 1
Evaluación
(33)
Proyectos
35
40%
Arbitraje
11
9% / 91%
Caducado
4
11%
Libre
Solicitudes similares
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
Profitable EA HFT 50 - 300 USD
From a long time i am searching for a profitable EA i have lost a lot , and now i have only 300$ to buy a profitable EA , i wish to say with 0 losses but some or most traders they don't want to hear this i am really tired of searching for a programmer to just create me a profitable EA with the least losses or zero losses maybe nearly 1 year i am searching i just need an HFT EA that can work very well on MT4,MT5
I need help fixing my EA for MT5. It’s a very simple EA, and I currently cannot solve an issue where webrequest communicates with OpenAi API without error. Please only apply if you can help solve this issue
у нас есть стратегия, нам нужно написать mql5-код ​​для тестера стратегий МТ5,Цена договорная. Мой контакт @abbosaliyev из Telegram Программист должен знать РУССКИЙ ИЛИ УЗБЕКСКИЙ язык. Задание: разработать тестер, который использует шаблон условий на открытие и проверит весь исторический график на всех доступных таймфреймах. Остальная информация будет предоставлена ​​после согласования цены
a coder is required to add an indicator to existing ea The new indicator will work as 1. option to combine with exiting indicator to open trade 2. it will be used as alternative BE point 3. It can also be used to close order or combine with other to close trade The second Job is telegram bot to get alert fr news trade and others Details when you apply i will test the ea work on live market and all bug is fixed before
Hello, I want to make an EA based on SMC and a developer that is familiar with the concept and full understanding of this. Must have done similar jobs before and be able show it. I only want to work with developer that has good track record and is precise. Further information will be handed when contact is made. Developers that has zero rating will not be considered. Listed price is a base point. The project can also

Información sobre el proyecto

Presupuesto
20 - 45 USD
Para el ejecutor
18 - 40.5 USD
Plazo límite de ejecución
de 2 a 4 día(s)