**Tempestshade:**

Hello,

I currently have an EA that opens a max of 1 buy and 1 sell. It currently opens trades on bar-open only, however, at the moment it closes intrabar by using a set TP and SL.

I am looking at converting the system to a 100% bar open only system yet and confused about how to go about it. I understand the theory in that I need to select each order, and compare their pip profit vs the given TP and SL and if it exceeds or is equal to it close the trade at bar open.

I am new to coding in MQL5 and was wondering if anyone could help me with this and perhaps give me an example of how this would be completed. I tried looking at the documentation but it doesn't seem to be as clearly laid out as the MQL4 documentation.

Thanks for all the help,

David

Hello David. Instead of Documentation, I think you should take a look at the Code Base?

There you can find several examples of how to implement any functionality inside Expert Advisors.

If you don't find anything interesting, maybe you could share parts of your code with us, so we could try to help you somehow.

Hello,

I currently have an EA that opens a max of 1 buy and 1 sell. It currently opens trades on bar-open only, however, at the moment it closes intrabar by using a set TP and SL.

I am looking at converting the system to a 100% bar open only system yet and confused about how to go about it. I understand the theory in that I need to select each order, and compare their pip profit vs the given TP and SL and if it exceeds or is equal to it close the trade at bar open.

I am new to coding in MQL5 and was wondering if anyone could help me with this and perhaps give me an example of how this would be completed. I tried looking at the documentation but it doesn't seem to be as clearly laid out as the MQL4 documentation.

Thanks for all the help,

David