Hi Guys,
Im having an intermittent(gota love those ones) with an EA and a DLL ive written. The EA runs on 5 different pairs, but the information passed to the DLL is essentially the same allbeit different actual values.
The problem im having is that data from one pair is being picked up by the EA on another pair. For example, i send in to the EA data to calculate the correct LotSize, if they are run individually then they work fine, sometimes when i run them all together, they all end up with the same lotsize.
I read somewhere on here that when accessing a single DLL like this from multiple charts, you are actually sharing the same memory space, which was the conclusion i reached, its almost like random as to which one writes the data i need into the array to be picked up by the DLL. Oh on that point im using pointers. here is the DLL declaration:
#import "xxx.dll"
bool f1 (string& arr1[10], double& arr2[40], double& rates1[2000][6], double& rates2[2000][6]);
double f2 (string& arr1[10], double& arr2[40], double& rates1[2000][6], double& rates2[2000][6]);
am i correct in my idea of what the problem is, if so, is there any reasonable workaround other than duplicating the DLL for each pair?
thanks in advance
Im having an intermittent(gota love those ones) with an EA and a DLL ive written. The EA runs on 5 different pairs, but the information passed to the DLL is essentially the same allbeit different actual values.
The problem im having is that data from one pair is being picked up by the EA on another pair. For example, i send in to the EA data to calculate the correct LotSize, if they are run individually then they work fine, sometimes when i run them all together, they all end up with the same lotsize.
I read somewhere on here that when accessing a single DLL like this from multiple charts, you are actually sharing the same memory space, which was the conclusion i reached, its almost like random as to which one writes the data i need into the array to be picked up by the DLL. Oh on that point im using pointers. here is the DLL declaration:
#import "xxx.dll"
bool f1 (string& arr1[10], double& arr2[40], double& rates1[2000][6], double& rates2[2000][6]);
double f2 (string& arr1[10], double& arr2[40], double& rates1[2000][6], double& rates2[2000][6]);
am i correct in my idea of what the problem is, if so, is there any reasonable workaround other than duplicating the DLL for each pair?
thanks in advance