MetaTrader Trading Tools
Showing 753 results in this view

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)

      X bug

      Opens orders using moving average crosses. The below chart is from 1/1/2010 to 2/11/2010 on eurusd. For the complete strategy tester report check the attached zip file.

      Visit for more free forex resources !!!

      dailyTrendReversal_D1

      Description:

      Underlyings for this EA are the daily opening (o1), the daily high (h1) and the daily low (l1).

      The distances from each other in a maximum of 3 steps form the filter base, which is confirmed by the CCI.

      Desciption (German): Use

      PC und EA müssen eingeschaltet sein während der Handelszeit 5-18:00 GMT.

      Meine Systeme sind optimal für den zeitgleichen Handel mit max. 9 Währungspaaren codiert.

      Bedenken Sie bitte, dass der Forexhandel sehr riskant ist. Ihre Margin sollte 20% Ihrer Account-Balance nicht überschreiten!

      • Lots. Die Grundeinstellung für die „Lots“ beträgt 0.1. Wenn Sie einen Micro-Account handeln, müssen Sie dieses Setting ändern auf 0.01.
      • automatisches Trading. Mit „autoTrading = false“ können Sie das Öffnen einer Position während der Handelszeit deaktivieren. Meine EAs sind voll automatisiert. Hier stellt sich nicht die Frage: Was passiert wenn ... Hier wird nach Tradingsschluß der Tag kontrolliert, und am Wochenende wird Bilanz gezogen.
      • Reversal. Mit „Reversal = true“ können Sie bei einem Trendwechsel offene Positionen (ggf. mit negativem Ergebnis) schließen.
      • StopLoss / TakeProfit. Mit „OrderSL“ kann ein StopLoss gesetzt werden, wenn noch kein StopLoss vom System generiert wurde, mit „OrderTP“ ein TakeProft.
      • ProfitStop. Mit „ProfitStop“ (Empfehlung: 200 EUR od. USD pro 0,1 lots) werden alle Positionen geschlossen, wenn der ProfitStop erreicht wird. Der ProfitStop singt bis zum Handelsschluss auf 10% seines eingestellten Wertes.
      • Settings. Ihre aktuellen Settings erhalten Sie im betreffenden Chart mit der Taste F4. Sie können die Werte jederzeit selbst ändern.
      • GMT / Zeitdifferenz.

        Wenn die Chart-Zeit (Brokerzeit hh:mm) von GMT (hh:mm) abweicht, müssen Sie die Abweichung (in Stunden) unter "GMT_Diff" ändern. Basiswert für alle Zeitangaben ist die GMT (Greewich Mean Time / ). Beispiel : Chart time - GMT = GMT_Diff (16:30 - 15:30 = + 1)

      • manuelles Traden. In der Tradingzeit (5 bis 14:00 GMT) wird dann eine Position mit dem Lotwert (0.1) geöffnet, wenn keine offene Position zu dem Währungspaar vorhanden ist. Wenn also eine Position um 5:00 GMT geöffnet und z.B. bis 8:00 GMT komplett geschlossen wurde, wird beim nächsten Handelssignal bis 14:00 GMT eine neue Position geöffnet. Wenn Sie nur eine Position öffnen wollen, dann reduzieren Sie die Tradingzeit, umgehrt erhöhen sie diese.
      • Positionen modifizieren und schließen. Wenn die Haltezeit „HoldingHours“ (10 = 10 Std.) oder die „GMTclosingHour“ erreicht ist, wird eine positive Position geschlossen, eine negative Position modifiziert den TP auf den Eröffnungswert dieser Position.

      DVD Level (100-50 cent)

      Strategy Tester Report DVD 100-50 cent Alpari-Classic (Build 226)