O!kurra
Start Lesson 02 New layer: managed exit

Managed exit: Break Even and Trailing Stop

The same entry as in lesson 01, but the position stops passively waiting for the SL or TP — Break Even secures the entry, and the Trailing Stop follows the move.

Three mini-charts of the same BUY trade side by side: the move dies before the BE threshold and ends at the full SL; the move reaches the BE threshold and fades, exiting on the secured stop instead of at a loss; the move develops into a wave, and the trailing walks the stop up in steps and closes on a 100-pt pullback.

The entry from lesson 01 stays unchanged. What changes is the exit: instead of passively waiting for price to hit the SL or TP, the position starts being managed. Two mechanisms:

  • Break Even (BE) — once the position earns BE_Start points, the Stop Loss jumps to the entry price + BE_Gain. From that moment the trade can no longer end in a loss.
  • Trailing Stop (TS) — once profit reaches TS_Start, the Stop Loss starts following price at a fixed distance TS_Distance, tightening at every new high of the move.

What is switched on, and why

FeatureValue in the setRole in the lesson
Break Even (B1_BE_Enabled=true)start 200 pts, gain 100 ptsafter 2 USD of movement the SL jumps to entry +1 USD
Trailing Stop (B1_TS_Enabled=true)start 300 pts, distance 100 ptsfrom 3 USD of profit the stop follows 1 USD behind price
Take Profit (B1_TakeProfit=800)widened from 400 to 800 ptswe give the trailing room — let the move decide how much it gives back
Stop Loss (B1_StopLoss=200)unchangedthe initial risk is identical to lesson 01
Virtual SL/TP (Global_VirtualSL/TP=true, factory)enabledthe levels are held in the EA’s memory, invisible to the broker — server-side stops are the subject of lesson 10

How it makes price behavior visible

A move on XAUUSD rarely runs in a straight line — it gives back along the way. This lesson shows three typical biographies of the same trade:

  1. The move dies quickly — price reverses before reaching 200 pts: the position ends at the full SL, exactly as in lesson 01. BE/TS had no time to do anything.
  2. The move reaches the BE threshold and fades — the SL already stands at entry +100: a trade that in lesson 01 would have ended at −200 becomes +100. This is the most common and most instructive case: the market “gave back” everything, but we were already safe.
  3. The move develops into a wave — the trailing walks the stop up with each new high; the exit happens not at a rigid TP, but where the wave actually pulled back by 100 pts. On the markers, compare the result with a hypothetical rigid TP of 400 — sometimes the trailing takes more, sometimes it gives back part of the move.

Putting these three cases side by side is a practical definition of volatility: price does not move from level to level, but in waves of impulses and pauses — and it is exactly on that pause that BE/TS earn their keep.

What to watch on the chart

  • The moment the SL jumps to break even (EA log [BE] + level marker).
  • The step-by-step tightening of the stop by the trailing on longer waves.
  • Trades “rescued” by BE that would have been a loss in lesson 01.

Next step

Lesson 03: since a move is made of an impulse and a correction, the same entry can be read two ways — on the pullback or on the deepening. Two buttons will show both geometries at once.

F7 keys in this lesson
  • B1_BE_Enabled
  • B1_BE_Start_points
  • B1_BE_Gain_points
  • B1_TS_Enabled
  • B1_TS_Start_points
  • B1_TS_Distance_points
Lesson .set files

Load these in MetaTrader 5 via F7 → Load to reproduce the lesson exactly. As of release 2.00 the robot starts switched off, so after loading also click ON in the panel's top row — without it nothing will happen. Available to signed-in users with an active licence.

🔒 Sign in with an active licence to download the sets.

Educational material, not investment advice. The sets are teaching examples — before any live use, test on real ticks and tune to your own account. Reference deposit 1000 in account currency, lot 0.01; scale money values proportionally to your balance.