명시
1. Order Request
To develop a script (as described below) to produce a MT5 (and MT4) report.
Source code to be provided and sole copyrights to be held by EBLA Society (source code owner).
2. Terms & Definitions
Most terms used in this document are based on MT5 terminology.
Etha - EBLA Trading History Analysis report
THR - MT4/5 Trade History Report.
3. Script Description
EBLA Trading History Analysis (Etha) report is a script for downloading (in a csv format for use in Excel) of the trading history.
The universal script can:
· Generate reports on both MT4 and MT5 platforms:
o Version MT4
o Version MT5
· Run on both hedging and netting accounts
· Incorporate input screen to change the report parameters
· Generate a downloadable csv file
· Report the trading activity (current and historic) of any financial symbol (forex, CFD, futures, cryptocurrencies) on any timeframe (M1, H1, M15).
Etha Reports Generated & Exported
The script uses the existing MT4/5 Trade History Report (THR) as a baseline; and includes additional fields, not generated by the standard THR.
The Etha script generates separate reports for the following sections:
- · Positions (closed)
- · Orders
- · Deals
- · Open positions
- · Working orders
- · All (all the above).
4. Terms to Use
Report Naming and Location
The Etha report can be launched by dragging the script from the navigator to any chart.
A file will be created with the filename:
- · Account number_Account type_Date[YYYYMMDD HHMMSS]_Report type[eg. All].csv.
The file will be stored in the folder:
- · Terminal > File > Open data folder > MQL5 > Files > EBLA Society > Etha MT4/5 Reports.
Etha Script Report Settings
· Separator – the separator to be used to separate the fields in Excel (either comma or point):
o Comma: 0,00
o Point: 0.00
· Separator line – use visual separators in the report
· Symbol
o If empty, the entire available history is downloaded
o Symbols separated by dashes (-) are used to download the orders for a specific list of symbols (eg: USDCAD-Gold-BTCUSD)
· Magic Number – unique numbers used by Expert Advisors. Manual orders use a 0
o If empty, all magic numbers will be included in the download
o Magic numbers separated by dashes (-) are used to download a orders for a specific list of magic numbers (eg: 2401-6002)
· Comments – text field populated either manually or automatically by Expert Advisory
o If empty, no filter and all comments are included in report
o Comments separated by dashes (-) are used to download the orders that include specific text within the comment field (eg: FIK-SIB-RON)
· Sections – as per MT Trade History Report sections
o If empty, no filter and all sections are included in report
o Sections separated by dashes (-) are used to download the orders that include specific report sections (eg: Positions-Open Positions)
· Start Time – select the beginning time of the report period
· End Time – select the end time of the report period
5. Report Fields (see attached csv file)
# | Field | Example | Description | Values |
1 | Line # | 8 | Report line unique identifier | 1, 2, 3, 4,… |
2 | Record Type | P | Section heading | P (position), O (order), D (deal), L (live/open positions), W (working orders) |
3 | RTID | PO | Section sub-heading | PO (position out), OI (order in), OO (order out), DI (deal in), DO (deal out), LI (live position in), WI (working order in) |
4 | Entry | Entry Out | Direction of transaction | Entry In (OI/PO, DI, WI, LI), Entry Out (OO, DO) |
5 | Exit Result | Loss | Label result as either Profit or Loss | Applies to records where Record Type = PO, DI or, LI. Profit (where Profit>0), Loss (Profit<0), Zero (Profit=0), [BLANK] for all other records |
6 | 1_OI | 3832227 | Fetch OI-UID related to this record | Order In unique ID ticket number |
7 | 2_OO | 3853436 | Fetch OO-UID related to this record | Order Out unique ID ticket number |
8 | 3_DI | 15815141 | Fetch DI-UID related to this record | Deal In unique ID ticket number |
9 | 4_DO | 15875728 | Fetch DO-UID related to this record | Deal Out unique ID ticket number |
10 | Magic | 2404 | Fetch Magic number for this record | As per EA |
11 | P_IN Comment | FIT | Fetch Comment from OI for this record | As per MT5-THR |
12 | P_OUT Comment | [SL 0.64118] | Fetch Comment from OO for this record | As per MT5-THR |
13 | P_Balance DO | 1530,75 | Fetch Balance from DO for this record | As per MT5-THR |
14 | Vol # | 0,01 | Numeric value of volume | As per MT5-THR |
15 | Market Price | 0,64118 | Fetch current Price related to this record | As per MT5-THR |
16 | Pending Price | 0,64239 | Fetch OI Price related to this record | As per MT5-THR |
17 | Entry Price | 0,64239 | Fetch PO Price1 related to this record | As per MT5-THR |
18 | OO Price | 0,64118 | Fetch OO Price related to this record | As per MT5-THR |
19 | Exit Price | 0,64119 | Fetch PO Price2 related to this record | As per MT5-THR |
20 | Entry SL | 0,63512 | Fetch OI SL related to this record | As per MT5-THR |
21 | Entry TP | 0,65693 | Fetch OI TP related to this record | As per MT5-THR |
22 | Exit SL | 0,64118 | Fetch PO SL related to this record | As per MT5-THR |
23 | Exit TP | 0,65693 | Fetch PO TP related to this record | As per MT5-THR |
24 | Open Date | 43714 | Variant of Time1 | Format: Date Serial Number |
25 | Open Time | 0,530069444 | Variant of Time1 | Format: Time Serial Number |
26 | Open Date Time | 43714,53007 | Variant of Time1 | Format: Add Date + Time Serial Number |
27 | Open Year | 2019 | Variant of Time1 | Format: Year[YYYY] |
28 | Open Month | 9 | Variant of Time1 | Format: Month[MM] |
29 | Open Day | 6 | Variant of Time1 | Format: Day[DD] |
30 | Open Weekday | 5 | Variant of Time1 | Format: Weekday[1-7] |
31 | Open Week | 36 | Variant of Time1 | Format: Week[WW] |
32 | O-YYYYMM | 201909 | Variant of Time1 | Format: Year Month[YYYYMM] |
33 | O-YYYYWW | 201936 | Variant of Time1 | Format: Year Week[YYYYWW] |
34 | O-YYYYWW-MMDD | 201936_0906 | Variant of Time1 | Format: Year Week-Month Day[YYYYWW-MMDD] |
35 | Close Date | 43718 | Variant of Time2 | Format: Date Serial Number |
36 | Close Time | 0,570810185 | Variant of Time2 | Format: Time Serial Number |
37 | Close Date Time | 43718,57081 | Variant of Time2 | Format: Add Date + Time Serial Number |
38 | Close Year | 2019 | Variant of Time2 | Format: Year[YYYY] |
39 | Close Month | 9 | Variant of Time2 | Format: Month[MM] |
40 | Close Day | 10 | Variant of Time2 | Format: Day[DD] |
41 | Close Weekday | 2 | Variant of Time2 | Format: Weekday[1-7] |
42 | Close Week | 37 | Variant of Time2 | Format: Week[WW] |
43 | C-YYYYMM | 201909 | Variant of Time2 | Format: Year Month[YYYYMM] |
44 | C-YYYYWW | 201937 | Variant of Time2 | Format: Year Week[YYYYWW] |
45 | C-YYYYWW-MMDD | 201937_0910 | Variant of Time2 | Format: Year Week-Month Day[YYYYWW-MMDD] |
46 | Time1 | 2019.09.06 12:43:18 | As per MT5-THR | |
47 | Position | 3832227 | As per MT5-THR | |
48 | Symbol | NZDUSD | As per MT5-THR | |
49 | Type | buy | As per MT5-THR | |
50 | Volume | 0.01 | As per MT5-THR | |
51 | Price1 | 0,64239 | As per MT5-THR | |
52 | S / L | 0,64118 | As per MT5-THR | |
53 | T / P | 0,65693 | As per MT5-THR | |
54 | Time2 | 2019.09.10 13:41:58 | As per MT5-THR | |
55 | Price2 | 0,64119 | As per MT5-THR | |
56 | Commission | 0 | As per MT5-THR | |
57 | Swap | 0 | As per MT5-THR | |
58 | Profit | -1,2 | As per MT5-THR |