[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 325

 
You need to see the code to answer. Positions opened manually have a magic 0, if you set 0 in the EA, then it should work with them. But for orders opened by third party EAs, which have a magic number other than 0, it all depends on the code of the helper. This may or may not be the case. For example, if the magician is set to 0, all positions will be closed.
Try it on demo, you will see for yourself in half an hour.
 
drknn:

g_ibuf_100 && g_ibuf_108 && g_ibuf_116 && g_ibuf_124 - Variables are declared as double and you have logical "AND" in the condition. What do you think the formula (1,2525 && 1,2320) will return?


I'm surprised at people who unscrupulously ask for help to call a decompiled indicator from a decompiled EA exactly here - where there's a high probability of meeting a copyright owner))

Where the moderators are looking...

 
Thank you very much. I am posting the EA, just in case. I did not mean the orders opened by other EAs, but the ones I opened or placed by myself. So I have a puzzle for you. Will my EA close pending orders if I have written in the code only open and close conditions for Sell and Buy. In other words, I will have to add functions and conditions to close pending orders(at least, those that triggered). If there are no conditions to set pending orders in my EA, it will not be able to close them and I will need to add functions to set and open such orders. Or maybe I'm not thinking correctly, tell me how to deal with this situation.
Files:
mt_terminal.mq4  14 kb
 
alsu:


I am amazed at people who unscrupulously ask for help to call a decompiled indicator from a decompiled EA right here - where there is a high probability of meeting a copyright owner))

Where the moderators are looking...

Moderators, in their spare time, are trying to monitor the decompilation, but in this case, the whole code is not laid out, and it is difficult to make a decision based on quotes.

To ksyusha-Z:
Judging by the author's description, the helper is not designed to work with pending orders and to finish such a job, to put it mildly, it will be difficult, given that the author's DLL is used.
 
granit77:


to ksyusha-Z:
Judging by the author's description, the helper is not designed to work with pendants, and it would be hard to finish such a job, to put it mildly, considering that the author's DLL is used.

I understand what I wanted to know, thank you again.
 
(Close[0] + Distanse * Point)>=mag //Сам додумался ...Правда не много огорчен тем что людей которые готовы выделить одну минуту внимания на этом форуме ,становятся все меньше и меньше .
 
alsu:


I am amazed at people who unscrupulously ask for help to call a decompiled indicator from a decompiled EA right here - where there is a high probability of meeting a copyright owner))

Where the moderators are looking...


The point is that it's not a decompiled EA but an indicator... The indicator works well so I'm trying to attach it to my EA... I would have done better than to criticize it (for example, the indicator does not work well)) I would rather help than criticize what I don't really have...
 
ostrik:

The thing is, it's not a decompiled EA but an indicator... The indicator works well so I'm trying to attach it to my EA and nothing more... I would have done better than to criticize it (for example, the indicator does not work well)) I would rather help than criticize what I don't really have...
Mr. Ostric. What is the difference between an indicator and an EA in terms of copyright, labour and intellectual property of the programmer? Attach it to the Expert Advisor by iCustom() and you will not violate any rights. And you won't look bad in the eyes of the majority of participants of this forum, to put it mildly...
 
odiseif:
(Close[0] + Distanse * Point)>=mag 
// Сам додумался ...
// Правда немного огорчен тем, что людей, которые готовы выделить одну минуту внимания на этом форуме, становятся все меньше и меньше .

By yourself is the best practice...

Have you noticed that this question no longer confuses you? And what's best for you? What do you think? :)

You, simply put, did you an invaluable service for your own rapid development, and you ...

Now I can tell you how to compare real numbers:

int dg=MarketInfo(Symbol(),MODE_DIGITS);
if (NormalizeDouble((Close[0] + Distanse * Point)-mag, dg)>=0) {
   // ... код, если условие истинно ...
   }

It's the same as yours, only the values are normalized to the digits of a given symbol.

 
artmedia70:

If your EA can only open a maximum of three Buy and three Sell positions and each of these positions has its own magic,

then you need to make a function to select an order by its magic number:

Now if you need to select a Buy order on the current chart with magic 1001, then call this function like this:


Thank you for the full information, I will try and do:)

Thank you very much again!

Reason: