Limit Order Question

Back to topics list To post a new topic, please log in or register
Yellowbeard 2014.06.24 15:06

I would like to be able to place a Limit order at a specific price, and then when the order is placed, put another limit order at the previous price.  I know how to open and close trades, but haven't worked with Limit orders.  Does anyone have ideas on how I would accomplish this?


drazen64 2014.06.24 16:59 #

Limit orders are placed same way you place trades - with OrderSend(). Difference is only in second parameter of OrderSend() where you specify type of order you want to send.

For example: 

int ticket=OrderSend(Symbol(),OP_BUYLIMIT,1,price,3,stoploss,takeprofit,"My order",16384,0,clrGreen);


 Of course, you must take care that parameters are correct for selected order type.


Back to topics list  

To add comments, please log in or register