- Requests & Ideas, the beginning
- DLL to exchange data between terminals
- Trade in mulitple accounts
simply don't use global variables in a dll, this will solve all problems. Store all you need to store in the EA itself.
If you really need the DLL to store and use bigger or more complicated objects in memory then allocate the object and return the pointer to this object to the EA and let the EA store this pointer. The pointer is a 32bit integer, it fits into an int, simply cast the pointer to int and let the EA treat it like a handle (pretend it is a handle, although it is a pointer in reality), store it in the EA and pass it to every dll function that needs it. The dll can then cast this int back into a pointer and access the object in memory.
Everything else (hashtables to hold pointers to objects, etc) would be too complicated, no additional benefit. It will never be needed to port it to anything other than i386 so this pragmatic solution is perfectly OK.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use