Is there any way to keep a record of these on every tick? I know the file can get huge but I don't mind. I guess a lot of traders would find this valuable. Thanks
Margin Levels and Margin Calls 21 replies
Margin/Free Margin/Equity 11 replies
Margin/Margin calls based on equity? 5 replies
difference between Usable Margin and Used Margin 9 replies
Understanding Margin and Margin Calls 0 replies
double OrdersProfit=0; int i; for( i=0; i < 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, ";"); FileSeek(Handle, FileSize(Handle), SEEK_SET); FileWrite(Handle, AccountBalance(), AccountEquity(),AccountMargin() , AccountFreeMargin(), OrdersProfit); FileClose(Handle);