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

 
How do you find the maximum element in the first dimension of a four-dimensional array?
 
lottamer:


Here is the problem.

everything works, but only ONE time. I.e. if I set the period (iTime (NULL, PERIOD_D1, 0)) of a day, it does not work on the next day.

What do you know about "function return value"? Have you ever heard of "default parameters passed to the function"?

    double ld_Profit = GetProfitFromDateInCurrency (Symbol(), -1, -1, iTime (NULL, PERIOD_M1, 0));  

    if  (ld_Profit < 1 && ld_Profit > -1) // смысл этих условий мне неведом
    { My_buy ();  My_close(); }

I am disappointed by your level of knowledge and do not see your desire to improve it (your help through the forum is the way to earn money "through the stall")... :(((

 
TarasBY:
What do you know about "function return value"? Have you ever heard of "default parameters passed to the function"?

I am discouraged by your level of knowledge and do not see your desire to raise this level (your request for help through the forum is the way to earn money "through the stall") ... :(((


No, no, my knowledge level is increasing. But it's improving "in a cluster" way, not systematically. Because I'm not a programmer and I'm not engaged in programming. I am a trader, and I am solving only practical tasks that are in front of me at this particular moment.

There is no practical need to learn the whole MQL language, because I, personally, will never need most of it, and it will take me YEARS! And I may not have enough talent for the whole language :))

I don't think that MQL has only one application - trading, so don't accuse us of focusing more on trading than on programming :) The reason is that there are many of us, who are "begging" in some way, but not because they don't want to do anything at all. This is because there are moments when they are completely deadlocked. And you can't do without help here... Although I personally write most of the code myself, and kill an immeasurable amount of time.... and you could just buy the whole code!

so, sorry again for not reaching your level :))

PS. If I earn a million, I will definitely share it with everyone who helped me write my EA here :))

 
TarasBY:
What do you know about "function return value"? Have you ever heard of "default parameters passed to the function"?



it's working! Thank you! Although you gave me the code is not in pristine form! and only my knowledge gained on this forum, allowed me to get this piece to work:)))) so all for a reason!
 
Vinin:

If you remove RefreshRates(), the history will still swap. For this purpose, it's enough that the tool is opened in market review andrefers to time-series.


Hm. I understand that the fewer instruments in the "Market Watch", the faster the data will be updated! This is also an important point.

If you don't need any exclusive tools, of which there are several hundred, you can keep a dozen and everything will be much faster!

 
Chiripaha:

: )))))))) (no notation... and no comment)

Of the two, the questioner and the answerer, it is more likely that you, the questioner, do not quite understand what happens to the pending orders when they are triggered. A pending order is executed at ANY price closest to it. The rule of thumb for a pending order is if the price has reached it, the trade will go into the market. And the price will be irrelevant.


Actually, in the documentation, more precisely here:

https://docs.mql4.com/ru/trading/OrderSend

Said:

If the requested price is out of date, but is still in the price flow, the position is opened at the current price and only if the current price falls into theprice+-slippagerange.

So if the difference between the stated opening price and the current market price for a given instrument is greater than the slippage, then it is the kitchen's fault, not the opening tolerance...

 
Integer:


See the article about the simulation quality indicator - https://www.mql5.com/ru/articles/1486

For maximum quality, there should be minutes in the story throughout the test section.


there are minutes as far back as 2011! it can be seen on the minute chart.

parameters: all ticks, M1 period.

And the simulation quality is still 25%.

So what's the problem then?

 
hoz:


Hm. I understand that the fewer instruments in the "Market Watch", the faster the data will be updated! This is also an important point.

If you don't need any exclusive instruments, of which there are several hundred, you can keep a dozen and everything will be much faster!


You are good at making conclusions. Too bad you're digging in the wrong direction.
 
Vinin:

You're good at drawing conclusions. Too bad you're digging in the wrong direction.


Why in the wrong direction? Regarding the fact that we were digging the topic after your comment, it was only a purely personal interest, to make sure in practice in the subject you're looking for. I didn't have any confidence in you, don't think so!

 
hoz:


Why not? As for the fact that we've been dropping the subject after your comment, it was only a purely personal interest, to be convinced of the subject in practice. There was no lack of trust, don't think so!


What do you want to find out? All the answers have already been given. Both right and wrong.