Create Limit and Stop orders at Multiple of the Order Distance

MQL4 Experts

Specification

EA funciton

Create Limit and Stop orders at Multiple of the Order Distance to form a Grid. & Maintain the Grid All the time


Example

Order distance pips = 2,500 = $25, Use Buy Limit=True,  TP_[Buy_Limit] =5000, Current Price=995,  Max_Orders_[Buy_Limit]=5, Order_Gap_Pips=500=$5

Then,


1) At the beginning of the EA, Create buy Limit orders -> 975,950,900,925,900 --> Each one should have the Take Profit of 5000 since  TP_[Buy_Limit] =5000

2) When to place new limit order? When the price moves up and touches the grid+order gap [Example, if price moves upto 1005 (ie. 1000+ Order_Gap of $5 = 1005 , then place buy limit order of 1000]

3) Don't create duplicate pending order, if there is a Market order Exists (Eg. Suppose price comes down and converts the 975 pending order into buy order, and then moves up   Order_Gap_Pips of 500=$5, then, the EA will not create a pending order at 975, because a Buy order exists at 975)

4) Maintain the Grid all the time by Filling the Grid Gap - Suppose, a Buy order gets closed by Take Profit, the EA should place a pending order in it's place (eg. suppose order 975 hit by take profit at 1020, then the EA shd place a pending order to fill the gap of the grid at 975)



INPUTS Sample Values
Stopout_Margin_Level 300% Must close all the open limit orders if margin level reaches X% & Should not create any new Limit order (Stop the EA and not create any Limit Orders)
Restart_Margin_Level 500% Restart the process of creating Limit orders once the margin level is greater than Y%
Use Buy_Limit True/False
Use Sell_Limit True/False
Use Buy_Stop True/False
Use Sell_Stop True/False
Order_Gap_Pips 500 Once this pips is hit, the pending order will be placed.
Eg. Order_Gap_pips=500, then if price touches 1005, pending order of 1000 will be placed
Lot_Size_[Buy_Limit] 0.01
Lot_Size_[Sell_Limit] 0.01
Lot_Size_[Buy_Stop] 0.01
Lot_Size_[Sell_Stop] 0.01
Order_Distance_[Buy_Limit] 2500
Order_Distance_[Sell_Limit] 2500
Order_Distance_[Buy_Stop] 2500
Order_Distance_[Sell_Stop] 2500
Max_Orders_[Buy_Limit] 25
Max_Orders_[Sell_Limit] 25
Max_Orders_[Buy_Stop] 25
Max_Orders_[Sell_Stop] 25
Lot_Size_Multiplier_[Buy_Limit] 1.06
Lot_Size_Multiplier_[Sell_Limit] 1.06
Lot_Size_Multiplier_[Buy_Stop] 1.06
Lot_Size_Multiplier_[Sell_Stop] 1.06
TP_[Buy_Limit] 5000
SL_[Buy_Limit] 5000
TP_[Sell_Limit] 5000
SL_[Sell_Limit] 5000
TP_[Buy_Stop] 5000
SL_[Buy_Stop] 5000
TP_[Sell_Stop] 5000
SL_[Sell_stop] 5000
TP_Order_Distance_Multiple_[Buy_Limit] 2 If TP Buy Limit is set, it will be taken, else this multiple will be taken as TP Buy Limit
SL_Order_Distance_Multiple_[Buy_Limit] 3 If If SL Buy Limit is set, it will be taken, else this multiple will be taken as SL Buy Limit
TP_Order_Distance_Multiple_[Sell_Limit] 3 If If TP Sell Limit is set, it will be taken, else this multiple will be taken as TP Sell Limit
SL_Order_Distance_Multiple_[Sell_Limit] 5 If If SL Sell Limit is set, it will be taken, else this multiple will be taken as SL Sell Limit
TP_Order_Distance_Multiple_[Buy_Stop] 1 If If TP Buy Stop is set, it will be taken, else this multiple will be taken as TP Buy Stop
SL_Order_Distance_Multiple_[Buy_Stop] 2 If If SL Buy Stop is set, it will be taken, else this multiple will be taken as SL Buy Stop
TP_Order_Distance_Multiple_[Sell_Stop] 3 If If TP Sell Stop is set, it will be taken, else this multiple will be taken as TP Sell Stop
SL_Order_Distance_Multiple_[Sell_stop] 1 If If SL Sell stop is set, it will be taken, else this multiple will be taken as SL Sell stop



Responded

