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

Close All at Total Profit or Loss (money) - MetaTrader 5용 expert

Gilberto Cardona Velez
Gilberto Cardona Velez
  • MQL4/MQL5 developer - Expert Advisors, backtests and strategy conversion 에  Laboratorio de Estrategias
  • 콜롬비아
  • 921
Laboratorio de Estrategias - MQL4/MQL5 development with tested, honest results.
SMALL JOBS FROM 30 USD (MQL5 Freelance, usually delivered in 1-3 days):
- Fixes and changes to an existing EA or indicator (source code required)
- Adapting one of my free CodeBase tools to your own rules
조회수:
443
게시됨:
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

Many traders want a simple rule: "close everything when my open trades are up X dollars in total, or down Y dollars". This utility does exactly that and nothing else. It watches the total floating profit of your positions (in account currency) and, when the target or the loss limit is reached, it closes all of them and can also delete pending orders. It never opens trades, so you can run it next to your manual trading or next to any other EA.

Inputs and logic

Inputs

  • Close when total profit >= - profit target in account currency (0 = off).
  • Close when total loss >= - loss limit in account currency, as a positive number (0 = off).
  • Positions to watch - all symbols, or only the symbol of the chart where the EA is attached.
  • Magic number - -1 watches every position, 0 only manual trades, any other value only that EA's trades.
  • Include swap - adds swap to the total.
  • Delete pending orders - also removes pending orders of the same filter when closing.
  • Stop after one close - the EA removes itself after closing, so it does not act again by surprise.
  • Max slippage (points) - deviation allowed for the closing orders.

How to use: attach it to any chart and timeframe (the symbol only matters with "Only this chart's symbol"), allow Algo Trading and set your limits. The chart comment shows the number of watched positions and the current total. The check runs on every tick and once per second, and closing is retried up to 3 times if the broker rejects an order.

Notes: the amounts are floating profit, not account equity. Commissions charged at opening are not included in the floating profit by MetaTrader. Test it first on a demo account. This is a risk tool, not a strategy: it does not promise profits. Not financial advice.

News Straddle EA Economic Calendar News Straddle EA Economic Calendar

News trading EA for Gold (XAUUSD) and forex: places a Buy Stop and a Sell Stop seconds before each release of the MT5 economic calendar, one cancels the other, stop loss, take profit and trailing in points. Open source code.

PDH PDL Sweep Levels PDH PDL Sweep Levels

Previous day high and low indicator for MT5 on Gold (XAUUSD), forex and indices: PDH, PDL, previous week high and low, day and week open, and an arrow when a closed candle sweeps a level and closes back inside. Open source code.

Trailing Stop and Break-Even Manager (points or ATR) Trailing Stop and Break-Even Manager (points or ATR)

Utility EA that moves the stop loss of positions you already have open: break-even with locked profit and trailing stop in points or ATR. It never opens trades.

Trade-Request Matrix: Regression Testing Invalid Stops, Volume and Close Errors with OrderCheck() Trade-Request Matrix: Regression Testing Invalid Stops, Volume and Close Errors with OrderCheck()

Part 4 of the regression-testing series. An Expert Advisor that builds a fixed matrix of 20 valid and invalid trade requests (stops at and inside the stops level, wrong-side stops, volume outside the symbol rules, oversized and unknown closes, unchanged and wrong-side modifications), checks each one with OrderCheck() without sending anything, and reports PASS, FAIL or INCONCLUSIVE per row with a digest you can compare between runs.