Direction Control EA - Allow Buy Only/ Sell Only

MQL4 专家

工作已完成

执行时间6 天
客户反馈
really good developer
员工反馈
Great customer. Perfect description of requirements specifications. I look forward to working with you again

指定

MT4 Direction Control EA — Developer Specification

1. Purpose

Create an MT4 Expert Advisor that allows the trader to control the permitted trade direction on the chart using three on-chart buttons:

  1. BUY ONLY
  2. SELL ONLY
  3. ALLOW ALL

The EA does not generate trades itself. Its primary function is to control and enforce the allowed trade direction.


2. Chart / Symbol Behaviour

When the EA is attached to a chart:

  • It applies to the currency pair/symbol of that chart.
  • Example:

    • EA attached to EURUSD → controls EURUSD.
    • EA attached to GBPUSD → controls GBPUSD.
  • The trader can change the permitted direction by clicking the buttons.


3. Buttons

Display three buttons on the chart:

BUY ONLY

When selected:

  • BUY trades are permitted.
  • SELL trades are NOT permitted.
  • Any existing SELL trade for that symbol should be closed immediately.
  • If a new SELL trade is opened manually or by another EA, the Direction Control EA must detect it and close it immediately.

SELL ONLY

When selected:

  • SELL trades are permitted.
  • BUY trades are NOT permitted.
  • Any existing BUY trade for that symbol should be closed immediately.
  • If a new BUY trade is opened manually or by another EA, the Direction Control EA must detect it and close it immediately.

ALLOW ALL

When selected:

  • Both BUY and SELL trades are permitted.
  • The EA does not close either direction.


4. Immediate Opposite-Trade Protection

The EA must continuously monitor open trades for the chart symbol.

If the current mode is:

BUY ONLY
→ Any SELL position detected must be closed immediately.

SELL ONLY
→ Any BUY position detected must be closed immediately.

The monitoring must be as fast as practically possible within MT4 limitations.

The EA should check on:

  • Every incoming tick
  • Trade/order-state changes where possible
  • EA initialisation
  • Button mode changes

The developer should optimise the code to minimise the delay between detecting an unauthorised trade and sending the close request.


5. Existing Trades When Button Is Changed

If the trader changes from:

ALLOW ALL → BUY ONLY

→ Immediately close all existing SELL trades for that symbol.

If changing:

ALLOW ALL → SELL ONLY

→ Immediately close all existing BUY trades for that symbol.

If changing:

BUY ONLY → SELL ONLY

→ Immediately close all BUY trades.

If changing:

SELL ONLY → BUY ONLY

→ Immediately close all SELL trades.


6. New Trade Protection

The EA must also protect against trades opened after the direction has been selected.

Example:

BUY ONLY is selected.

Another EA opens a SELL trade on EURUSD.

The Direction Control EA detects the SELL trade and immediately attempts to close it.

This must work for:

  • Manually opened trades
  • Trades opened by another EA
  • Market orders


7. Symbol Scope

Default behaviour:

Only control trades belonging to the chart symbol.

Example:

EA attached to EURUSD:

  • Controls EURUSD trades.
  • Does NOT control GBPUSD trades.
  • Does NOT control XAUUSD trades.


8. Magic Number Behaviour

The EA should have an input option:

Control Manual Trades = true/false

Control Other EA Trades = true/false

Recommended default:

  • Manual trades: TRUE
  • Other EA trades: TRUE

The developer should provide filtering options if required by the MT4 implementation.


9. Initial Mode

Input parameter:

InitialMode

Options:

  • BUY_ONLY
  • SELL_ONLY
  • ALLOW_ALL

Recommended default:

ALLOW_ALL

The EA should remember the currently selected mode while it remains attached to the chart.


10. Button Appearance

The currently active mode should be visually obvious.

Example:

BUY ONLY → highlighted/active

SELL ONLY → highlighted/active

ALLOW ALL → highlighted/active

The inactive buttons should remain visible but clearly indicate they are not selected.

Button position should be configurable.


11. EA Inputs

Suggested developer inputs:

  • InitialMode
  • ControlManualTrades
  • ControlOtherEAs
  • ControlCurrentSymbolOnly = true
  • CheckOnEveryTick = true
  • CloseRetryAttempts
  • RetryDelayMilliseconds
  • ButtonCorner
  • ButtonX
  • ButtonY
  • ButtonWidth
  • ButtonHeight
  • ButtonFontSize


12. Important Requirement

The EA must NOT open trades.

It only:

  1. Allows the selected direction.
  2. Blocks/cleans up the opposite direction.
  3. Continuously monitors the symbol.
  4. Immediately closes unauthorised opposite trades.

The EA should be lightweight and designed for extremely fast execution.


反馈

