Target Decay Pilot
- Utilità
-
AL MOOSAWI ABDULLAH JAFFER BAQER
To trade successfully we need to go through the proven path that others had gone and reached!
Here are 17 quotes from such successful investors:
1- Limit your size in any position so that fear does not become the prevailing instinct guiding your judgment.
Joe Vidich - Versione: 1.0
- Attivazioni: 5
A TAKE PROFIT THAT GETS MORE MODEST AS YOUR TRADE GETS OLDER, AND NEVER DROPS BELOW BREAK-EVEN.
Target Decay Pilot is a take profit manager and trade management utility for MetaTrader 5. The longer a position stays open without reaching its target, the closer its take profit is pulled toward the entry, step by step, on a schedule you choose. It stops at a break-even floor that already covers spread, commission and negative swap, and it never widens a take profit.
Built for traders whose winners usually come fast. One promise: a trade that stalls still gets a realistic exit instead of waiting for a target the market no longer offers. Mechanism: the age of every position is measured in minutes or bars; after a grace period the take profit decays from its first level to the floor, linearly or in equal steps.
Works with: manual trades and other Expert Advisors or trade copiers on the same terminal (symbol scope and magic filter decide which positions it manages), hedging and netting accounts, every symbol (forex, gold, indices, crypto), and prop-firm style rules: it only ever moves a take profit closer, it never adds risk and it never opens a trade on your account.
Try it free first: run Target Decay Pilot in the Strategy Tester with visual mode on. There it opens small demo positions, half with a take profit and half without, so you can watch first take profits appear and the dotted target line walk down to the dashed floor.
Who this is NOT for: traders looking for an entry robot or a grid (it opens nothing on a live chart), and anyone who wants targets to grow over time: a take profit is only ever pulled closer.
A worked example (default settings)
EURUSD buy 0.10 lots at 1.08500, take profit 1.09100 (60 pips). The floor is the entry + 30 points buffer + the spread + the commission of 7 USD per lot, about 1.08547.
Hour 0 to 4: grace period, the take profit stays at 1.09100.
Hour 12: the take profit is now about 1.08999.
Hour 24: about 1.08849.
Hour 36: about 1.08698.
Hour 48: 1.08547, the floor. From here the target stays put; if the trade later reaches it, it closes slightly in profit after costs.
If you move the take profit further away by hand, that new level becomes the starting point of the decay. The pilot itself never moves it away.
In short
- Decay schedule: grace period, full-decay age, linear or stepped shape, measured in minutes or bars of any timeframe.
- Break-even floor: entry + buffer points, plus the current spread, your commission per lot and any negative swap the position has collected.
- Never widens a take profit, never moves one past the floor, never touches the stop loss.
- Positions without a take profit: leave them alone, or give them a first take profit at an R multiple of the stop distance or an ATR multiple.
- Alert-only mode: shows and announces every pull it would make, sends nothing.
- Panel with real trading data: TARGET KEPT bar, profit at the current take profits against the profit the first take profits promised, profit at the floor, and a DECAY bar plus a NEXT countdown per position.
- Not a grid, no martingale, no DLLs, no web requests.
- Tester numbers (June 2026, EURUSD H1, defaults): 42 demo positions, 21 first take profits set, 82 take profit pulls, 16 take profit hits, 0 failed sends, 0 journal errors.
START HERE
Attach it to one chart, for example EURUSD H1. One copy manages every symbol of the account unless you limit it. Enter your commission per lot (0 if your broker has none). Keep the defaults: 4 hours grace, full decay after 48 hours, linear. Turn on Algo Trading and watch the position table: GRACE, DECAYING, PULLING, AT FLOOR. To watch first, switch to ALERT ONLY with the panel button.
How one take profit decays
First sight. The pilot records the take profit the position has: this is the starting point of the decay.
Grace. Until the position is older than the grace age, nothing happens.
Decay. After that, the target moves from the first take profit toward the floor in proportion to the age (linear) or in equal jumps (stepped). A new take profit is only sent when it is at least the smallest move (20 points by default) closer than the current one, so the broker is not flooded with tiny changes.
Market already beyond the target. If the price has already passed the new target, the nearest take profit the broker accepts is used, still never below the floor.
Floor. When the decay is complete the take profit sits at break-even after costs and stays there.
Safety patterns inside
Before any send it checks that Algo Trading is allowed, that the symbol session is open and that the last quote is no older than 5 minutes. Every new take profit is checked against the broker's stop and freeze levels, and the existing stop loss is sent back unchanged. Right before each send the position is selected again and its symbol, magic, current take profit and floor are checked again, so a take profit is never widened even if something changed a moment earlier. A refused send is retried with a growing pause up to 2 minutes, with one alert after a set number of failures. The starting take profit of every position is kept in GlobalVariables whose keys contain the chart symbol, the magic filter and the magic number, so two copies never share a key and a terminal restart continues the same decay.
Inputs, every one explained
DECAY SCHEDULE
InpMode = 1. 0 alert only, 1 pull the take profit.
InpClock = minutes. The age of a position is measured in minutes, or in bars of the clock timeframe.
InpClockTF = H1. Timeframe of the bars clock.
InpGrace = 240. No pull before this age (minutes or bars).
InpFullAfter = 2880. Age at which the take profit reaches the floor.
InpShape = linear. Linear (a little closer every minute or bar) or stepped (equal jumps).
InpSteps = 4. Number of jumps of the stepped shape.
InpMinMovePts = 20. Smallest take profit move worth a send, in points.
BREAK-EVEN FLOOR
InpBufferPts = 30. Floor = entry + this many points.
InpAddSpread = true. Add the current spread to the floor.
InpCommPerLot = 7.0. Round-turn commission per lot in account money, 0 = none.
InpSwapAware = true. Add the negative swap of the position to the floor.
POSITIONS WITHOUT TP
InpNoTP = R multiple. Leave them alone, set a first take profit at an R multiple of the stop distance, or at an ATR multiple.
InpInitR = 2.0. First take profit at this R multiple (needs a stop loss).
InpInitATR = 2.0, InpATRTF = H1, InpATRPeriod = 14. First take profit at this ATR multiple.
EXECUTION
InpFailAlertAt = 3. One alert after this many failed attempts.
FILTER - WHICH POSITIONS ARE MANAGED
InpSymbolScope = all symbols or the chart symbol only. InpMagicFilter = any magic, only manual trades (magic 0), or only the magic number InpMagic.
ALERTS
InpAlertPopup = true. InpAlertPush = false (push to the MetaTrader app on your phone).
PANEL
ShowPanel = true. ShowLines = true: floor line and decayed target line for chart-symbol positions. PanelX = 12, PanelY = 15, PanelFontSize = 9, MaxTableRows = 6, MaxHistoryRows = 4. The MOVE button drags the panel; on a short chart it drops its least important rows first.
STRATEGY TESTER DEMO
InpTesterDemo = true. Strategy Tester only: Monday to Friday 08 to 16 one demo position per 4-hour slot with a stop 2 ATR away, every second one with a take profit 3 ATR away, at most 3 open, margin checked x 1.5, closed after 4 days, stopped after a 20 percent balance loss. This code never runs on a live or demo chart.
The panel
TARGET KEPT: a bar with the profit the current take profits would pay against the profit the first take profits promised. DECAY PLAN: take profit pulls, positions in scope, decaying and at the floor, profit at take profit, profit at the floor, schedule, floor recipe, mode, positions without a take profit, first take profits set, last action, Algo Trading, failed sends and totals. POSITIONS, MOST DECAYED FIRST: symbol, side, age, take profit now, decayed target, floor, time to the next pull, profit, state and a DECAY bar. ACTION HISTORY lists every pull with server time. QUICK CONTROLS: ARMED or PAUSED, the mode button and CHECK NOW. The right side of the chart stays clear.
Common questions
Does it open trades by itself? No. On a live or demo chart it only changes the take profit of positions that are already open. Demo positions exist only inside the Strategy Tester.
Does it work with my other EA? Yes. Use the magic filter to choose which positions it manages. If your EA rewrites its own take profit every tick, exclude it, or the two will fight.
Can it turn a winner into a loser? It never moves a take profit below the floor, and the floor includes spread, commission and negative swap. Slippage at the take profit is still possible, as with any order.
What happens after a restart? The starting take profit of every position is kept in GlobalVariables, and the age comes from the position's own open time, so the decay continues where it was.
What it cannot do
It does not choose entries and it does not move stops. A take profit pulled closer can be hit just before the market runs further: that is the price of a realistic exit. It only works while it runs: keep the terminal on, for example on a VPS.
What was and was not tested
Tested in the Strategy Tester on a hedging account, 1 to 30 June 2026, 1-minute OHLC, H1, deposit 10000, leverage 100, three runs, with no journal error and no failed send. EURUSD defaults: 42 demo positions, 21 first take profits by R, 82 pulls, 16 take profit hits. XAUUSD with a bars clock (4 bars grace, 48 bars full decay), stepped shape in 4 jumps, first take profit by ATR and a 100 point buffer: 42 demo positions, 21 first take profits, 17 pulls, 23 take profit hits. EURUSD alert only: 41 demo positions, 33 alerts, nothing sent. On a demo chart the panel ran in alert-only mode beside 4 EURUSD positions without a take profit and showed their first take profits at the floor or refused one with no room.
Not tested at the time of writing: real pulls on a live or demo broker, a netting account, retries after a broker refusal, chart symbol scope, magic filters, pop-up and push alerts and a terminal restart. These paths exist in the code and are described by design. Please try them on a demo account with your own broker first.
Try it in the Strategy Tester
Choose Target Decay Pilot, EURUSD or XAUUSD, H1, any recent month, visual mode, and press Start. Watch the dotted target line walk down toward the dashed floor as each demo position ages.
If the pilot rescued a stalled trade for you, or you think it should handle a case differently, an honest review on the product page helps other traders decide and tells me what to improve next.
