Forum

Sockets - Random receive timeout

Hello, i've been fighting for two weeks with a very strange network problem. I've wrote a DLL to use sockets with my EA wich connects to a remote server and then starts sending out every price update. No problem at this stage. Since i'd like the EA to work even with the strategy tester , i've

CPositionInfo update after a storeState

Hi all, i'm using a CPositionInfo Obj to store my position with the storeState and then check it later for updates with checkState. How can i tell to the Obj to sync again with the server? At the moment i've replaced a plain class obj with a pointer so i delete and create the CPositionInfo every

Expert Advisor Shutdown

Hi All, Is there a way for an Expert Advisor to terminate itself? At the moment i'm using a workaround: since i've written a DLL i've created a function inside wich just throws an Exception. In this way the terminal blocks the further execution of the EA but don't really terminate it ( and anyway

Using DLL in MQL, somethingh misterious

Hi all, i'm here after a lot of hours spent on my pc attempting to understand how the import of DLL works with structures. Some months ago i've easily created a class to interface my EA with MySql server using libmysql.dll without finding any difficult, since all functions uses a common mysql

Error in ArrayDouble.mqh Resize Method

I've found a bug in the CArrayDouble class. In method Resize(int size), the new size formula is wrong causing the value to be smaller than the requested value: new_size = m_step_resize * ( 1 + ( size - Available() ) / m_step_resize); The red text should not exist otherwise some functions like

!PRECISION ERRORS IN DIVISION!

Hi. i'm experiencing a very strange problem with division between doubles. If i try do divide a double just rounded via MathRound by 10, often i obtain a precision error: Ex: 879.0 / 10 = 87.9000000001 980.0 / 10 = 97.9999999999 164.0 / 10 = 16.4 Nothing wrong in multiplication (1.10 * 10 = 11.0