거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Facebook에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
스크립트

Close By Filter - close positions by side, symbol, magic number and profit - MetaTrader 5용 스크립트

Daniel Reynolds
Daniel Reynolds
MQL4 and MQL5 developer building Expert Advisors, indicators, trade panels and utilities for MetaTrader 4 and 5.
What I build:
조회수:
119
게시됨:
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

Close By Filter closes only the positions you choose, instead of everything at once. Pick the side, the symbol, the magic number and whether the position is in profit or in loss. The script lists what matches, shows the floating result and asks before it changes anything.

Close By Filter confirmation box

The confirmation box: what will be closed and the floating result

What it does

  • Filters by side (buys, sells or both), symbol (this chart or all symbols), magic number (any, manual trades only, or one magic number) and result (any, only in profit, only in loss).
  • Can also delete the matching pending orders (limit, stop and stop-limit orders on the chosen side). Pending orders are deleted first, so none can fill while the positions are being closed.
  • Shows a confirmation box with the number of positions and orders and the current floating result (profit + swap).
  • Checks the filters again just before each close, because prices move while the box is open.
  • Finds each position by its position ID, so a ticket change during the run does not cause a wrong report.
  • Never sends a close twice for the same position: on a netting account a second close would open a new position the other way.
  • Retries on requotes, price changes, time-outs and connection errors, and stops at once on errors that a retry cannot fix (for example, market closed).
  • Sets the order filling mode from the symbol's own settings.
  • Reports what was closed, skipped, already gone or failed in the Experts tab. Failures, and pending orders that filled before they could be deleted, also raise an alert.

Close By Filter result

The result after the run

Inputs

Close By Filter inputs

The script's inputs

  1. Which side: buys and sells, buys only, or sells only.
  2. Which symbols: this chart's symbol only (default) or all symbols.
  3. Magic number: -1 = any, 0 = no magic number (usually manual trades), any other number = only that magic number.
  4. Profit filter: any result, only positions in profit, or only positions in loss (profit + swap).
  5. Also delete matching pending orders: false by default.
  6. Ask before closing: true by default. Set it to false only if you are sure of your filters.
  7. Maximum slippage (points).
  8. Attempts per position or order.

Notes: tick "Allow Algo Trading" on the script's Common tab, and switch Algo Trading on in the terminal. Test it on a demo account first.

Trade History Exporter - closed trades to CSV with R multiple, MAE and MFE Trade History Exporter - closed trades to CSV with R multiple, MAE and MFE

Saves your closed trades to a CSV file for your spreadsheet: one row per trade with points, costs, net result, R multiple, MAE and MFE.

Inside-Bar Outcome Tracker: Breakout Direction, Failure Rate and Time to Resolve Inside-Bar Outcome Tracker: Breakout Direction, Failure Rate and Time to Resolve

Finds every inside-bar pattern in the history of your chart and follows it to the end: which side of the mother bar broke first, whether the breakout held or failed within a few bars, and how many inside bars came before it. The histogram marks each breakout, boxes show the patterns on the chart, and a panel gives the statistics for your own symbol and timeframe, split by the number of inside bars and by the size of the mother bar, plus one line that can be pasted into a comment to compare symbols.

Gold MACD Divergence Map Gold MACD Divergence Map

MACD regular and hidden divergences on closed bars with an honest first-touch statistics panel. Not a trading signal.

Trailing Stop That Starts at the Take-Profit Level Trailing Stop That Starts at the Take-Profit Level

Starts a trailing stop when the price reaches the take-profit zone of a position you already have open. The take profit is removed, extended or kept. It never opens trades.