1
开发者 1
等级
(291)
项目
363
30%
仲裁
37
27% / 65%
逾期
10
3%
繁忙
发布者: 10 代码
2
开发者 2
等级
(17)
项目
21
19%
仲裁
5
40% / 40%
逾期
0
空闲
3
开发者 3
等级
(213)
项目
286
47%
仲裁
27
59% / 37%
逾期
36
13%
空闲
4
开发者 4
等级
(438)
项目
649
53%
仲裁
35
63% / 20%
逾期
7
1%
工作中
5
开发者 5
等级
(13)
项目
20
40%
仲裁
1
0% / 100%
逾期
1
5%
空闲
6
开发者 6
等级
(402)
项目
520
24%
仲裁
61
57% / 25%
逾期
60
12%
已载入
7
开发者 7
等级
(195)
项目
242
34%
仲裁
11
45% / 45%
逾期
8
3%
空闲
发布者: 1 文章, 8 代码
8
开发者 8
等级
(62)
项目
90
29%
仲裁
24
13% / 58%
逾期
7
8%
工作中
9
开发者 9
等级
项目
1
0%
仲裁
0
逾期
0
空闲
10
开发者 10
等级
项目
0
0%
仲裁
0
逾期
0
空闲
发布者: 2 代码
11
开发者 11
等级
(19)
项目
22
18%
仲裁
9
33% / 44%
逾期
3
14%
工作中
发布者: 1 代码
12
开发者 12
等级
(185)
项目
199
47%
仲裁
4
50% / 25%
逾期
1
1%
工作中
13
开发者 13
等级
(45)
项目
53
57%
仲裁
2
100% / 0%
逾期
1
2%
空闲
发布者: 5 代码
14
开发者 14
等级
(111)
项目
184
25%
仲裁
25
16% / 76%
逾期
16
9%
空闲
15
开发者 15
等级
(25)
项目
31
13%
仲裁
14
0% / 79%
逾期
9
29%
空闲
16
开发者 16
等级
(87)
项目
121
68%
仲裁
5
80% / 0%
逾期
12
10%
工作中
17
开发者 17
等级
(6)
项目
8
38%
仲裁
2
50% / 50%
逾期
2
25%
空闲
相似订单
I have three indicators that operate independently. I want to combine them into one indicator with custom expert programming that automatically enters trades when a signal is generated by one of the indicators. I will pay for this service Thanks you
Existing EA: NEW_CORE_ORB_M5_v021 | MT5 | XAUUSD M5 Early-stage research prototype, not a new EA from scratch. Need an experienced MQL5 developer to audit, complete, repair, improve and test BOTH independent strategies equally: Opening Range Breakout (ORB) and Scalp. Keep code lightweight and preserve an untouched baseline. No unnecessary rewrite or complex filters. 1. ORB Strategy Verify opening-range construction
أود تحسين استراتيجية المستشار الخبير الهجين، مع التركيز على جودة الدخول والأداء الصافي بعد تكاليف التداول. يرجى الإشارة إلى ما يلي: تدقيق النظام الحالي: تحديد أخطاء الترميز، والظروف المتضاربة بين الوحدات، وأسباب الإدخالات الفائتة أو المتأخرة. حدد قواعد واضحة للشراء والبيع: استخدم هيكل السوق، الاتجاه، الزخم، ومستويات الدعم/المقاومة. تجنب الشراء بعد ارتفاع مطول أو البيع بعد انخفاض مطول. راجع الفرص الضائعة: قارن بين
I need a robot that will grow small accounts to bigger amounts like this one in this link, https://youtu.be/d38pMbJihew?si=3NeIOVyrlwDr4X_o. Please click the link and watch how this EA grow small accounts. Then create a robot like that. I will test it on demo first then if it does what i want, i will take it. Please it must be simply to use. It must set targets, for example, once it reaches $500 profit, it must
Looking for a Pre-Built Gold Trading Bot (MQL5 / MT5) I am looking for an existing, ready-made Gold (XAUUSD) trading bot for MT5 with Stop Loss (SL) and Take Profit (TP). If you have a pre-built EA, please share: Trading strategy and entry/exit logic. SL, TP, and risk management features. Backtesting results and verified trading history, if available. Price and source code availability. Existing bots are welcome
I am looking for an experienced MQL5 Expert Advisor (EA) developer to analyze an existing trading setup and develop a similar automated trading robot. Project Overview I have access to a demo trading account where trades are being executed automatically. The trading results look very promising, but I do not know exactly what strategy, logic, indicators, or trade-management rules are being used. I will provide access
Espert 30+ USD
I want to create a robot with 10 indicators.All to take a trade and all in stop folowing. Thanks to put in THE PARAMETERS Yes/No for the indicators to entry in position AND to the stop A trade with 2 takes profit and a breakeaven at the first TP. The goal is to be able to try the multiple combinations with these indicators
Staddle 30+ USD
10 * 0.01, 10 * 0.03, 10 * 0.05. Place a limit order one dollar above the market price, a sell-side limit order below the market price, and a trailing stop loss. The goal is to safely book profits incrementally as the market moves." ulti-tiered lot sizing (0.01, 0.03, 0.05 scaled across 10 levels). Place a buy/sell limit order at a $1 offset from the current market price along with a trailing stop loss to secure and
Hello International Developer, I need LIFETIME MT5 EA for XAUUSD Gold. REQUIREMENTS: 1. Lifetime bot - No expiry date, unlimited accounts, unlimited installations 2. Must include source code .mq5 file - This makes it lifetime 3. Every trade MUST have Stop Loss 300 points and Take Profit 600 points 4. No martingale, No grid, No averaging - Clean safe strategy 5. Auto lot size = 1% risk per trade for good margin growth
Expert advisor 150+ USD
Hiring: Forex Strategist & MQL5 Developer for Long-Term EA Development I am looking for an experienced Forex Strategist and MT5 (MQL5) Developer to work with me on an ongoing project to develop, test, improve, and optimize a profitable Forex Expert Advisor (EA). My Message to the Developer My budget is $150 . However, this is not intended to be a one-time payment for a finished product. I want an ongoing working

项目信息

预算
30+ USD
截止日期
从 1 到 2 天