Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Trailing stop loss module based on WPR - MetaTrader 5 library | Forex indicator download - MT4/MT5 resources

author EAcpu | 5 reads | 0 comments |

A WPR Based Trailing Stop Module - library for MetaTrader 5

The tracking module is based on two stops: short stop and long stop. Long stop loss levels are similar to fixed trailing stops. When the WPR indicator leaves the overbought/oversold zone, short-term stop loss levels are activated. The width of the overbought/oversold zones is defined by the module settings.

Module settings:

Find the file trail WPRwStops.mqh in the terminal data directory \MQL5\Include\Expert\Trailing or any Trailing subdirectory (do not put it in the source folder), otherwise the Exert Advisor wizard will not be able to use it.

The image shows an example of the module when opening a short position on EURUSD. When the WPR indicator leaves the oversold zone (traced by the WPR Stop Loss (-50±StpLvl) parameter), the short-term stop loss (red line on the candlestick chart) is activated, thus closing the position.

A WPR Based Trailing Stop Module - library for MetaTrader 5

Figure 1. Module example


Attachment download

📎 trailingwprwstops.mqh (10.15 KB)

Source: MQL5 #1723

Verification code Refresh