Documentation
Order & Position Management
What reaches your broker, how stops and targets are managed, pending-order lifecycle, and what each execution failure means.
This page covers what happens between a decision and a closed trade. Every behaviour described here applies only to positions GoldMineBot itself opened — your manual trades and other EAs are never adopted or managed.
What GoldMineBot owns
- ROBOT positions are the AUTO and Assisted orders GoldMineBot placed. These follow the managed lifecycle.
- Manual MT5 positions and foreign-EA positions are excluded from management by design.
- Ownership is claimed before submission, so an uncertain broker result is reconciled rather than repeated.
- Risk limits are still account-wide — your manual trades consume real margin even though GoldMineBot does not manage them.
Entry orders
AUTO entries are submitted as market orders at the current executable price, bounded by your entry-deviation tolerance. Smarter entry order types are planned — see the roadmap.
| Order type | Status |
|---|---|
| Market order (AUTO and Assisted entry) | Available — the current entry path |
| Pending order lifecycle management | Available — GoldMineBot-placed pending orders are tracked, cancelled and expired |
| Limit entry at a retest level | Planned — see the roadmap |
| Stop entry at a confirmation level | Planned — see the roadmap |
| Stop-limit entry | Planned — see the roadmap |
Stop loss
- Every planned trade carries a structural stop, and the geometry is shown before anything is placed.
- Position size is derived from your risk percentage and the distance to that stop — a wider stop produces a smaller position, not a bigger loss.
- Protective modification is one-directional. A stop change that would widen risk or remove protection is refused by the modify gate.
- A stop is an instruction to your broker. Gaps and slippage mean the filled price can be worse than the level you set.
Take profit — single target today
Each position is managed to a single take-profit target. A setup must also clear the minimum risk/reward at that target before any execution path continues.
Break-even and trailing
- Break-even moves the stop to a protected level once the position has earned enough room, using a cost-aware buffer. The position reports BREAK_EVEN.
- Trailing then tightens the stop progressively as the position advances, reported as TRAILING.
- Adaptive target protection can adjust the take profit when conditions justify it, reported as TP_ADAPTED rather than applied silently.
- All three run automatically for ROBOT positions and all three only ever move protection toward safety.
Partial closes
Partial profit booking arrives with staged targets, so it is planned work rather than current behaviour. Today GoldMineBot manages one position to one target. You can always close or reduce a position yourself in the terminal — GoldMineBot will reconcile the resulting state.
Pending-order lifecycle and expiry
- Pending orders GoldMineBot placed are tracked for as long as the thesis behind them is valid.
- When that thesis is no longer valid, the order is cancelled rather than left on the book.
- Where your broker supports a specified expiry, one is set; where it does not, validity is managed by GoldMineBot instead.
- A pending entry is not placed at all when the staleness bound is unavailable, when the planned entry sits inside the broker stop or freeze distance, or when price has already traded beyond the stop.
Position monitoring and lifecycle states
| State | Meaning |
|---|---|
| HOLD | The position is being monitored and no protective action is due |
| PROTECT | Protection is being managed — break-even or trailing is active |
| SCALE | A scaling state the product reports. GoldMineBot never scales into a loss and never doubles risk for recovery |
| EXIT | An exit path has been determined for the position |
| COMPLETE | The position is closed and recorded in History |
When execution fails
| Result | What it means | What to do |
|---|---|---|
| EXECUTION_REJECTED | The broker refused the request — commonly stop distance, volume step, or symbol trade mode | Check the symbol contract specification; review spread and lot settings |
| EXECUTION_FAILED | The request could not be completed | Check the terminal journal and connection state, then review the GoldMineBot Journal entry |
| EXECUTION_TIMEOUT | No broker answer arrived in time | Do not resubmit manually — the claim is retained for reconciliation |
| EXECUTION_PARTIAL | Only part of the requested volume filled | The filled part is managed as a ROBOT position; review it on the Trade tab |
| EXECUTION_UNKNOWN | The broker result could not be determined | The duplicate claim is deliberately kept so the state is reconciled rather than repeated |
| EXECUTION_CANCELLED | The path stopped before submission, usually at the final recheck | Expected behaviour when conditions moved; the reason is recorded |
Restart, reconnect and recovery
- Position state is rebuilt after a terminal restart or reconnect, and uncertain claims are reconciled.
- AUTO and REAL session authorizations deliberately return to OFF. Re-arm only after you have reviewed conditions.
- Management requires the terminal to be running and connected — it cannot act during downtime.
- Run one GoldMineBot instance per chart symbol. Risk coordination remains account-wide across instances.
Risk notice:Trading involves substantial risk of loss and no outcome is guaranteed. Full risk disclosure.
