Grid | Hedge | Martingale with TrailingStop

MQL5 Experts Forex

Spécifications

Hi! Below is the explanation of the EA together with an example in image. I attached a TrailingStop and TrailingStep code as references that I have been using on another EA. The PDF file contains the same description, but with some expected inputs as example.


Explanation:

1) The EA strategy is summarized in opening up to 20 multiple positions according to each range of points reached in the opposite direction of the operation (Grid when activated by bool input), and closing with profits according to the values ​​of Trailing Stop / Trailing Step.


2) The lot of each position (1st to 20th) will be different and should be informed in the input (20 lots inputs)

 

3) The interval /range in points to open the next grid position must be informed in the input, and it will be different for each position (20 interval inputs)

 

4) The exit of a position with a profit will occur through the “TrailingStopProfit” with “TrailingStepProfit”, which will be activated with each new position of the grid as soon as the current price (long position example) is above the sum of the calculation:

a) "Average Price / Breakeven*" of the operation +

b) a value in pips informed in the input called "ProfitZone" +

c) the sum of the entry and exit commissions so far according to the lots (commission amount per 1 lot will be entered via input to be calculated by the EA).

 

5) Aiming to reduce the risk, I must inform from which position I want to exit with less profit (“StartSecureZoneAtPosition”). In the chosen position of this input and next positions of this grid the exit will be through value of “TrailingStopSecure” with “TrailingStepSecure”, which will be activated when the current price (long position example) is above the sum of the calculation:

a) "Average Price / Breakeven*" of the operation +

b) a value in pips informed in the input called "SecureZone" +

c) the sum of the entry and exit commissions so far according to the lots.

 

6) Date / Time Filter: It must be possible to specify the days of the week and time to make the entries, for example: Monday to Thursday from 2AM to 8PM (“EachDay” at those times – bool option) or Monday from 2AM to Thursday 8PM (“NonStopDay” bool option). To avoid having an open position on the weekend, if there is a trade in progress and the option (input bool) "ForceCloseAll" is "true", all paper trades must be closed at once at the specified time and day (Ex : ForceCloseAllDay = "Friday"; ForceCloseAllHour = 9)

 

7) Spread filter: maximum spread in pips (“MaxSpread”) acceptable to open the first position.

 

8) As for the entry of operations, that is, the 1st trade, it can be done in two ways:

 

a) By the Expert Advisor:

BUY: The closing of the previous candle is greater than the maximum of the last N candles (“Ncandles”).

SELL: The previous close is less than the minimum of the last N candles (“Ncandles”).

or

b) Manually:

With the EA active on the chart, I will add a pending order on the paper with the initial batch (One click trading or other method), and as soon as the order is executed the robot will follow up with the trailing for profit or grid for the next order ( 2nd) and others.

 

9) The robot can be used on assets/currencies with different decimal places (such as EURUSD “1.45120”, USDJPY “115.120” and assets without decimal places “265”).

 

10) If the operation reaches position 20, trades must be closed at the loss as soon as it reaches the next range specified in the input (Position 20 + “Range21Close”).

 

11) A “Complete Operation” means a trade that has been completed by Trailing (profit), or a trade that is closed with a loss after position 20. Only one “Complete Operation” must be allowed at a time. Example: The EA is on the Grid in the 5th position and a new buy / sell condition is reached by the indicator. This trade should not be executed, since there is already an “Operation” in progress.

 

12) The file provided must be open source (mq5) so that I can make changes in the future and add more positions in the grid if necessary.

 

