Your "strategy" is explained at a very high level. Achieving it in MQL5 code requires many lines of code, especially if you are using tick data instead of OHLC bar data.
It seems that you have not yet reached a sufficient level of MQL coding skill that will allow you to understand any answer we give you.
May I suggest that you hire someone in the Freelance section to code it for you and you then study their code to understand how it is done?

- 2022.08.23
- www.mql5.com
Your "strategy" is explained at a very high level. Achieving it in MQL5 code requires many lines of code, especially if you are using tick data instead of OHLC bar data.
It seems that you have not yet reached a sufficient level of MQL coding skill that will allow you to understand any answer we give you.
May I suggest that you hire someone in the Freelance section to code it for you and you then study their code to understand how it is done?
Thank you for your reaction, but I don't have the money to pay these freelancers,
I know that here in this forum there are experts, extremely intelligent people who can solve this problem, that's why I launched my problem here.
On this forum, there may be "experts, extremely intelligent people who can solve this problem", but that does not mean we are going to code it for you for free,
If you put in the effort to learn for yourself, and show your attempt and request only guidance from us, then that will be welcomed, but we will not be coding it for you.
I wish all the best on your journey!

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I want to code a function that takes a trade if the current price goes up one or more ticks,
but when it goes down a trick it takes the position directly.
As you can see from the illustration in the attached image.
If Current Price < Lowest price { if Current Price goes down even one tick { Tack a SELL } }