• Welcome back! Thank you for being a part of this Traders Community. Let's discuss and share :)
    Selamat datang kembali! Trimakasih telah menjadi bagian dari Komunitas Trader ini. Mari berdiskusi dan berbagi :)

Suggestion I’ll build the EA according to your strategy.

Hello Egners. Please find below my idea. Thank you in advance:-

EA Name: Hedged Grid Martingale (Buy + Sell)
Platform: MT4 | No indicators | Any timeframe | Any symbol | Magic Number required

Opening​

  • Opens 1 BUY + 1 SELL together at market
  • Uses starting lot (user input)

Grid (per side, independent)​

  • Every Grid Gap pips against a side → add another trade on that side
  • Lot sequence: 3 × 0.01 → 3 × 0.02 → 3 × 0.03 → 3 × 0.04 … forever (+0.01 every 3 trades)
  • No stop loss. No max trades. No max lots. Each side keeps adding until its exit target is hit
  • Start lot, lot step, trades-per-tier, grid gap = all user-adjustable

Take Profit (per side)​

  • TP measured from FIRST entry of that side (not average)
  • Buy TP and Sell TP = separate user inputs
  • On TP → close all trades on that side, stop opening that side
  • Other side keeps running

Break-Even (surviving side only)​

  • Triggered automatically when one side hits TP
  • Surviving side switches to break-even mode and keeps gridding if price moves against it
  • Closes when price hits the user-set Break-Even Price (exact price, per side, fully adjustable — $1 to $1000+)
  • On hit → close all trades on that side

Reset​

  • When both sides closed → immediately open new Buy + Sell, lot sequence resets

Filters​

  • Spread filter — don't open new trades if spread > user-set max
  • Slippage — user input

Dashboard (on chart)​

  • Open trades per side
  • Lots per side
  • Floating P/L per side + total
  • Max Drawdown accrued whilst running (persists across session)
  • Current mode per side (Gridding / Break-Even / Closed)
  • TP price + Break-Even price per side
  • Toggle on/off + corner position

Inputs​

InputNotes
Magic Numberrequired
Starting Lote.g. 0.01
Lot Stepe.g. 0.01
Trades Per Tiere.g. 3
Grid Gappips, e.g. 20
Buy TPpips from first buy
Sell TPpips from first sell
Buy Break-Even Priceexact price
Sell Break-Even Priceexact price
Max Spreadfilter
Slippage
Dashboard On/Off + Corner

Optional (please include in code, off by default)​

  • Equity stop / close-all at X% DD
  • Max total lots cap

Quote Reply
Report

The hopper​

Member​

Credit Hunter
Credits
133
Would it be possible to add these features to the above?

Restart Mode — NEW​

User-selectable option with two choices:
ModeBehaviour
Mode A — Wait (original)Winning side closes. EA waits for the surviving side to hit break-even. Only then does it restart the full Buy + Sell cycle
Mode B — Restart ImmediatelyThe moment a side hits TP, EA immediately opens a fresh trade on that closed side — without waiting for the other side to close. The surviving side carries on in break-even mode as normal
  • Mode B detail: If Buy hits TP → close Buy, then immediately open a new Buy at market. Sell continues running in break-even mode. So at any moment, both sides can be active at once (one fresh cycle + one surviving basket). Magic number tagging must keep them separate.
  • User input: "Restart Mode: Wait / Immediate"

Manual Buttons — NEW​

