Guarda come scaricare robot di trading gratuitamente
Ci trovi su Twitter!
Unisciti alla nostra fan page
Script interessante?
Pubblica il link!
lasciare che altri lo valutino
Ti è piaciuto lo script? Provalo nel Terminale MetaTrader 5
Librerie

XlsxWriter: Excel .xlsx files from MQL5 without DLL - libreria per MetaTrader 5

Mohamed-amine Baddir
Mohamed-amine Baddir
Sviluppo Expert Advisor per MetaTrader 5 e li testo correttamente prima che tu li utilizzi per fare trading.
Cosa faccio:
- Trasformo la tua strategia, il tuo script TradingView o le tue regole scritte in un Expert Advisor MT5 pulito
Visualizzazioni:
86
Pubblicato:
\MQL5\Include\ \MQL5\Scripts\
codebase_1_deals.png (146.42 KB)
Freelance MQL5 Hai bisogno di un robot o indicatore basato su questo codice? Ordinalo su Freelance Vai a Freelance

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.