Alım-satım robotlarını ücretsiz olarak nasıl indirebileceğinizi izleyin
Bizi Facebook üzerinde bulun!
Fan sayfamıza katılın
Kodu ilginç mi buldunuz?
Öyleyse bir link gönderin -
başkalarının da faydalanmasını sağlayın
Kodu beğendiniz mi? MetaTrader 5 terminalinde deneyin
Uzmanlar

Equity Drawdown and Daily Loss Guard - MetaTrader 5 için uzman

Kenichiro Sakamoto
Kenichiro Sakamoto
5 (2)
Ben Kenichiro Sakamoto, MetaTrader 5 için şeffaf ve kural tabanlı Expert Advisor'lar geliştiren FXEA365 stüdyosunun geliştiricisiyim.
Görüntülemeler:
58
Yayınlandı:
MQL5 Freelance Bu koda dayalı bir robota veya göstergeye mi ihtiyacınız var? Freelance üzerinden sipariş edin Freelance'e git

This Expert Advisor protects the whole account. It does not open trades; it compares the current equity with two limits and closes every open position when one of them is reached. It works with manual trading and with any other Expert Advisor running on the same account.

The first limit is the drawdown from the highest equity seen since the guard was started. The second limit is the loss since the start of the current server day, measured against the equity at the beginning of that day. The current values and the status are shown in the chart comment.

Fig. 1. The guard attached to a EURUSD H1 chart

Input parameters

  • InpMaxDrawdownPct - close all positions when equity falls this many percent below its peak; 0 disables the check.
  • InpDailyLossPct - close all positions when today's loss reaches this many percent of the day-start equity; 0 disables the check.
  • InpStayFlat - after a stop, keep closing any new position until the next server day.
  • InpMagic - close only positions with this magic number; 0 means all positions.
  • InpDeviation - maximum price deviation in points for the closing orders.

How it works

The check runs on every tick of the chart symbol and once per second on a timer, so the account is watched even when the chart symbol is quiet. When a limit is hit, all positions in scope are closed and the reason is written to the Experts log. After a drawdown stop the equity peak starts again from the current equity.

A new server day resets the daily reference and clears the stopped state. The guard uses floating equity, so open losses count toward both limits. Attach it to one chart only, any symbol and timeframe can be used, and allow algorithmic trading so that it can close positions.

Break-Even and Trailing Stop Manager for Open Positions Break-Even and Trailing Stop Manager for Open Positions

Utility Expert Advisor that moves the stop loss of open positions to break-even and then trails it by a fixed pip distance or an ATR multiple. It never opens trades.

Symbol Specification Probe - tick size, tick value, money value of a stop Symbol Specification Probe - tick size, tick value, money value of a stop

The probe prints the values a symbol specification supplies: digits, point, trade tick size, trade tick value, contract size, volume minimum, volume maximum, volume step and the stops level. Trade tick size is the smallest price change the instrument can make, trade tick value is the money one tick is worth for one lot, and the stops level is the minimum distance in points the reference gives for a stop away from the current price. It then prices a stop at the volume you enter, taking the pip as ten points on a 3- or 5-digit symbol and one point on every other symbol: the pip count times the pip gives a price distance, the distance over the trade tick size gives ticks, and ticks times trade tick value times volume gives the money.

One-Click Buy Sell Close Panel with Pip Stops One-Click Buy Sell Close Panel with Pip Stops

Chart panel Expert Advisor with BUY, SELL and CLOSE buttons. Market orders use a fixed lot with stop loss and take profit in pips, and the panel shows the floating profit of its trades.

Prop Firm Daily Profit Lock Prop Firm Daily Profit Lock

Daily Profit Lock is a free utility EA that protects a good trading day. Once today's profit hits your cap, it closes your trades, deletes pending orders and blocks new trades until the next day. You can set the cap as a fixed amount, a percent of balance, or a share of total profit, which suits prop-firm consistency rules. Dry run is on by default, so it only alerts until you're ready, and it never opens a trade itself.