Is there any way? I understand the document can get enormous but I do not mind. I suppose a lot of traders would find this valuable. Thank you
Is there any way? I understand the document can get enormous but I do not mind. I suppose a lot of traders would find this valuable. Thank you
It is possible. This line will do within an Expert:
Printing (Balance:,AccountBalance(),; Equity:, AccountEquity(),; FreeMargin:, AccountFreeMargin());
I wouldn't print it, I would let MT write it into a new file that not all of the stuff is in the same file.
See the MQL manual on document management, functions are (I believe ) fopen, fwrite and fclose.Originally Posted by ;
I discovered this EA that really does something like (it displays the spreads in a CSV file). I'm not too proficient at mql if anyone could alter this I'd really be grateful. I'm sure other will find it very helpful also
https://forexintuitive.com/attachmen...9909397690.mq4
Something like this?
File PL_Margin. Csv will include the data for every tick...
It will be a huge file after some time. Should you exchange multi-currency leave the if condition out.
Inserted Code double OrdersProfit=0; int I; for( I=0; I lt; OrdersTotal(); I ) OrderSelect( I, SELECT_BY_POS, MODE_TRADES ); if ( OrderSymbol() == Symbol() ) OrdersProfit = OrderProfit(); int Handle = FileOpen(PL_Margin. Csv, FILE_CSV | FILE_READ | FILE_WRITE,;-RRB-; FileSeek(Handle, FileSize(Handle), SEEK_SET); FileWrite(Handle, AccountBalance(), AccountEquity(),AccountMargin(), AccountFreeMargin(), OrdersProfit); FileClose(Handle);