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

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

Mohamed-amine Baddir
Mohamed-amine Baddir
MetaTrader 5용 Expert Advisor(EA)를 개발하고, 실제 거래에 사용하기 전에 충분히 테스트합니다.
제가 제공하는 작업:
고객의 전략, TradingView 스크립트 또는 문서화된 규칙을 깔끔한 MT5 Expert Advisor로 구현
기존 EA 수정 및 문제 해결: % 기준 리스크 포지션 사이징, 트레일링 스톱, 세션 및 시간 필터, 스프레드 필터, 멀티 심볼 포트폴리오, 드로다운 보호 기능
조회수:
86
게시됨:
\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.