//+------------------------------------------------------------------+ //| Graph_HTML.mqh | //| Copyright © 2018, Amr Ali | //| https://www.mql5.com/en/users/amrali | //+------------------------------------------------------------------+ #property copyright "Copyright © 2018, Amr Ali" #property link "https://www.mql5.com/en/users/amrali" #property version "1.000" #property description "Display interactive HTML graph of the account balance inside the web browser." #property strict #include //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ string htm_file="" "" "" " " " " " Balance Report" " " "" "" " " " " " " " " "
" " " " " "" ""; //+------------------------------------------------------------------+ //| Creates 'HighCharts' balance report on trades in .html format | //+------------------------------------------------------------------+ void CreateHighChartsBalanceReport(const string FileName="Graph.htm") { CFileTxt file; //--- file.Open(FileName, FILE_WRITE|FILE_COMMON); file.WriteString(htm_file); //--- file.Open("exdat.txt", FILE_WRITE|FILE_COMMON); file.WriteString("var dat1=[\n"); //--- //--- Sort history profits by close time double Profits[][2]; int cnt=0; for(int i=0; i=6) { ArrayResize(Profits,++cnt,1000); Profits[cnt-1][0] = OrderCloseTime()*1.0; Profits[cnt-1][1] = OrderProfit()+OrderCommission()+OrderSwap(); } ArraySort(Profits); //--- double Balance=0; for(int i=0; i