Tool version: O!kurra Capital Defense EA 2.00
12.1 What BEa is
Break Even Auto (BEa) is a mechanism that manages the entire basket of one direction’s positions as a whole — an original MMD solution. It works in parallel with the individual single-position mechanisms (SL, TP, per-button Break Even, Trailing Stop from chapter 9), but on a different layer: those look at one position, BEa looks at the entire grid of a given direction.
Do not confuse it with per-button Break Even (chapter 9.11). That one moves a single position’s SL to a profit threshold. BEa computes the weighted break-even of the entire basket and closes it as a whole. Completely different mechanisms despite the similar name.
BEa works in two roles:
- Basket guardian — when price reaches the basket’s weighted break-even plus a profit margin, BEa simultaneously closes all positions of the BEa basket of that direction. Who belongs to the basket is decided by the per-button flag Include in BEa basket (
BEa_Protect, section 12.9): positions of buttons with that flag are averaged and closed; buttons without it live on their own BE/TS even while BEa is armed (two “take the whole side” exceptions: manual arming with the option Manual arm: take ALL side positions — enabled by default — and time arming with the option Time arm: take ALL side positions — disabled by default; section 12.10). - Strategic signal — the BEa state (armed / not armed) is a “global” piece of information that buttons can react to, activating or deactivating automatically (Follow BEa — section 12.9).
BEa can be armed manually (a click on the panel) or automatically by one of the six Auto-Arm Triggers (section 12.7). Once armed, it behaves the same regardless of the source.
Tool positioning. BEa supports observing how a basket can be managed as a whole — based on the weighted break-even and market signals. Whether and how you use it is part of your experiment on a demo account.
12.2 Weighted break-even — the concept
Weighted break-even is the price at which the combined PnL of a basket of one direction’s positions would be zero — taking each position’s size (lot) into account.
A single position has a break-even = its open price. A basket has a weighted break-even, because each position has a different lot, a different open price, a different influence on the whole’s PnL:
Example. Three BUY positions: lot 0.01 @ 2400, lot 0.02 @ 2390, lot 0.01 @ 2380. Weighted break-even = (0.01×2400 + 0.02×2390 + 0.01×2380) / 0.04 = 2390.00. When price reaches 2390, the basket’s combined PnL = 0 (ignoring spread/commissions). Larger positions “pull” the break-even closer to their own open price.
BEa closes the basket when price reaches: weighted break-even + Auto BE Gain.
Auto BE Gain (points, 30 by default) is a profit margin above break-even — so the basket closes with a small plus (covering the spread), not exactly at zero. On XAUUSD 30 points = 0.30 USD of movement; calibration to the instrument is yours.
Swap and commission are included in the break-even. The BEa level is not computed from open prices alone: the EA corrects it for the basket’s accrued swap, and if you enter a commission cost in the global settings (the “Commission / 1.0 Lot RT (0=off)” cell, chapter 5) — also for the estimated commission of all the basket’s positions. The BEa line then shifts away by the number of points corresponding to those costs, and the “zero” at which the shield closes is a true zero after costs — Auto BE Gain remains a pure profit margin and does not have to “pretend” to cover the commission. At the value 0 (default) the correction covers only the swap — as before.