13) When “true” (will open a maximum of 2 positions of the Grid): the position will maintain the profit rules (item #4), but will close after reach “Range3_or_StopLoss” points. That is, instead of opening the 3rd position, it will close all positions.

 

*Average Price/Breakeven: The average price of all current Grid operations where the balance of the operation is $ 0. For example:

1 Lot at $50

2 Lots at $100

5 Lots at R$150

Median Price is (1x$50 + 2x100 + 5x150) / (1+2+5) = $125 .

If possible, I would like to see the line of “Median Price” on chart. Please tell me if this won’t be possible.


Répondu

1
Développeur 1
Évaluation
(23)
Projets
45
20%
Arbitrage
25
28% / 48%
En retard
12
27%
Gratuit
2
Développeur 2
Évaluation
(4)
Projets
6
33%
Arbitrage
3
0% / 100%
En retard
0
Gratuit
3
Développeur 3
Évaluation
(8)
Projets
10
40%
Arbitrage
0
En retard
0
Gratuit
Commandes similaires
MT5 EA 45+ USD
Hi i want a developer , who can develop me Mt5 Ea based on High and lows how exactly it should work and what inputs i want to add message me for full detailed specification
Scalping EA MT5 30 - 70 USD
PHẦN 1: TIẾNG VIỆT (Cho các nhóm VN) Tiêu đề: Tìm Coder Pro: Tôi có khung Quản lý vốn/Risk chặt chẽ - Bạn lo chiến thuật "Vua Scalping" phân: Tôi cần đọc mã EA. Tôi có bộ quản lý vốn và rủi ro rất chi tiết. Chiến thuật theo lệnh (Strategy) tôi để bạn Tự QUYẾT (Yêu cầu: Chuẩn bị mở rộng quy mô đa khung, vào chắc chắn và nhiều lệnh). YÊU CẦU CỤ THỂ: 1. Phần Chiến thuật (Bạn lo): * Tự động chọn chỉ báo/phương pháp. *
I already have an EA and willing to work together with a talented professional programmer so that we can make a profitable EA for the long-term. RazorQuant AI | Buy Trading Robot (Expert Advisor) for MetaTrader 5 RAZORQUANT AI v3.7 (MT5 EA) Purpose: Automated trading EA that combines classic technical filters with machine-learning signals and optional external AI (LLM) advice to decide BUY/SELL/HOLD and manage
Pre pending order EA 30 - 40 USD
Hey developers I want to code for me good pre pending order EA with a good strain stop loss, break out logic, MT5, it can trade starting from 20&, pre pending breakout logic , trend filter trades Xauus , Eurusd trades real breakouts
Range Reversal EA 29/01/26 Rev 0 Overview This EA will bound a range of price action over a set time. At a specified time range a trade will be enabled if price action triggers a reversal at or near to the bound range, by a stated offset. Typically the EA will be permitted to only take one trade per day. The EA is not to operate on Weekends. The EA will be left running on a MT5 platform on a server. Testing I will
I am looking of an Expert Advisor (EA) that has undergone independent validation and demonstrates a capability to successfully navigate prop firm challenges, as well as efficiently manage funded accounts. It is imperative that you provide a comprehensive explanation of the strategy utilised by your EA, along with a demo version that has a 30-day expiration. This will facilitate extensive back testing and forward
I hope, dear developers, that you are doing well. Recently, I have been looking for an indicator dedicated to institutional trading (Smart Money Concept) , but I could not find a suitable one. And when such indicators do exist, they are usually provided only as executables, which makes them impossible to modify or customize. For this reason, I developed the entire concept myself, including: Real-time labeling of
step by step and structure this into a full IEEE 830 / ISO/IEC/IEEE 29148 style Requirements Specification. This format will include: Introduction System Overview Functional and Performance Requirements Traceability Matrix (linking requirements to test cases) Verification and Validation Compliance Standards 1. Introduction 1.1 Purpose The purpose of this document is to define the technical requirements for the
i need an expert to help join 3 model i have in ninjatrader into one, kindly message me and i will be expecting from you and i need this work done in maximum of 4 days, so i need expert that can get it done
Hi developers, I need someone to help me create a simple EA with my indicators and trading plan... I will give you all parameters and you help me create... 2 moving averages, one candle pattern

Informations sur le projet

Budget
30 - 45 USD
Délais
de 1 à 15 jour(s)