Questions from Beginners MQL5 MT5 MetaTrader 5 - page 676

 
Movlat Baghiyev:
Good evening, how do I make the Alert ring as long as I want it to, not just when it comes on.
To upload the alert sound for as many minutes as you want and insert the sound instead of the alert sound.
 

how to find the price at which the crossover occurred? That is, I need to open a deal not at the moment of MA crossing, but, say, 10 points after the crossing.

The function if you can show please

 
Movlat Baghiyev:

how to find the price at which the crossover occurred? That is, I need to open a deal not at the moment of MA crossing, but, say, 10 points after the crossing.

The function if you can show please

Well, it depends on what is crossed with what. But in general: if there is a crossover, then if the price is above/below the MA by, say, 10 pips, then open a trade.
 
Artyom Trishkin:
Well, it depends on what the crossover is. But in general: if there is a crossover, then if the price is above/below the MA by, say, 10 pips, then open a trade.
Good evening, Artem ... Here are two muwings with periods of 3 and 5 crossed and it happened at a price. And the deal should open when the current price is higher say 10 points or lower than the price at which the crossing occurred ...
 
Movlat Baghiyev:
Good evening, Artem ... Here are two muwings with periods of 3 and 5 crossed and it happened at a price. And the deal should be opened when the current price is higher say 10 points or lower than the price at which the crossing occurred.
Judging by the description, you want to do it on the current bar. Then at the moment of fixing the crossover of two MAHs you memorize the price in the variable. And then you compare the current price with the stored one. As soon as the difference between the compared values becomes larger or equal to the necessary distance in points, you should consider that you have found the necessary criterion for opening a deal.
 
Artyom Trishkin:
From your description, you want to do this on the current bar. Then at the moment of fixing the intersection of two MAs you memorize the price in the variable. And then you compare the current price with the memorized one. Once the difference between the compared values is greater than or equal to the necessary distance in points, you should consider that you have found the necessary criterion for opening a deal.
I know that )))) I have not found such a function in the code ...
 
Movlat Baghiyev:
I know )))) Thank you very much ... I did not find such a function in the code on the net.

Do you have to search only? This seems to be a forum for traders and programmers.

A non-programmer is unlikely to ask such questions. But a programmer, even a beginner, can write such a simple algorithm and package it into a function.

Have you tried to write it? Is there something that fails you? If so, please show the code and what you can't get. If you just want someone to write for you, then order it in freelance - it will cost you a penny.

Just not very clear why you ask for an algorithm and immediately ask for the code - it means you are trying to write. But what you are trying to write, what code you get, they didn't show.

 
Artyom Trishkin:

Do you have to search only? This seems to be a forum for traders and programmers.

A non-programmer is unlikely to ask such questions. But a programmer, even a beginner, can write such a simple algorithm and package it into a function.

Have you tried to write it? Is there something that fails you? If so, please show the code and what you can't get. If you just want someone to write it for you, then order it in freelancing - it will cost you a penny.

It's just not very clear why you are asking for an algorithm and immediately ask for the code - it means you are trying to write. But you didn't show me what you are trying to write, what code you get.

I am writing as a construction set ... I use various pieces of code that are in the public domain and assemble EAs for myself out of them ...
 
Movlat Baghiyev:
I write like a construction set ... I use various pieces of code that are in the public domain and assemble expert advisers for myself using them.
But at the same time you order some freelance work ... what's stopping you now?
 
Artyom Trishkin:
But at the same time you order some freelance services ... what prevents you from doing that?
I'll explain ... I gather the functions I need about 5-6 that I couldn't find on the web and then I order an EA (as if I invent it), so these functions may be present there and finally I get the functions I need - all at once ... And now I just do not have time to fill up my wallet on Mcl .
Reason: