Modifying a pending order with a buy stop or sell stop

Posted By: Murmurs

Modifying a pending order with a buy stop or sell stop - 08/23/16 17:15

How do I:

- Cancel a pending trade
- Modify the buy stop (or sell stop) for a pending trade

For exitTrade() and cancelTrade(), the manual doesn't seem to provide explicit examples.

For exitLong() or exitShort(), apparently you can't target a particular trade.
Posted By: jcl

Re: Modifying a pending order with a buy stop or sell stop - 08/24/16 09:23

If many trades are open at the same time, the easiest way is a for(open_trades) loop that identifies your pending trade and closes it or changes its entry price.
Posted By: Murmurs

Re: Modifying a pending order with a buy stop or sell stop - 08/24/16 16:37

Actually, through testing, I verified that calling exitTrade() with the TRADE* pointer will cancel the pending order.
© 2024 lite-C Forums