Step-by-Step Guide
This management template helps you lock in profits automatically using an Exponential Moving Average (EMA) as your trailing stop. Instead of keeping a fixed stop, your bot updates it candle by candle, following the market’s flow.
Step 0: Access the Trading Bot Template [1 Min]
Click the button to load the management directly onto your canvas:
Your canvas should display 8 blocks as shown below. Check? Let's continue!
Step 2: Upload to MetaTrader 5 [4 Min]
Step 2: Upload to MetaTrader 5 [4 Min]
Don’t know how? Refer to our help article "Exporting Your First Strategy"
Step 3: Understand the Logic [5 Min]
Here’s how it works:
On every candle close, the bot checks your running profit.
If profit ≥ your set threshold (default = 1% of account balance), the trailing stop activates.
Stop loss is then placed at the current EMA value.
Default = EMA 20.
With every new candle, the stop loss updates to the newest EMA level, trailing price smoothly.
Example:
You’re long GBPUSD, and profit reaches +1%.
Stop loss moves to the EMA 20 level.
As price climbs, EMA rises → your stop loss moves up each candle.
If price reverses, trade closes at the EMA, securing profit.
Step 4: Make It Your Own [10 Min]
Experiment with these adjustments:
Change profit threshold (e.g. 0.5% or 2%).
EXPORT → see how quickly protection kicks in.Adjust EMA period (e.g. EMA 10 for tighter trailing, EMA 50 for looser).
EXPORT → test different responsiveness.Switch timeframe (e.g. 1H vs 4H candles).
EXPORT → see how the stop updates differently.Combine with fixed profit targets for added risk control.
Conclusion
The Trailing Stop Management template is a clean way to combine profit protection with flexibility. By using EMA levels instead of fixed numbers, your stop loss adapts to live market movement and keeps you in the trade longer while still securing gains.
Now it's your turn—apply the template, tweak the logic, and make it yours. 🚀
Templates are for educational purposes only!