1
Developer 1
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
2
Developer 2
Rating
(24)
Projects
28
32%
Arbitration
1
0% / 0%
Overdue
0
Free
Published: 1 code
3
Developer 3
Rating
(54)
Projects
102
23%
Arbitration
12
25% / 17%
Overdue
13
13%
Free
4
Developer 4
Rating
(195)
Projects
395
28%
Arbitration
155
20% / 52%
Overdue
112
28%
Free
5
Developer 5
Rating
(311)
Projects
558
35%
Arbitration
79
32% / 43%
Overdue
203
36%
Working
6
Developer 6
Rating
Projects
2
0%
Arbitration
2
100% / 0%
Overdue
0
Free
7
Developer 7
Rating
(69)
Projects
146
34%
Arbitration
13
8% / 62%
Overdue
26
18%
Free
Published: 6 codes
Similar orders
Description: I need an MQL5 Expert Advisor for Gold (XAUUSD). I am a developer myself — I will read your code and I will know if it is a template. Do not apply if your proposal includes: Generic descriptions ("it will have TP, SL, trailing stop") — I already know that AI-generated code Copy-paste from existing free EAs Apply only if you can answer these before we start: What is the entry logic? Describe the exact
Hi, Im looking to purchase or build an EA that can open many trades or big lot size to churn out IB commission, it doesnt have to be super profitable but will need to have the number of trades on going in order to earn IB commission. If you have any EA or strategy that are gearing towards this, let me know and i would be glad to purchase it
looking for a highly experienced mql5 developer to build a professional trading ea based on multi timeframe top down analysis and market structure concepts the system should combine higher timeframe context with lower timeframe execution and provide both precise logic and clean visual representation on chart ⸻ core requirements • implementation of multi timeframe logic higher timeframe bias combined with lower
I need an Expert Advisor (EA) for XAUUSD using a Grid + Martingale + Hedging strategy. Main features: • Open Buy & Sell at start (hedging) • Grid system with adjustable step (price-based levels) • Lot multiplier (martingale-style) • Fixed TP per trade + basket TP (close all in profit) • Continuous re-entry after TP • Risk management (max trades, max lot, equity stop) Additional requirements: • EA must include access
1. Trade Execution Timing The EA must execute trades exactly at 7:00 PM IST (Indian Standard Time) every trading day. Time conversion must be handled internally if the broker server time differs from IST. Execution should trigger only once per day (no duplicate trades). 2. Trade Type At 7:00 PM IST, the EA must: Open 1 Buy/Sell (Long/Short) position (configurable) 3. Order Execution Method Orders must be placed
I need for an EA for XAUUSD using a grid + Martingle + hedging strategy developer Main features: • Open Buy & Sell at start (hedging) • Grid system with adjustable step (price-based levels) • Lot multiplier (martingale-style) • Fixed TP per trade + basket TP (close all in profit) • Continuous re-entry after TP • Risk management (max trades, max lot, equity stop) EA should be stable, error-free, and work with
Mkiheme elite Bots 50 - 150 USD
I need a fully automated strategies trading futures, that works with pine scripts on tradingview.com . I need a fully automated trading robot designed to generate consistent profits while strictly controlling risk and minimizing losses. The robot should use a combination of strategies, including trend-following, scalping, and price action, and must be able to adapt to different market conditions such as trending and
​Entry Rules: > * Open BUY when a Bullish Fair Value Gap (FVG) forms. ​Open SELL when a Bearish Fair Value Gap (FVG) forms. ​Risk Management: ​Every trade must have a Stop Loss and Take Profit. ​I want to be able to change these numbers in the settings. ​Mobile Features: ​The bot must send a "Push Notification" to my phone app for every trade. ​Assets: ​Must work on WTI Oil and Bitcoin
I am looking for a reliable and well-developed Expert Advisor (EA) that demonstrates low drawdown and consistent profitability on a real trading account . If you have already built such an EA, I would be interested in evaluating it. I would require: Verified backtest results Forward testing performance (demo or real account preferred) Ideally, a live track record (Myfxbook / FXBlue or similar) I am serious about
🏆 HIRING: Quantitative Gold (XAU/USD) Trading Strategy Developer ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📌 PROJECT OVERVIEW ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ I am building a professional trading signal platform (xtraderlab.com) and need an experienced quant trader or algo developer to design, code, and backtest a high-performance intraday Gold (XAU/USD) trading strategy. The strategy will be integrated into an existing

Project information

Budget
30 - 50 USD
Deadline
to 2 day(s)