Help with exit

 

Hi,

Can somebody give me a hint how to program an exit on the first profitable open price?

After long or short the EA should check on every new open price if it is profitable or not and to close the trade if profitable.

Thanks!

 
deepcalm:

Hi,

Can somebody give me a hint how to program an exit on the first profitable open price?

After long or short the EA should check on every new open price if it is profitable or not and to close the trade if profitable.

Thanks!

For each new bar,  new open price,  select your open Order and check it's OrderProfit(),  if it's positive,  OrderClose()