DislikedHi, Sometimes it would be very useful to use the same data between mql programs. I know that we can use global variables but that is only for a single double value. What if we wanted to access an array of double values. Is there any way that we could create an array in an EA and pass it to a dll, have the dll procees the array and then an indicator pick up the address of the pointer and access the same array? I am just trying to think outside the box here. Cheers, JohnIgnored
- You can send messages between MQL programs - in the same or in different terminals - with QuickChannel. You can send whatever you want as long as it's serializable. For example a pointer. The MQL framework uses this technique.
- You can store integer values in the window object of a chart. This way MQL programs in the same chart can exchange data. For example a pointer. The MQL framework uses this technique.
- You can store stringified values of all types directly in the chart. Another way for MQL programs in the same chart to exchange data. For example a pointer. The MQL framework uses this technique.
- You can store data sent by one MQL program in the DLL statically, and access it from another program in the same terminal. Tricky as you have to handle possible synchronization issues but possible. The MQL Expander uses this technique.
- Finally you can use shared memory. I don't use this technique.
PS: QuickChannel is the recommended and preferred approach to handle all kind of MQL communication. Easy to setup and super fast.