[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 108

 
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?
 
ScioMe:

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;
}

 
Namely, the variables i,true,price_low
 
Reshetov:
Before comparing double numbers, they must be normalised using NormalizeDouble()

Thank you very much! It took me a day and a half!
 
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?
Look at this article on MQL5 forum.
 
The EA uses several copies of the same indicator, but with different parameters. How to delete a certain copy? And 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.
 
Put the advisor out there, let's see. Keep the dollar :D