Alım-satım robotlarını ücretsiz olarak nasıl indirebileceğinizi izleyin
Bizi Twitter ü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

One-Click Buy Sell Close Panel with Pip Stops - 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:
79
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 adds a small trading panel to the chart. The BUY and SELL buttons send a market order with a fixed lot, and the stop loss and take profit are placed at a distance in pips from the entry price. The CLOSE button closes the positions opened by the panel on the chart symbol.

Under the buttons the panel shows the lot, the stop distances, the number of open panel positions and their floating profit including swap. The panel is scaled for high DPI screens, so the buttons keep their proportions on large monitors.

Fig. 1. The panel on a EURUSD H1 chart

Input parameters

  • InpLot - lot size of each order; it is rounded down to the volume step of the symbol and kept within the minimum and maximum volume.
  • InpSLPips - stop loss distance in pips; 0 means no stop loss.
  • InpTPPips - take profit distance in pips; 0 means no take profit.
  • InpMagic - magic number of the panel trades; the CLOSE button and the information line use only positions with this number.
  • InpDeviation - maximum price deviation in points.
  • InpX and InpY - position of the panel from the top left corner of the chart in pixels.

Notes

Before each order the required margin is calculated with OrderCalcMargin and compared with the free margin, so an order that cannot be opened is not sent. Failed requests are written to the Experts log with the description of the trade server return code.

One pip is 10 points on 3 and 5 digit quotes and 1 point on other symbols. Allow algorithmic trading in the terminal before using the buttons. The panel never trades by itself, so it does nothing in the Strategy Tester unless the buttons are pressed in visual mode.

Equity Drawdown and Daily Loss Guard Equity Drawdown and Daily Loss Guard

Utility Expert Advisor that closes all open positions when equity falls a set percentage below its peak or when today's loss reaches a limit. It never opens trades.

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.

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.

EA Validation Guard - Pre-Trade Request Checker EA Validation Guard - Pre-Trade Request Checker

Reusable MQL5 pre-trade validation library that checks margin, volume, trading permissions, symbol restrictions, stop levels and broker OrderCheck results before an order is sent.