Loading…

EMA Trailing Stop

This Old Kings script for MetaTrader 4 is called EMA Trailing Stop. Judging by its name, it is built around moving averages and trailing stops. In the code it works with moving averages. It has 9 settings, for example Trail All Symbols (default true), Trail Only In Profit (default false) and Close When Profit (default 0.0). Scripts run once when you drop them on a chart; try it on a demo account first. Inside: 2 EA files with source code (.mq4) you can open and edit in MetaEditor. Old Kings are classic community tools shared as-is. Not tested by PolyMaria. Try it on a demo account first. Are you the author of this tool? Message us on Telegram (@abumarket_support) and we will credit you or take it down.

Script · MT4 · v1.0 · Free

About EMA Trailing Stop

EMA Trailing Stop is a script for MetaTrader 4 based on Moving Average. It has 9 settings, such as Trail all symbols, Trail only in profit and Close when profit. MQL source code included.

Files in the download: EMATrailingStop_v1.4.mq4, EMATrailingStop_v1.mq4.

Settings

SettingDefaultWhat it does
Trail all symbolstrueTrailing stop distance or switch
Trail only in profitfalseTrailing stop distance or switch
Close when profit0.0
Show messagestrue
Ema time frame0Period or timeframe used by the calculation
Price0
Ema period13Period or timeframe used by the calculation
Ema shift2Bar shift (0 = current bar)
Initial stop100

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Scripts.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the script onto a chart to run it once.

Download the PDF guide

Tags: Moving Average · Trailing Stop & Break-even · MT4 Expert Advisor · MQL4 Source Code

Old Kings — classic MT4 & MT5 collection · PolyMaria