Trend_Catcher - MetaTrader 5 Expert | Forex Indicators Download - MT4/MT5 Resources
The author of the idea — Dmitry Epshtan , the author of the MQL5 code — Barabashkakon .
The Expert Advisor identifies trends based on three moving averages (with periods of 200, 50, 25 or other custom periods) and trades using the Parabolic SAR indicator. The EA uses the martingale technique, the lot size is calculated as a percentage of the deposit based on the stop loss.
The new version has the following features: 1) selection of trading days, 2) opening of orders on reverse signals, 3) disabling order closing by reverse signals.
Buy: If the current price is higher than the Parabolic SAR indicator point on the current candlestick, and the closing price of the previous candle is lower than the previous Parabolic SAR indicator point, that is, the indicator value changes; if the fast MA is above the Slow MA; if the current price is above the second moving average in another period, a buy order is opened.
Sell: If the current price is below the Parabolic SAR point on the current candlestick and the closing price of the previous candle is higher than the previous Parabolic SAR point, that is, the indicator value changes; if the fast MA is below the Slow MA; if the current price is below the second moving average in another period, a sell order is opened.
The Expert Advisor closes orders based on opposite signals.
Stop Loss and Take Profit
If Auto_SL = true, Stop Loss is automatically calculated and set at the Parabolic SAR point. The SL_koef factor can be used to multiply the distance (in points) between the order's opening price and the Parabolic SAR indicator point. Example: If there are 20 points between the order price and the Parabolic SAR point, and SL_koef=2, the stop loss of the order will be equal to 40 points, if SL_koef=0.5, the stop loss of the order will be equal to 10 points, and so on.
If Auto_SL = false, Stop Loss will be fixed and equal to the SL parameter in points.
If Auto_TP = true, profit is automatically calculated based on the stop loss value multiplied by TP_koef. Example: If TP_koef=2, the take profit will be twice the expected stop loss.
If Auto_TP = false, TakeProfit will be fixed and equal to the TP parameter in points.
Batch and martingale settings
Lot size is calculated as a percentage of deposit based on risk parameters and stop loss. Example: The account balance is 1000 USD, the stop loss is 100 pips, if Risk = 1 (1% of the deposit), we can lose 10 currency units, so the lot size will be 0.01, if Risk=10 the lot size will be equal to 0.1.
If Martin = true, and the previous trade ended in loss, the risk of the next trade will be multiplied by Koef.
If Martin = false, the EA will calculate the lot size as a percentage of the current account balance.
Breakeven and Trailing Stop
If the position has taken Profit_Level point profit, the stop loss will be set at the SL_Plus profit point.
If the position has taken Profit_Level2 pips profit, the Trailing Stop will follow the price, 2 pips away from TrailingStop.
Attachment download
📎 trend_catcher.mq5 (48.93 KB)
Source: MQL5 #17386
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •