artmedia70>>: Друзья! Подскажите как определить что цена пересекла определённый уровень снизу-вверх, либо сверху-вниз, дабы при происшествии сего факта открыться ? Используя именно цену, а не индикаторы. Спасибо, кто откликнется...
artmedia70 писал(а)>> How can you tell if the price has crossed a certain level upwards or downwards, in order to open when it has happened? I use the price, not the indicators. Thanks for the reply...
Then the problem may be rephrased as "did the second line (bar) cross the first one (level)". Then we can define the direction of the line by the line coordinates and calculate the crossing by the equation of lines.
Has anyone already made a function that can determine that the last open pose is at a loss by N-number of points set programmatically by me? I've tried different kim's functions, but they turn out too cumbersome, taking into account further conditions and calculations... I would like to do it more elegantly, with one function. Maybe someone has an idea? Thank you.
если представить, что "уровень" - прямая, а пересекает ее не цена( точка, по сути), а бар, то можно представить бар в виде второй прямой. тогда можно перефразировать задачу в вид "пересекла ли вторая прямая(бар) первую прямую(уровень)". тогда можно задать направление прямой по координатам прямой, а расчитать пересечение - по уравнению прямых.
Thanks, but I think IgorM's example above would be more interesting for my particular case, but thanks for the fresh idea... :)
artmedia70>>: Кто-нибудь делал уже функцию, которая может определить, что последняя открытая поза находится в убытке на N-нное кол-во пунктов, задаваемых программно мною? Чёт ковырял кимовские функции разные, слишком громоздкими получаются конструкции с учётом дальнейших условий и расчётов... Хотелось бы как-то поизящнее, одной функцией. Иль может мысль какая у кого есть? Спасибо.
And here's one last thing and a follow-up: Igor Kim has a library of functions called b-Lots.mqh. It's used in some of the codes listed here on this resource. I always thought I had all Igor's libraries, but no... it's the one I'm completely missing. And the worst thing is that I can't find it anywhere. Even a search didn't help me and his personal site... If anyone knows where this miracle of elusiveness can be found, I'd be very grateful... :)
Yes, of course, that's exactly what it's called... How could I have overlooked it, when I used it myself as recently as two or three days ago in another strategy by the same expert... You need more sleep and rest... :)
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Друзья! Подскажите как определить что цена пересекла определённый уровень снизу-вверх, либо сверху-вниз, дабы при происшествии сего факта открыться ? Используя именно цену, а не индикаторы. Спасибо, кто откликнется...
How about this?
price2 = price1; // сохраним предыдущее значение цены price1 = Ask; if ((price1 =>controlprice)&&( price2<controlprice)) Alert("Цена = ", price 1," пробой снизу!!!"); if ((price1 <= controlprice)&&( price 2> controlprice)) Alert("Цена = ", price1," пробой сверху!!!");How can you tell if the price has crossed a certain level upwards or downwards, in order to open when it has happened? I use the price, not the indicators. Thanks for the reply...
Then the problem may be rephrased as "did the second line (bar) cross the first one (level)". Then we can define the direction of the line by the line coordinates and calculate the crossing by the equation of lines.
Здрасти ...
может так?
Maybe someone has an idea?
Thank you.
если представить, что "уровень" - прямая, а пересекает ее не цена( точка, по сути), а бар, то можно представить бар в виде второй прямой. тогда можно перефразировать задачу в вид "пересекла ли вторая прямая(бар) первую прямую(уровень)". тогда можно задать направление прямой по координатам прямой, а расчитать пересечение - по уравнению прямых.
Кто-нибудь делал уже функцию, которая может определить, что последняя открытая поза находится в убытке на N-нное кол-во пунктов, задаваемых программно мною? Чёт ковырял кимовские функции разные, слишком громоздкими получаются конструкции с учётом дальнейших условий и расчётов... Хотелось бы как-то поизящнее, одной функцией.
Иль может мысль какая у кого есть?
Спасибо.
OrderProfit() is called
Igor Kim has a library of functions called b-Lots.mqh. It's used in some of the codes listed here on this resource. I always thought I had all Igor's libraries, but no... it's the one I'm completely missing. And the worst thing is that I can't find it anywhere. Even a search didn't help me and his personal site...
If anyone knows where this miracle of elusiveness can be found, I'd be very grateful... :)
OrderProfit() называется
You need more sleep and rest... :)