Skip to content
Forex Indicator System Thailand
Back to marketplace
UtilityUtility

PSAR Trailing Stop

Utility EA that trails the stop-loss of open positions along the Parabolic SAR.

PSAR Trailing Stop on an MT5 chart
Example on an MT5 chart

Download this EA for free

Download right away. Nothing to fill in.

Version
1.06
Published
11/21/2026
File size
65 KB

Open source, Apache License 2.0, by EarnForex.com. See licences

Version history

  1. 1.06Current11/21/2026 · 65 KB

    First release on this site.

How to use

Attach it to a chart, enable Algo Trading, then switch trailing on from the chart panel or set EnableTrailingParam to true (it is off by default).

Before switching on, check that the filters match the positions you want, for example UseMagic with MagicNumber to touch only one EA's orders. Use ProfitPoints if trailing should start only once a position is in profit.

For notifications set EnableNotify to true and pick the channels with SendAlert, SendApp and SendEmail (all three default to true but only act when EnableNotify is on).

Parameters

NameDefaultDescription
PSARStep0.02Parabolic SAR step.
PSARMax0.2Parabolic SAR maximum.
Shift0How many bars back the PSAR value is read from. 0 = current bar. If it is above 0 and the shifted PSAR sits on the wrong side of price, the EA skips that pass.
OnlyCurrentSymboltruetrue = only positions on the chart's symbol; false = positions on every symbol in the account.
OnlyTypeAllWhich position type to manage: All, Buy only or Sell only.
UseMagicfalsetrue = only manage positions whose magic number equals MagicNumber.
MagicNumber0Magic number to filter by (used when UseMagic is true).
UseCommentfalsetrue = only manage positions whose comment contains CommentFilter.
CommentFilterText that must appear in the position comment (used when UseComment is true).
ProfitPoints0Minimum profit in points before trailing starts. 0 = ignore profit.
EnableTrailingParamfalseEnable trailing from start. Default is false; switch it on from the chart panel or set it to true.
EnableNotifyfalseEnable notifications when the EA moves a stop-loss.
SendAlerttrueShow a terminal Alert popup (requires EnableNotify).
SendApptrueSend a push notification to the mobile app (requires EnableNotify).
SendEmailtrueSend an email (requires EnableNotify and email set up in the terminal).
ShowPaneltrueShow the on-chart control panel for switching trailing on and off.
ExpertNameMQLTA-PSARTSName used as the prefix of the panel's chart objects.
Xoff20Horizontal offset of the panel, in pixels.
Yoff20Vertical offset of the panel, in pixels.
ChartCornerCORNER_LEFT_UPPERChart corner where the panel is placed.
FontSize10Panel font size.

Defaults are the values shipped with the EA, not a recommendation. Results depend on the market and on each account. Past results do not guarantee future results. Trading carries a high risk of loss.

How to install

  1. Download the .ex5 file.
  2. In MT5, choose File > Open Data Folder.
  3. Copy the file into the MQL5\Experts folder.
  4. Right-click Expert Advisors in the Navigator window and choose Refresh (or restart MT5).
  5. Drag it onto a chart, adjust the Inputs, turn on Allow Algo Trading, then click OK.

Description

This EA never opens orders. It trails the stop-loss of existing positions along the Parabolic SAR of the chart's timeframe. For a Buy the SL moves up when the PSAR is below Bid and above the current SL; for a Sell it moves down when the PSAR is above Ask and below the current SL (or no SL is set). The existing take-profit is left unchanged.

Positions can be filtered by symbol, Buy/Sell type, magic number and comment text, and trailing can wait until a set number of profit points is reached. A chart panel switches trailing on and off, and alerts can be sent when an SL is moved.

Banners from the Exness partner programme

Exness banner: gold spreads*

FXIDTH is an independent IB partner of Exness. This channel is not owned or operated by Exness.*Spreads may fluctuate and widen due to factors including market volatility, news events, market open/close, and others.*Processing times may vary depending on the chosen payment method.