Questions from Beginners MQL5 MT5 MetaTrader 5 - page 676
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Good evening, how do I make the Alert ring as long as I want it to, not just when it comes on.
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
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 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 be opened when the current price is higher say 10 points or lower than the price at which the crossing occurred.
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 )))) 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.
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 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 services ... what prevents you from doing that?