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

XlsxWriter: Excel .xlsx files from MQL5 without DLL - MetaTrader 5용 라이브러리

Mohamed-amine Baddir
Mohamed-amine Baddir
  • MT5 developer: gold and index EAs, testing tools 에  Independent MQL5 developer
  • 모로코
  • 2301
금과 주가지수용 MetaTrader 5 EA, 그리고 제가 직접 검증에 쓰는 테스트 도구를 개발하고 판매합니다.
EA
조회수:
421
평가:
(1)
게시됨:
\MQL5\Include\
XlsxWriter.mqh (14.43 KB) 조회
\MQL5\Scripts\
codebase_1_deals.png (146.42 KB)
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

XlsxWriter.mqh writes real Excel workbooks (.xlsx) from MQL5. It needs no DLL and no Excel on the computer: the file is a zip of Office Open XML parts, stored without compression, with a CRC-32 for each part.

The workbook written by ExportDealsToXlsx.mq5, opened in Excel

Features

  • Several sheets in one workbook
  • Text, numbers and dates; dates are real Excel dates, so they sort and filter correctly
  • Bold header row, frozen, with filters on every sheet
  • Column widths
  • 8 number formats: date-time, date, month, money, integer, price (5 decimals), percent, 2 decimals
  • Unicode text (UTF-8)
  • Works in scripts, Expert Advisors and in the Strategy Tester (write to FILE_COMMON in OnTester)

Usage

#include <XlsxWriter.mqh>

CXlsxSheet sheets[1];
string headers[] = {"Time", "Symbol", "Profit"};
double widths[]  = {19, 12, 12};
sheets[0].Init("Trades", headers, widths);

sheets[0].BeginRow();
sheets[0].Time(TimeCurrent());
sheets[0].Text("EURUSD");
sheets[0].Number(12.5, XS_MONEY);
sheets[0].EndRow();

CXlsx book;
book.Save("trades.xlsx", 0, sheets);   // MQL5\Files\trades.xlsx

Example

The script ExportDealsToXlsx.mq5 writes the deals of the account history to the sheet Deals and the result of each trading day to the sheet Daily. Put XlsxWriter.mqh in MQL5\Include and the script in MQL5\Scripts.

The files were checked by opening them in Microsoft Excel.

Failed Breakout Detector Failed Breakout Detector

Marks breakouts of the recent trading range and the breakouts that fail (price closes back inside within a few bars). Closed bars only, alerts, buffers for iCustom.

Prop Firm Guard - daily loss and max drawdown protection Prop Firm Guard - daily loss and max drawdown protection

Closes all trades and blocks new ones when your prop firm daily loss or maximum drawdown limit is reached.

Order Blocks and Breaker Blocks (SMC) - no repaint, with mitigation and alerts Order Blocks and Breaker Blocks (SMC) - no repaint, with mitigation and alerts

Marks the order block behind each break of market structure (the last opposite candle before the move), tracks when it is used and turns failed blocks into breaker blocks. No repaint. Alerts and buffers for EAs.

ICT Kill Zones - Asian, London, New York in New York time, with summer time ICT Kill Zones - Asian, London, New York in New York time, with summer time

ICT kill zones (Asian, London, New York, London Close) at the right New York hours on any broker, with US and EU summer time. High / low boxes, levels until price takes them, midnight open. Alerts and buffers for EAs.