Forum

How to get my last order profit?

I want to get the last order profit,but HistoryDealGetDouble gets the last order profit is still zero. input long order_magic= 55555 ; int OnInit () { //--- create timer EventSetTimer ( 60 ); //--- return ( 0 ); } void OnTimer () { //--- static ulong recdd= 0 ,tmprecdd= 0

Why are different the OHLC prices in MQL4 from MQL5 at the same time?

I find the OHLC prices in MQL4 are different from MQL5 at the same time? For example: Which prices are ture in fact? Thank for any help in advance

How to the id:5002 problem of FileOpen?

My Code as follow: int OnInit() { //--- string filename="D:\\MYDATA.CSV"; int filehandle=FileOpen(filename,FILE_READ|FILE_WRITE|FILE_CSV|FILE_ANSI,','); if(filehandle<0) { Print("Failed to open the file by the absolute path ",filename); Print(" Error code ",GetLastError());