What is the syntax (in Excel) of placing Stop Loss Bracket Order?
Suppose Script "XYZ" ltp is Rs. 100.00, I want to place a Stop Loss Bracket Order at Trigger Amount Rs. 100.50, Buy Order at Rs. 101.00, Target Rs. 105.00, Stop Loss Rs. 99.00 and Trailing Stop Loss Rs. 1.00
The syntax for PlaceBO function is PlaceBO(Exch,TrdSym,Trans,Qty,LmtPrice,SqOffValue,StoplossValue,TrailingStoploss,OrdType,TrgPrice,CTag,TagAPI)
For your example, the formula will be OrdType = "SL" LmtPrice = 101.00 TrgPrice = 100.50 Sqoffvalue = 105-101 (Target - LmtPrice) Stoplossvalue = 101-99 (LmtPrice - Stoploss) =PlaceBO("NSE","XYZ","BUY",1,101.00,4.00,2.00,1.00,"SL",100.50,"LONG","LONG")
The syntax for PlaceBO function is
PlaceBO(Exch,TrdSym,Trans,Qty,LmtPrice,SqOffValue,StoplossValue,TrailingStoploss,OrdType,TrgPrice,CTag,TagAPI)
For your example, the formula will be
OrdType = "SL"
LmtPrice = 101.00
TrgPrice = 100.50
Sqoffvalue = 105-101 (Target - LmtPrice)
Stoplossvalue = 101-99 (LmtPrice - Stoploss)
=PlaceBO("NSE","XYZ","BUY",1,101.00,4.00,2.00,1.00,"SL",100.50,"LONG","LONG")
Refer API doc for all functions and syntax.
Thanks for reply.