LucaMQL4

Good evening, I would like to ask you if you can make the following code in mql4, as I can not program it myself. The function is: "after X bars exit the first opening in profit". Sorry for my bad english.Thank you, I hope you can help me.