MetaTrader

MetaTrader Experts for MT4

UPDATE
Showing 756 results

Institutional ATR Trailing Stop and Breakeven Manager

The default MetaTrader 4 trailing stop relies on static pip distances. In a dynamic market environment, static stops are fundamentally flawed. During low volatility, your stop might be too loose, exposing unnecessary risk; during high volatility, it might be too tight, causing premature stop-outs before the real trend begins.

Institutional algorithms solve this by trailing stops based on market volatility, most commonly measured by the Average True Range (ATR). The Institutional ATR Trailing Manager is a plug-and-play utility Expert Advisor designed to take over trade management for manual or EA-opened positions.

Core Protective Features
  • Dynamic ATR Trailing: Continuously calculates the current market volatility. As the price moves in your favor, it trails your Stop Loss at a mathematical distance (ATR Value × Multiplier), giving the trade "room to breathe" while locking in maximum profit.

  • Auto-Breakeven System: Emotional trading often leads to letting winning trades turn into losers. This EA automatically moves your Stop Loss to your entry price (plus a small profit to cover commissions) the moment the price reaches your defined safety threshold.

  • Universal Management: By default, it manages all manual trades on the chart's symbol. You can also assign a specific Magic Number to manage positions opened by other Expert Advisors.

Input Parameters
  • ATR_Period: The lookback period for the volatility calculation (Default: 14).

  • ATR_Multiplier: How wide you want the trailing stop. 2.0 or 3.0 are standard institutional settings to avoid noise.

  • Use_Breakeven: Enable or disable the auto-breakeven feature.

  • Breakeven_Activation_Pips: How many pips in profit before moving the stop to entry.

  • Magic_Number: Set to 0 to manage manual trades, or specify a number to manage EA trades.

VR Rsi Robot is a multi-timeframe trading strategy

VR Rsi Robot is an expert advisor for MetaTrader 5, built on the classic RSI (Relative Strength Index) indicator but utilizing a multi-timeframe approach. The core idea is to filter signals received from the faster timeframe (H1) with confirmation from the higher timeframe (D1). This approach reduces the number of false entries and increases the probability of following a sustained trend. The expert opens positions only when both timeframes present a consistent picture: the RSI exiting overbought or oversold zones accompanied by dynamic confirmation (the indicator rising or falling).

The conditions for entering a trade are strictly formalized. For a buy, it requires that on H1 and D1, the RSI value (based on the completed candle) is above the oversold level (default 20) and that the current RSI value is greater than the previous one, indicating an upward impulse. For a sell, similarly: the RSI on both timeframes must be below the overbought level (80) and the current value must be less than the previous one, signaling a downward movement. Using completed bars eliminates the redrawing effect, as the signal is formed after the candle finishes forming.

Position management is implemented on a "one position per instrument" basis. The expert monitors for open orders with its magic number. If a buy signal appears while a sell is open, the sell is closed, and a buy is opened. The same logic applies for a sell signal. Thus, the robot is always either out of the market or in a position whose direction aligns with the most recently generated signal. 

An important feature is the automatic adjustment of the trading volume according to the broker's requirements. During initialization, the robot rounds the specified lot to the nearest allowable volume step and checks that it is not less than the minimum allowed. This ensures correct operation on any account. Overall, the strategy represents a simple and clear approach to RSI trading, based on confirming signals with a higher timeframe.

VR Breakdown level - Trading strategy based on a breakout of the previous High or Low

VR Breakdown Level - A simple trading strategy based on breaking previous High or Low levels. The period for calculating the levels is selected by the user in the trading robot's settings. 

Strategy Logic:

At the start of a new trading period (selected by the user in the settings), the trading robot records the High and Low prices of the previous period. Then, if the price reaches one of these levels, a position is opened in the direction of that level. In other words, if the price rises and exceeds the previous High, the trading robot buys the financial instrument with a volume specified by the user in the settings. A Stop Loss and Take Profit are set for all open positions (as defined by the user in the settings). Positions are closed only by Stop Loss or Take Profit.

A similar strategy can be implemented using pending orders such as BUY STOP and SELL STOP. The difference is that with pending orders, we need to delete the opposite pending order in a timely manner. Placing pending orders signals to the broker at which price levels we intend to enter the market. Using "internal" levels hides this information from the broker.

VR Locker Lite - Trading strategy based on a positive lock

What is locking?

Locking is a situation where a trader simultaneously holds a long (LONG) and a short (SHORT) position of equal volume on the same asset. As a result:

  • Market risk is neutralized: profit or loss on one position is offset by the opposite movement of the other.
  • The position value is "frozen": the net financial result ceases to depend on market fluctuations.

The presented VR Locker Lite trading algorithm demonstrates working with one positive lock:

Operation algorithm:

  1. The trading robot immediately opens two positions: a buy (BUY) and a sell (SELL).
  2. Using averaging, the trading robot "widens" the buy (BUY) and sell (SELL) positions.
