Trailing Stops Partial 2
Trailing Stops Partial 2 — a MetaTrader 4 script kept in the Old Kings collection. Judging by its name, it is built around trailing stops. Its source code uses moving averages and Parabolic SAR. It has 40 settings, for example Account Is Mini (default true), Expert Name (default TrailingPartialClose) and st6 (default --Profit Controls--). Drop it on a demo chart first to see exactly what it does. Inside: 1 EA file 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 Trailing Stops Partial 2
Trailing Stops Partial 2 is a script for MetaTrader 4 based on Moving Average and Parabolic SAR. It has 40 settings, such as Account is mini, Expert name and St6. MQL source code included.
Files in the download: TrailingWithPartialClose.mq4.
Settings
| Setting | Default | What it does |
|---|---|---|
| Account is mini | true | |
| Expert name | TrailingPartialClose | |
| St6 | --Profit Controls-- | |
| Stop loss | 100 | Maximum pips willing to lose per position. |
| Use partial close | 1 | |
| Partial percent | 50 | |
| Tp level1 | 20 | |
| Slippage | 3 | Maximum slippage allowed when opening a trade |
| Tsp0 | --Trailing Stop Types-- | |
| Tsp1 | 1 = Trail immediately | |
| Tsp2 | 2 = Wait to trail | |
| Tsp3 | 3 = Uses 3 levels before trail | |
| Tsp4 | 4 = Breakeven + Lockin | |
| Tsp5 | 5 = Step trail | |
| Tsp6 | 6 = MA trail | |
| Tsp7 | 7 = pSAR trail | |
| Trailing stop type | 4 | Trailing stop distance or switch |
| Ts2 | Settings for Type 2 | |
| Trailing stop | 15 | Change to whatever number of pips you wish to trail your position with. |
| Ts3 | Settings for Type 3 | |
| First move | 20 | Type 3 first level pip gain |
| First stop loss | 50 | Move Stop to Breakeven |
| Second move | 30 | Type 3 second level pip gain |
| Second stop loss | 30 | Move stop to lock is profit |
| Third move | 40 | type 3 third level pip gain |
| Trailing stop3 | 20 | Move stop and trail from there |
| Ts4 | Settings for Type 4 | |
| Break even | 30 | Move the stop to break-even |
| Lock in pips | 1 | Profit Lock in pips |
| Ts5 | Settings for Type 5 | |
| E trailing stop | 10 | Trailing stop distance or switch |
| E trailing step | 2 | Trailing stop distance or switch |
| Ts6 | Settings for Type 6 | |
| Trail ma time frame | 15 | Trailing stop distance or switch |
| Trail ma period | 10 | Trailing stop distance or switch |
| Trail ma shift | 0 | Trailing stop distance or switch |
| T3 | --Moving Average settings-- | |
| Tm | --Moving Average Types-- | |
| Tm0 | 0 = SMA | |
| Tm1 | 1 = EMA |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Scripts.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the script onto a chart to run it once.
Tags: Trailing Stop & Break-even · Moving Average · Parabolic SAR · MT4 Expert Advisor · MQL4 Source Code