Expand API-derived TP distances
This commit is contained in:
@@ -25,10 +25,15 @@ The two EAs coordinate through matching `_Symbol` and `input_entry_magic_number`
|
||||
- `input_cancel_retry_cooldown_seconds = 60`: Ticket-level retry cooldown after pending cancellation failures.
|
||||
- `use_m15_entry_filter = true`: Enables M15 closed-bar confirmation.
|
||||
- `input_entry_max_candidate_age_minutes = 120`: Maximum age for using an H1 candidate for new execution.
|
||||
- `input_tp_multiplier = 1.25`: Expands the API TP distance from the entry price. Values below `1.0` are clamped to `1.0`, and values above `100.0` are clamped to `100.0`.
|
||||
- `input_min_tp_points = 0`: Minimum final TP distance in points. `0` disables the floor.
|
||||
- `input_max_tp_points = 0`: Maximum expanded TP distance in points. `0` disables the cap. The EA never makes the final TP closer than the API-provided TP distance.
|
||||
|
||||
## 4. Entry And Exit Conditions
|
||||
|
||||
- New pending orders are sent only after spread, H4 state, H1 candidate, M15 timing, price consistency, broker distance, volume, and same-symbol/same-magic limit checks pass.
|
||||
- Before order submission, TP is recalculated from the distance between entry and the API TP, multiplied by `input_tp_multiplier`. Buy strategies place the final TP above entry, and Sell strategies place it below entry.
|
||||
- Split entries recalculate the final TP separately for each slot, using that slot's entry price.
|
||||
- Pending orders receive `input_entry_magic_number`.
|
||||
- The entry EA cancels expired pending orders, pending orders that conflict with the refreshed H4 state, and stale split-entry pending orders.
|
||||
- Filled-position SL updates, trailing, and time-based exits are not performed by this EA.
|
||||
@@ -37,6 +42,7 @@ The two EAs coordinate through matching `_Symbol` and `input_entry_magic_number`
|
||||
|
||||
- The order limit counts only pending orders and positions matching `_Symbol` and `input_entry_magic_number`.
|
||||
- Python process markers, process IDs, done files, and timeouts are monitored to prevent duplicate launches and stale-result reuse.
|
||||
- If the API TP direction contradicts the Buy/Sell price rules, the EA does not repair it; the existing price-consistency checks skip the order.
|
||||
- `OrderSend` return values and `MqlTradeResult.retcode` are checked and logged.
|
||||
- Because the design assumes hedging accounts, per-ticket position management is handled by `HITPositionManagerEA.mq5`.
|
||||
|
||||
@@ -48,4 +54,5 @@ The two EAs coordinate through matching `_Symbol` and `input_entry_magic_number`
|
||||
|
||||
## 7. Changelog
|
||||
|
||||
- 2026-06-13: Added `input_tp_multiplier`, `input_min_tp_points`, and `input_max_tp_points` to expand API-derived TP distances for both standard orders and per-slot split entries.
|
||||
- 2026-06-07: Split entry responsibilities from `HIT-EA_refactor_ver6.mq5`; moved SLTP panel and filled-position management responsibilities to `HITPositionManagerEA.mq5`.
|
||||
|
||||
Reference in New Issue
Block a user