Options for further work with the lock:
  1. The simplest one - simply close the lock and start the entire trading cycle anew.
  2. Unlock the lock - leave one of the positions for a longer period and "let the profit grow".
  3. Enable a trailing stop for one of the positions or for both simultaneously.
  4. Move one of the positions to breakeven and "let the profit grow".
  5. Start the algorithm on another financial instrument or with another MagicNumber to create another positive lock.

Important things not to forget:

  1. Double commissions and swaps: You pay a commission for opening and (in the future) closing two positions instead of one. In forex, there may be a negative swap (rollover fee) on one of the positions.
  2. Capital lock-up: The margin (collateral) for the locked position is still frozen. You cannot use these funds for other trades.
  3. Complication of analysis: You still have to decide which side of the lock to close and when. This is often more difficult than the initial entry.

Trading strategy Heads or Tails

The "Heads or Tails" trading strategy belongs to the category of high-risk short-term trading approaches, used primarily in the stock market and the Forex market. Its name is derived from the randomness of decision-making, similar to tossing a coin ("heads" — buy the asset, "tails" — sell). This strategy is based exclusively on intuitive decisions or random signals and ignores fundamental market analysis factors.

How does the strategy work?

The strategy is structured as follows:

  1. Instrument Selection: The trader chooses a financial instrument (stock, currency, commodity).
  2. Decision Making: The decision to buy or sell is made randomly, for example, by tossing a coin or using another method to choose between two possible actions.
  3. Closing the Trade: The trade is closed automatically after a predetermined time or upon reaching a specific profit or loss level.

This strategy does not require a deep understanding of market mechanisms and analytics, but it also does not imply a serious approach to risk management.

Disadvantages of the strategy:
  1. High Level of Risk:
    • Relying solely on luck significantly increases the probability of losses. The strategy ignores any objective indicators and recommendations, increasing the chances of capital loss.
  2. Lack of Risk Control:
    • Since buying or selling occurs absolutely randomly, there is no possibility for rational capital management, risk assessment, or asset allocation.
  3. Impossibility of Long-Term Success:
    • Even if individual trades are profitable due to luck, in the long term such a strategy is more likely to lead to significant losses.
  4. Short-Lived Results:
    • Positive results are only possible under favorable market conditions and with a large number of small successful trades, which is extremely rare in practice.
Application of the Strategy:

The strategy is more suitable for novice traders who want to familiarize themselves with the principles of exchange platforms and try trading without deep knowledge of technical analysis. However, professionals use this strategy extremely rarely, preferring scientifically based approaches that account for price behavior, trading volume, and companies' fundamental indicators.

For experienced investors, this strategy represents more of an experimental method for testing hypotheses, rather than a stable way to earn money.

Thus, although the strategy is simple and accessible to every beginner, it carries significant risks and practically has no chance of generating sustainable income in the long term.

Let's consider the main block of the random position opening signal:

Here, the condition for the absence of open positions is checked. Variable b denotes the number of long ("buy") positions, variable s — short ("sell") positions. If the sum of both equals zero (b + s = 0), it means there is not a single open position.

Inside the condition block triggered previously, a random number is checked. The ::MathRand() function generates a pseudo-random number from 0 to 32767 inclusive. Then this number is divided modulo by 2 (% 2) — if the remainder is 0, the next block is executed.

If the random number is even (the remainder of division by 2 equals 0), the trading robot opens a long position (buy) with a volume of iLots. After successfully opening the position, the function execution is interrupted by the return operator.

If the random number was odd (the remainder of division by 2 differed from zero), a short position (sell) with a volume of iLots is opened, and the further execution of the function is also terminated.

Final logic of the fragment:
  • The presence of the trader's open positions is checked.
  • If there are no open positions, a random trade direction is chosen: either buy (long), or sell (short).
  • An opened trade automatically stops the further operation of the function.

Thus, this code is a simple example of an algorithm that makes the decision to open a market position randomly.

MT4 Telegram Trade Notifier (Bot API) — Deal Alerts

Key Features

  • Sends alerts on executed deals (TRADE_TRANSACTION_DEAL_ADD)

  • Optional filter: BUY/SELL only

  • UTF-8 URL encoding (supports Vietnamese & emojis)

  • Optional disable web page preview

  • Simple inputs: Bot Token, Chat ID, timeout, prefix

Setup

  1. Get your target chat id (user/group) or use @channelusername.

  2. In MetaTrader 4: Tools → Options → Expert Advisors Enable “Allow WebRequest for listed URL” and add:

  3. Attach the EA to any chart and set:

    • InpBotToken

    • InpChatId

Notes / Troubleshooting

  • If WebRequest fails, check network/firewall/DNS and ensure the URL is allowed in MT4 options.

Inputs

  • InpChatId: chat id or @channelusername

  • InpSendTestOnInit: send a test message when EA starts

  • InpNotifyBuySellOnly: notify only BUY/SELL deals

  • InpTimeoutMs: WebRequest timeout

  • InpMsgPrefix: message prefix

RiskSizer Panel Lite MT4 - Risk Percent Lot Calculator With One Click Buy Sell

RiskSizer Panel Lite (MT4) — Risk% Lot Calculator + One-Click BUY/SELL

