Hi all! Does anyone have any ideas on how to record all trade profits/losses for an expert advisor? I believe I can use "double" datatype and arrays to record all profit/losses, but I am looking for other more efficient ways to record large quantities of this specific data. Thanks!
- Open trade based on specific time in the current price?
- How to use toolbox so it shows profit / loss on closed trades?
- getting a record of all the signs generated by a EA
Use an array or a few arrays.
Hi Simon! Thanks sir :)
Heres code taken from the codebase program TradeNewsEA. The code seeks the end of a file and writes the string to the file stamping it with the date and time.
int Write(string str) { int handle; handle = FileOpen(filename,FILE_READ|FILE_WRITE|FILE_CSV,"/t"); FileSeek(handle, 0, SEEK_END); FileWrite(handle,str + " Time " + TimeToStr(CurTime(),TIME_DATE|TIME_SECONDS)); FileClose(handle); }
Ickyrus:
Thank you much Ickyrus! :)
Heres code taken from the codebase program TradeNewsEA. The code seeks the end of a file and writes the string to the file stamping it with the date and time.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register