It is easy to place order with stop loss and take profit on IBridgePy

Many traders like to manage the risks to their positions by attaching a stop loss order (S/L order) and a take profit order (T/P order) to the main order. If the security rises to the take-profit point, the T/P order is executed and the position is closed for a gain. If the security falls to the stop-loss point, the S/L order is executed and the position is closed for a loss.  The difference between the market price and these two points helps define the trade’s risk-to-reward ratio. The benefit of using S/L order and T/P order is that the trader doesn’t have to worry about manually executing a trade or second-guessing themselves.
Placing orders with stop loss and take profit points becomes very easy on IBridgePy
Three convenient functions are available now:
For example:
a trader wants to place a market order to buy 100 shares of SPY, a ETF to track S&P 500 index, assuming the current market price is $283.16. The trader is willing to take a profit of %10 ($311.47) and wants to limit the loss less than 5% ($269.00)

The following code will place a market order to buy 100 shares of SPY with a stop loss point of $269.oo and a take profit point of $311.47. Then, the trader’s account will have a position of 100 shares of SPY.

orderId = place_order_with_stoploss_takeprofit(symbol('SPY'), 100, 269.00, 311.47)
When the real time price of SYP raises above $311.47, a limit order of $311.47 will be placed to close the position and realize 10% profit. In the opposite situation, a stop order of $269.00 will placed to close the position and limit the loss at %5.
Please contact with us at IBridgePy@gmail.com for any questions

 

Leave a Comment