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

Export Closed Trades to CSV with a summary per magic number - MetaTrader 5용 스크립트

Northern Lights
Northern Lights
트레이더이자 Dojiwave 브랜드로 출시한 MetaTrader 5용 RiskDeck의 개발자입니다. 계좌가 살아남을지를 결정하는 부분, 즉 포지션 크기, 손절, 손실 한도를 위한 도구를 만듭니다. 모든 버전은 Market에 올라가기 전에 MetaTrader 5 데모 계좌에서 테스트합니다. 질문이나 오류 신고는 여기로 메시지를 보내 주세요. 보통 영업일 기준 하루 안에 답변드립니다.
조회수:
45
평가:
(1)
게시됨:
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

The History tab in MetaTrader 5 lists deals and orders, not trades. This script rebuilds each closed trade from its deals and writes one row per trade to a CSV file you can open in Excel, LibreOffice or Google Sheets.


Inputs

  • Period: This month, Last month, This year, All history or Custom. A trade counts in the period by its close time.
  • Custom period: From and To. A To date with no time includes that whole day.
  • Symbol: one symbol or empty for all symbols.
  • Magic number: one magic number or -1 for all trades.
  • Column separator: comma, semicolon or tab.

File 1: ClosedTrades_<login>_<period>.csv

One row per closed trade: OpenTime, CloseTime, Symbol, Type, Volume, OpenPrice, ClosePrice, StopLoss, TakeProfit, Commission, Swap, Fee, Profit, NetProfit, Magic, Comment, CloseReason, PositionTicket.

File 2: ClosedTradesByMagic_<login>_<period>.csv

One row per magic number and one row for all trades: Magic, Trades, Wins, Losses, NetProfit, GrossProfit, GrossLoss, LargestLoss, LongestLosingStreak, WinRatePct.

How to use

  1. Copy ExportClosedTrades.mq5 to the MQL5\Scripts folder and compile it in MetaEditor.
  2. Drag the script onto any chart, set the inputs and press OK.
  3. The Experts tab shows where both files were saved and how many rows each has. To find them, use File > Open Data Folder > MQL5\Files.

Notes

  • A trade closed in parts is one row. Its exit price is the average of the exits, weighted by volume.
  • Open positions are not exported.
  • Files are UTF-8 with a BOM. Prices and money use a decimal point.
  • The script only reads the account history. It doesn't place, change or close orders.
  • If the terminal isn't connected, the journal says so, because the history may be incomplete.
  • If a file is open in another program, the script can't overwrite it and writes the reason to the journal.
Account Recorder - balance, equity and day drawdown to CSV every minute (service) Account Recorder - balance, equity and day drawdown to CSV every minute (service)

A service that writes your balance, equity, floating result, margin and the drawdown from today's highest recorded equity to a CSV file every minute. Runs without a chart and never trades.

GotobiDays - include file to find Gotobi days (Japanese payment dates) GotobiDays - include file to find Gotobi days (Japanese payment dates)

Include file with small functions to find the Gotobi days: the 5th, 10th, 15th, 20th, 25th and the last day of each month, moved back to the previous business day when they fall on a weekend or a holiday you list. Information only, no trading functions.

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

MACD Signals MACD Signals

Indicator edition for new platform.