On-chart buttons (top corner, user-adjustable position):
  • [ CLOSE ALL BUYS ] — closes every open buy trade (EA's magic number only)
  • [ CLOSE ALL SELLS ] — closes every open sell trade (EA's magic number only)
Behaviour notes:
  • Buttons must not reset the cycle automatically — they just close the trades
  • Add a confirmation popup ("Close all buys? Yes / No") so you don't fat-finger it
  • After a manual close, the EA should follow the same restart logic as a normal close (respect Restart Mode setting)
  • Optionally add a [ CLOSE ALL ] button for both sides at once
 
Hello Egners. Please find below my idea. Thank you in advance:-

EA Name: Hedged Grid Martingale (Buy + Sell)
Platform: MT4 | No indicators | Any timeframe | Any symbol | Magic Number required

Opening​

  • Opens 1 BUY + 1 SELL together at market
  • Uses starting lot (user input)

Grid (per side, independent)​

  • Every Grid Gap pips against a side → add another trade on that side
  • Lot sequence: 3 × 0.01 → 3 × 0.02 → 3 × 0.03 → 3 × 0.04 … forever (+0.01 every 3 trades)
  • No stop loss. No max trades. No max lots. Each side keeps adding until its exit target is hit
  • Start lot, lot step, trades-per-tier, grid gap = all user-adjustable

Take Profit (per side)​

  • TP measured from FIRST entry of that side (not average)
  • Buy TP and Sell TP = separate user inputs
  • On TP → close all trades on that side, stop opening that side
  • Other side keeps running

Break-Even (surviving side only)​

  • Triggered automatically when one side hits TP
  • Surviving side switches to break-even mode and keeps gridding if price moves against it
  • Closes when price hits the user-set Break-Even Price (exact price, per side, fully adjustable — $1 to $1000+)
  • On hit → close all trades on that side

Reset​

  • When both sides closed → immediately open new Buy + Sell, lot sequence resets

Filters​

  • Spread filter — don't open new trades if spread > user-set max
  • Slippage — user input

Dashboard (on chart)​

  • Open trades per side
  • Lots per side
  • Floating P/L per side + total
  • Max Drawdown accrued whilst running (persists across session)
  • Current mode per side (Gridding / Break-Even / Closed)
  • TP price + Break-Even price per side
  • Toggle on/off + corner position

Inputs​

InputNotes
Magic Numberrequired
Starting Lote.g. 0.01
Lot Stepe.g. 0.01
Trades Per Tiere.g. 3
Grid Gappips, e.g. 20
Buy TPpips from first buy
Sell TPpips from first sell
Buy Break-Even Priceexact price
Sell Break-Even Priceexact price
Max Spreadfilter
Slippage
Dashboard On/Off + Corner

Optional (please include in code, off by default)​

  • Equity stop / close-all at X% DD
  • Max total lots cap

Quote Reply
Report

The hopper​

Member​

Credit Hunter
Credits
133
Would it be possible to add these features to the above?

Restart Mode — NEW​

User-selectable option with two choices:
ModeBehaviour
Mode A — Wait (original)Winning side closes. EA waits for the surviving side to hit break-even. Only then does it restart the full Buy + Sell cycle
Mode B — Restart ImmediatelyThe moment a side hits TP, EA immediately opens a fresh trade on that closed side — without waiting for the other side to close. The surviving side carries on in break-even mode as normal
  • Mode B detail: If Buy hits TP → close Buy, then immediately open a new Buy at market. Sell continues running in break-even mode. So at any moment, both sides can be active at once (one fresh cycle + one surviving basket). Magic number tagging must keep them separate.
  • User input: "Restart Mode: Wait / Immediate"

Manual Buttons — NEW​

On-chart buttons (top corner, user-adjustable position):
  • [ CLOSE ALL BUYS ] — closes every open buy trade (EA's magic number only)
  • [ CLOSE ALL SELLS ] — closes every open sell trade (EA's magic number only)
Behaviour notes:
  • Buttons must not reset the cycle automatically — they just close the trades
  • Add a confirmation popup ("Close all buys? Yes / No") so you don't fat-finger it
  • After a manual close, the EA should follow the same restart logic as a normal close (respect Restart Mode setting)
  • Optionally add a [ CLOSE ALL ] button for both sides at once
Hello, here is what you requested; discussions and further debate regarding trading with this advisor in this thread are prohibited.
 

Attachments

Many thanks, Egners. Could I trouble you for one more thing, please?

This time I need an expert advisor that can simply enable auto trading at a time I specify. MT4 again, please.
 
EA Spec: Timed AutoTrading Enabler

Purpose:
A minimal EA whose only function is to switch AutoTrading ON at a user-defined time. It does nothing else — no trading, no order management, no other logic.

Usage flow:

  1. AutoTrading is OFF in the terminal.
  2. The user attaches the EA to a chart.
  3. The EA sits idle and waits.
  4. At the chosen time, the EA enables AutoTrading.
Inputs:

  • EnableTime — the date/time at which AutoTrading should be turned on (server time or local time — please confirm which you'll use).
Behaviour:

  • On attach: do nothing except wait. AutoTrading is off, so the EA must still be able to run and monitor the time in this state.
  • Continuously check current time against EnableTime.
  • Once current time ≥ EnableTime: switch AutoTrading ON, then stop (no further action).
Notes:

  • This is the EA's sole purpose — keep it as simple as possible.
  • Please advise on how you'll enable AutoTrading programmatically (e.g. via TerminalInfoInteger(TERMINAL_TRADE_ALLOWED) / the terminal's AutoTrading button), since this may depend on terminal settings and permissions.
 
EA Spec: Timed AutoTrading Enabler

Purpose:
A minimal EA whose only function is to switch AutoTrading ON at a user-defined time. It does nothing else — no trading, no order management, no other logic.

Usage flow:

  1. AutoTrading is OFF in the terminal.
  2. The user attaches the EA to a chart.
  3. The EA sits idle and waits.
  4. At the chosen time, the EA enables AutoTrading.
Inputs:

  • EnableTime — the date/time at which AutoTrading should be turned on (server time or local time — please confirm which you'll use).
Behaviour:

  • On attach: do nothing except wait. AutoTrading is off, so the EA must still be able to run and monitor the time in this state.
  • Continuously check current time against EnableTime.
  • Once current time ≥ EnableTime: switch AutoTrading ON, then stop (no further action).
Notes:

  • This is the EA's sole purpose — keep it as simple as possible.
  • Please advise on how you'll enable AutoTrading programmatically (e.g. via TerminalInfoInteger(TERMINAL_TRADE_ALLOWED) / the terminal's AutoTrading button), since this may depend on terminal settings and permissions.
I hope this is what you wanted.
 

Attachments

Back
Top