Spécifications
Description
==========
I need an EA to record the maximum running loss for each entry, this EA should monitor the floating loss/ profit per X minute (User options)/ until trade is close (this option can be set in EA property)
no user interface needed, pure functionality.
** If the example and fields shown below is not format properly, please refers to attached picture for better understand**
Options
======
Time to sampling: 1 = 1min, 5=5mins (Integer)
File Saving Mode: "Individual File" / "Continuous" (Pulldown Options, for "Continuous" please close the file written because we will need to read the log file when the EA still running)
Send E-Mail: "Yes" / "No" (If "Yes", look for next option input. If "No", skip the next options)
Send E-Mail Interval (30-999): 30 = 30mins, 240 = 4 hours (Minimum interval for sending email to avoid mail server to classify the email as junk. If sampling time is 5mins and Email interval is 30mins, then there will have 6 files inside 1 email)
E-Mail Address: "xxx@yyy.com" (Only valid when Send E-Mail option set to "Yes". Send the log file via email with Subject "MT4 Account (AccountID) Floating Profit/Loss Status" and attachment. Log file should be the most updated one. )
File Format
=========
Per trade log format: Order ID Order Date Order Time Symbol Buy/Sell Lot Size Entry Price Current Price S/L T/P Swap Commission Comment Total P/L Points Total P/L
File ending log format: Date Time Total P/L
Filename: AccountID_Year.Date.Time_FloatingPL.txt/csv (Individual) / AccountID_Year.Date_FloatingPL.txt/csv (Continuous, only one file date is file creation date)
Individual File per Sample Period (Example)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Order ID Order Date Order Time Symbol Buy/Sell Lot Size Entry Price Current Price S/L T/P Swap Commission Comment Total P/L Points Total P/L
168151785 2023.02.15 02:00 EURAUD+ Sell 1.02 1.53646 1.54807 1.06625 1.88 -6.12 Copy_61457303 -1161 -818.83
...
...
...
Date Time Total P/L
2023.02.16 14:00 -4812.35
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Continous (Example)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
168151785 2023.02.15 02:00 EURAUD+ Sell 1.02 1.53646 1.54807 1.06625 1.88 -6.12 Copy_61457303 -1161 -818.83
...
...
...
...
2023.02.16 14:00 -4812.35
168151785 2023.02.15 02:00 EURUSD+ Buy 1.02 1.50646 1.50807 1.06625 1.88 -6.12 Copy_61457327 -1211 -858.83
...
...
...
2023.02.16 14:05 -4872.22
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------