RiskSizer Panel Lite is a lightweight MT4 trading panel that helps you calculate an estimated lot size from a fixed risk percentage of your account balance, using two draggable horizontal lines on the chart as your SL/TP zone. It also includes one-click BUY/SELL execution for fast manual trading.

Key Features
  • Risk-based lot sizing by % of Account Balance.
  • Two draggable chart lines (LOW / HIGH) to define your SL and TP levels quickly.
  • One-click trading: BUY / SELL.
  • Editable Risk%:
    • Click the Risk% box and type your value
    • Enter = Apply, Esc = Cancel
    • Use + and - buttons for quick adjustment (step size configurable)
  • Live preview on the panel:
    • Symbol
    • Spread (points)
    • Risk money (account currency)
    • Calculated BUY lot / SELL lot
    • LOW/HIGH line prices
  • Reset button to restore default SL/TP line distances around current price.
  • Optional Max Spread filter to block trades when spread is too high.
How It Works
  • The panel uses two horizontal lines on the chart:
    • LOW line = lower price line
    • HIGH line = higher price line
  • BUY logic: Entry = Ask, SL = LOW line, TP = HIGH line (only if HIGH > Ask)
  • SELL logic: Entry = Bid, SL = HIGH line, TP = LOW line (only if LOW < Bid)
Inputs / Parameters
  • Risk % per trade (InpRiskPercent)
  • Risk step (InpRiskStep)
  • Default SL points (InpDefaultSL_Points)
  • Default TP points (InpDefaultTP_Points)
  • Max spread (points) (InpMaxSpread_Points) — 0 disables the filter
  • Deviation (points) (InpDeviation_Points)
  • Magic number (InpMagic)
  • UI refresh (ms) (InpUiRefreshMs)
Notes
  • This is a Lite tool designed for simplicity and fast manual execution.
  • Risk is calculated from Account Balance (not Equity).
  • Lot sizing engine is intentionally simplified (approximate calculation for universal symbols).
  • Please test on a demo account before using on real accounts.

    If you find this utility helpful, feel free to leave feedback and suggestions.

    EA_PSar_002B_v1

    EA tested and optimized on FXDD’s MT4 trading platforms.

      EA_RSI_MA

      Description:

      This EA is based on the indicator . EA designed for EURUSD, D1.

      Testing results:

      Symbol EURUSD (Euro vs. United States Dollar)

      Period: Daily (D1) 2010.01.04 00:00 - 2010.09.24 00:00 (2010.01.02 - 2010.09.25) Model: Every tick (the most precise method based on all available least timeframes) Bars in test: 1191 Ticks modelled: 1694427 Modelling quality: 90.00% Mismatched charts errors: 59 Initial deposit: 10000.00 Total net profit: 1991.46 Gross profit: 2992.70 Gross loss: -1001.24 Profit factor: 2.99 Expected payoff:132.76 Absolute drawdown:218.14 Maximal drawdown:782.92 (7.28%) Relative drawdown: 7.28% (782.92) Total trades:15 Short positions (won %) 7 (57.14%) Long positions (won %) 8 (25.00%) Profit trades (% of total) 6 (40.00%) Loss trades (% of total) : 9 (60.00%) Largest profit trade 999.00 loss trade -203.84 Average profit trade 498.78 loss trade -111.25 Maximum consecutive wins (profit in money) 3 (1692.11) consecutive losses (loss in money) 3 (-313.12) Maximal consecutive profit (count of wins) 1692.11 (3) consecutive loss (count of losses) -331.84 (2) Average consecutive wins 2 consecutive losses 2

      MA_Mirror EA

      The more complicated functions are in the include file ea.mhq and serve for all my expert advisors. The start() functions checks the order, calls the function which does trailing stop loss and such then calls the function Signal() to find out if the indicator part of the EA wants something to have done, it than acts acording to the Signal. Signal() returns -1 or OP_BUY/OP_SELL if it wants to sell or buy.

      You can simple modify the Signal() to do what you want, for example a different indicator, always buy or sell or even use a random number gernerator (I use all of them in order to see if the expert is better than simply buying or selling (in a trend) or random).

      ------------------------------------------------------------

      There was an error in FindOrders (I accidently removed a line) New feature: BreakEven, if indicator is 20 pips in plus, it sets stop loss to be 0

      error EA but with run with profit!

      test at 1 june~1 Oct, 2010

      Symbol EURUSD (Euro vs. United States Dollar)

      Initial deposit: 10000.00

      pSAR bug 4

      Please visit the all new and donate any amount so that i can have more time to further develop this and a lot more free projects. You'll also find more forex tools there !!!

      Strategy Tester Report pSAR bug 3 Finexo-Real (Build 226)

      RobotFX does not own any of the code provided on this platform. All tools are freely available on the internet; we simply index and re-offer them for download. We are not responsible for any financial losses that may occur. Trading responsibilities rely solely on the traders downloading and using the displayed Expert Advisors, indicators, and scripts. These tools are provided for educational purposes only and may require modification or optimization to align with a trader's specific strategy or needs.
      © ROBOTFX - Best MetaTrader Expert Advisors & Indicators