Download MetaTrader 5

Scaling out with Limit Orders

To add comments, please log in or register
Ingvar Engelbrecht
4506
Ingvar Engelbrecht  

A bit confused.

I want to scale out from a position

So I place a Buy order for 0.4 lots with SL set but no TP.  No problem there

Then I want to take half off after 300 pips.

trade.OrderOpen("EURUSD",ORDER_TYPE_SELL_LIMIT,0.2,limit_price,price,sl,tp,ORDER_TIME_GTC,0,NULL)

Assume I got filled at 1.33000. and want to get out with half 1.33300

sl and tp is not of interest so I put them as zero. So I have two price parameters "price" and "limit_price"

Made a few tries but I always get back "invalid price".

And sometimes I read that the limit out price should be a distance and other it is the actual limit out price.

Please enlighten me.

Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Order Properties
Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Order Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Trade Constants / Order Properties - Documentation on MQL5
Alain Verleyen
Moderator
32027
Alain Verleyen  
ingvar_e:

A bit confused.

I want to scale out from a position

So I place a Buy order for 0.4 lots with SL set but no TP.  No problem there

Then I want to take half off after 300 pips.

trade.OrderOpen("EURUSD",ORDER_TYPE_SELL_LIMIT,0.2,limit_price,price,sl,tp,ORDER_TIME_GTC,0,NULL)

Assume I got filled at 1.33000. and want to get out with half 1.33300

sl and tp is not of interest so I put them as zero. So I have two price parameters "price" and "limit_price"

Made a few tries but I always get back "invalid price".

And sometimes I read that the limit out price should be a distance and other it is the actual limit out price.

Please enlighten me.

To add comments, please log in or register