SL/TP on OrderSend

To add comments, please log in or register
Fabio Cavalloni
923
Fabio Cavalloni  

Hello,

I'm testing a lot of EA in this period and often I observed that SL/TP values are not respected if setted in OrderSend function. Maybe I have to set a SL of 20 pips but, when order will be created, often it differs from 20 pips. I think that this happens because I check multiple time to ASK/BID... for order price, order sl, order tp and between them that value can change. Also I have to set my SL (for a BUY) using Bid-sl*points but in this way spread will not be considered.

Now I'm thinking about creating order without SL/TP, then after it is created, using its ticket to find it and set SL/TP based on OrderOpenPrice()+sl*point or OrderOpenPrice()-tp*point.

In this way I can achieve always right values for my stops levels.

What do you think about? Someone use the same approach as me? Do you see any negative consequence in doing creation/setting sl-tp in different steps?

Thanks to all!

To add comments, please log in or register