Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Twitter !
Rejoignez notre page de fans
Un script intéressant ?
Poster un lien vers celui-ci -
laisser les autres l'évaluer
Vous avez aimé le script ? Essayez-le dans le terminal MetaTrader 5
Experts

Break-even and Trailing Stop Manager - expert pour MetaTrader 5

Vues:
43
Publié:
MQL5 Freelance Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance

Attach it to a chart and it manages the stop loss of existing positions: your manual trades or trades opened by any other EA.


Break-even:
- When profit reaches X points, SL moves to entry plus Y points of locked profit.

Trailing stop:
- Fixed distance in points, or ATR multiple (ATR period and timeframe selectable; ATR of the last closed bar is used, so the value does not jump within the bar).
- Starts only after a chosen profit in points.

Safety rules:
- SL only moves forward, never back, and only by at least the "minimum SL step" (fewer modification requests to the broker).
- Respects the broker's stop level and freeze level.
- Does not send requests while the symbol's trading session is closed (daily break, weekend).
- If the broker rejects a modification, that ticket is paused for a set number of seconds instead of flooding the log and the server.
- The existing take profit is kept.

Filters:
- Chart symbol only, or all symbols.
- Magic number: -1 = all, 0 = manual trades only, or a specific EA.

Tested in the Strategy Tester on XAUUSD and EURUSD (2 months, M5): thousands of stop loss modifications, none moved backwards.


Breakeven Trailing Manager

Trade Cost Meter Trade Cost Meter

Shows the real cost of a trade on the current symbol (spread, commission, swap) and which share of your risk (R) it takes on every timeframe from M1 to D1.

LotFromRisk: position size from risk, stop and commission LotFromRisk: position size from risk, stop and commission

An include file for calculating the size of a position to be opened. It turns a risk figure (percent of the balance, percent of the equity or money), a stop and a commission per lot into a lot size whose loss at the stop never goes over that risk. The lot is always rounded down to the volume step and a risk below the minimum volume returns 0 lots with a reason.

Equity Guard Equity Guard

Closes all positions, deletes pending orders and blocks new trades when the daily loss, drawdown-from-peak or daily profit target is reached. Works with manual trading and any other EA. State survives terminal restart.

MACD Signals MACD Signals

Indicator edition for new platform.