Pedro Sanchez:
";"
";"
It looks like you are writing both IN and OUT deals.
If you want closure only, I think you need to only write OUT deals - the code would be something like this:
string inOrOut = EnumToString( ENUM_DEAL_ENTRY(HistoryDealGetInteger(ticket, DEAL_ENTRY))); if(StringFind(inOrOut, "OUT") >= 0) FileWrite(csvHandler,ticket, ",", entry, ",", sl, ",",pro, ",",com);
Also I changed the delimiters to commas - easier to load into excel
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
Since I am not satisfied with the format MT5 exports the trade history to excel, I wanted to create my own with my custom format.
Now, while the following function works as expected, getting the trades for the current day, it seems to be retrieving both orders and deals, but I would be interested only in the deal, like the so called "closed position" in MT4.
I think in this case the Metaquotes team has made a horrible work overcomplicating all this stuff positions orders deals....in comparison to MT4....
Anyway, any help pointing out fixes would be appreciated: