I tried to write a DLL in C#. It contains a static function. I import the lib and description of the function into MQL. When using MQL it says "cannot call function". I looked at the sample code in С++, the functions are declared there in a different way. Here's the problem. How to force the call of a function in a DLL, written in C#? Is it possible?
I'm trying to compare the SAR parabolic, the current one and the previous one. But it doesn't work, I've been struggling for a day. Why doesn't this code work?
Before comparing double numbers, they must be normalized using NormalizeDouble()
I looked at the code of SAR-parabolic, I don't understand a thing!!!!
Let's say, here is the function SaveLastReverse(i,true,start,price_low,last_high,ep,sar); and it has parameters in brackets, which are not prescribed in it, that is, inside nothing is assigned to anyone, as I read here void SaveLastReverse(int last,int dir,double start,double low,double high,double ep,double sar) { save_lastreverse=last; save_dirlong=dir; save_start=start; save_last_low=low; save_last_high=high; save_ep=ep; save_sar=sar; }
idx: I tried to write a DLL in C#. It contains a static function. I import the lib and description of the function into MQL. When using MQL it says "cannot call function". I looked at the sample code in С++, the functions are declared there in a different way. Here's the problem. How to force the call of a function in a DLL, written in C#? Is it possible?
Hi !!! Guys can't seem to solve the problem ... Here's the gist here's my piece of code int total=OrdersTotal(); int b=0; int a=0; int n=0; for (int r=total-1; r>=0; r--) { if(OrderSelect(r, SELECT_BY_POS, MODE_TRADES)) { if(OrderSymbol()==symvol1) { b++; Alert("b",b); } if(OrderSymbol()==symvol2) { a++; Alert("a",a); } if(OrderSymbol()==symvol3) { n++; Alert("n",n); } } }
but orders still get in the way The goal is for advisor to work only with those orders on charts which it is attached to... Please help me for a second week ..........
Can you please tell me what to do to make the EA perform all actions exactly the opposite? I would be eternally grateful for your advice and $1 for your wallet, thanks in advance.
I'm trying to compare the SAR parabolic, the current one and the previous one. But it doesn't work, I've been struggling for a day. Why doesn't this code work?
I looked at the code of SAR-parabolic, I don't understand a thing!!!!
Let's say, here is the function SaveLastReverse(i,true,start,price_low,last_high,ep,sar); and it has parameters in brackets, which are not prescribed in it, that is, inside nothing is assigned to anyone, as I read here void SaveLastReverse(int last,int dir,double start,double low,double high,double ep,double sar)
{
save_lastreverse=last;
save_dirlong=dir;
save_start=start;
save_last_low=low;
save_last_high=high;
save_ep=ep;
save_sar=sar;
}
Before comparing double numbers, they must be normalised using NormalizeDouble()
Thank you very much! It took me a day and a half!
I tried to write a DLL in C#. It contains a static function. I import the lib and description of the function into MQL. When using MQL it says "cannot call function". I looked at the sample code in С++, the functions are declared there in a different way. Here's the problem. How to force the call of a function in a DLL, written in C#? Is it possible?
Here's the gist
here's my piece of code
int total=OrdersTotal();
int b=0;
int a=0;
int n=0;
for (int r=total-1; r>=0; r--)
{
if(OrderSelect(r, SELECT_BY_POS, MODE_TRADES))
{
if(OrderSymbol()==symvol1)
{
b++;
Alert("b",b);
}
if(OrderSymbol()==symvol2)
{
a++;
Alert("a",a);
}
if(OrderSymbol()==symvol3)
{
n++;
Alert("n",n);
}
}
}
but orders still get in the way
The goal is for advisor to work only with those orders on charts which it is attached to...
Please help me for a second week ..........