How to place pending orders?

 

Hi all!

I want to know how I can place pending orders when the price makes a "double bottom / high". I was looking at the structure of MqlTradeRequest, but there are some things that I do not understand. What is the offset for?

I understand that I must put an expiration time for the order, but what happens if the conditions are met after that time? How can I manage that?

I attach an image to explain what I want to do.


Beforehand thank you very much!!

Reason: