[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 305

 
ed3sss:

Hello.

Could you please tell me if the operator OrdersTotal() actually counts all open orders or those belonging to the symbol assigned to the Expert Advisor?

If it is general, how can we calculate only EURUSD if there are open orders for USDCHF etc.?

Thanks.

if (OrdersTotal()>0)
{  for (int i=OrdersTotal()-1; i>=0; i--)
   {  if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) // выбираем тип ордера для дальнейшей обработки
      {  if (OrderSymbol()!=”EURUSD”) continue; // обрабатываем ордера только по EURUSD
      ...
      }
   }
}
 
tried to decompile an EA from EX4 to MQ4 - nothing worked, what does it cost, and who will do it?
 
Andrey-F:
tried to decompile an EA from EX4 to MQ4 - nothing worked, what does it cost, and who will do it?
It is not good to steal someone else's stuff. It is unethical to hack the work of your colleagues and ask such questions here.
 
artmedia70:
It's not nice to steal someone else's work. It is unethical to hijack the work of your colleagues and ask such questions here.


It is unethical for me to write for American rubles and send my own property in encrypted form
 
Andrey-F:

it is not good for me to write for American roubles and send my own property in encrypted form
This (and other aspects of authorship) must be negotiated during the discussion of your application. You have authorship of the strategy (if you yourself have created it from the beginning to the end), the programmer has authorship of his code (if he wrote it himself). All such things and such like should have been discussed beforehand.
 
Andrey-F:

It's not good for me to write for American roubles and send my own property in encrypted form


Write to the PM. If the code is indeed written to your TOR, I will try to help. Although, if the code was written by some perverted type, with bribery, I will not mention an example, you can not understand the code even in the source. So maybe you'd better learn to write your own code. Yes more time, but at least you will understand what's going on, not just change external variables, if they exist...

P.S. The thing is, I almost don't have them, so to speak, from the point of view that they are used most often. My mindset is such that everything works in harmony without optimisations and tweaks.

 
hoz:


Write to the PM. If the code is indeed written to your TOR, I will try to help. Although, if the code was written by some perverted type, bent on bribery, I will not mention an example, you will not understand the code even in the source. So maybe you'd better learn to write your own code. Yes more time, but at least you will understand what's going on, not just change external variables, if they exist...

P.S. The thing is, I almost don't have them, so to speak, from the point of view that they are used most often. My mindset is to make everything work in harmony without optimisations and tweaks.

Victor, you don't need externs, you need to debug in the tester, in the demo! Do you really write in such a way that you don't need to edit anything? I agree that stability is needed in your TS, but it's impossible not to tweak the parameters, unless, of course, the market tweaks them, i.e., you programmed them with feedback! Then you're already a great ace! Congratulations!
 

Hi all, I need your help!

Let's say we open a Buy position.

We have to make a condition: if the opening price of the position(say 1.2222) is lower than the closing price of the next bar (say bar 1.3333), we will close the position. Then we close on the first profitable bar.

I tried to do this: if (OrderOpenPrice()<Close[1]) {...} But it doesn't work, how can I do it?

 

Hi!

Folks, can you tell me if MT4 has the ability to select the history by a certain date? For example, at the moment my Expert Advisor needs the history from April 17 at 10:00, and tomorrow I will need it only from April 22. At the same time, for the OrderHistoryTotal to select the history only from the specified dates (configuration through selecting a specific date in the "history of the account" is not suitable).

Or is this only possible in MT5?

 
cursed:

if the opening price of the position (say 1.2222)

if (Open[0]...
cursed:

is lower than the close price of the next bar (close bar 1.3333)

<Close[1])...
cursed:

then close the position.

OrderClose(...);

That, no?

artmedia70:
It's not nice to steal someone else's stuff. It's unethical to hijack the work of your colleagues
To each his own, of course. I'm writing a robot and I'm getting so much out of it that I can't tell you in words. I have begun to understand the true value of all those indicators and advisers that people search for "free download". And if I complete it, I won't post it or sell it, because I am eternally sorry for my code, nerves and time spent on it, because people will never appreciate HOW bloody it was given to me. Non-programmers will never understand what it means to climb up the wall and howl, but you do it. For them the code is a chinese alphabet, while the programmers are some mythical bespectacled and generally unfit people who understand it. And the fact that they don't understand it at first is beyond their understanding, beyond their laziness.

Here's a question. When can I NOT use FileFlush?

Reason: