How to set take profit orders right after the buy or sell order (STP broker constraint) ??? Thanks

 

I am looking for help to find the code to set a TP just after the buy or the sell order. In fact, because of the broker I can't open the order with the TP or stop loss.

However, I managed to that for the SL with the trailing and the modify order but doens't work with the TP

Please Help me!!

Thanks

 
nicolas15:
However, I managed to that for the SL with the trailing and the modify order but doens't work with the TP
Then post the code
 

Look in the Code Base, recent addition:

MACD Sample EA Updated (Author: BarrowBoy) ... also now handles ECN/STP brokers...

Reason: