how to store a Bid Ask price when condition hits? - page 2

 
My requirements for a custom bool function source code Mql4. I want a function that will return
true when the bid price reaches a predetermined target(from starting point)(when program start the 
Bid price is Starting Point), such as 20 pips, without any reversalsfrom starting point. If the bid
price does reverse, even by a single pip, the function should return false and the starting point
should be the current Bid Price and recalculated starting again from new starting point.
 
@faisal ahmed #: My requirements for a custom bool function source code Mql4. I want a function that will return true when the bid price reaches a predetermined target(from starting point)(when program start the 
Bid price is Starting Point), such as 20 pips, without any reversals from starting point. If the bid price does reverse, even by a single pip, the function should return false and the starting point should be the current Bid Price and recalculated starting again from new starting point.
  • Usually people who can't code don't receive free help on this forum.
  • If you show your attempts and describe your problem clearly, you will most probably receive an answer from the community. Use the CODE button (Alt-S) when inserting code.
  • To learn MQL4 programming, you can research the many available Articles on the subject, or examples in the Codebase, as well as reference the online Documentation.
  • If you do not want to learn to code, that is not a problem. You can either look at the Codebase if something free already exists, or in the Market for paid products (also sometimes free). However, recommendations or suggestions for Market products are not allowed on the forum, so you will have to do your own research.
  • Finally, you also have the option to hire a programmer in the Freelance section.
Trading applications for MetaTrader 5 to order
Trading applications for MetaTrader 5 to order
  • 2023.12.20
  • www.mql5.com
The largest freelance service with MQL5 application developers
 
faisal ahmed #:
My requirements for a custom bool function source code Mql4. I want a function that will return
true when the bid price reaches a predetermined target(from starting point)(when program start the 
Bid price is Starting Point), such as 20 pips, without any reversalsfrom starting point. If the bid
price does reverse, even by a single pip, the function should return false and the starting point
should be the current Bid Price and recalculated starting again from new starting point.

I suggest that you look up codebase, which is one of Fernandos' suggestions; and then search for trail stops. After that just modify the code to suite your needs.

In fact: search for Ronz in codebase. It has exactly what you requested. a bool function.
Reason: