Select Page

Quantity from Exposure (Qty from Exposure): Exposure means the order value with which you want to take a position. Also you can calculate it only for LE/SE signals. Also for LX/SX signals, qty is taken based on the last sent LE/SE signal (regardless they are completed or not; Bridge not checks for NetPos here).

How to calculate Quantity dynamically from Exposure (Qty by Exposure)


->User can define Exposure Eg. 10000.
->RoundLotSize for EQ segment should be as 1.
->you can take Price from Signal: eg. 255.00.
ID,Type,Symbol,OrderType,TrigPrice,Price,Qty,InstrumentName,StrategyTag.
->Example: When the signal is received in SBIN with 10000 exposure, at 255.00 prices and RoundLotSize= 1, Bridge will place an order with quantity 39.ย 

->Example (for testing): When the signal is received in IDEA with 200 exposure, at 11.00 price and RoundLotSize= 2, Bridge will place an order with quantity 18.ย 
->Qty= int(Exposure/(Price*RoundLotSize) )*RoundLotSize.

NOTE: In conclusion as per the above example, the round lot size should be a minimum of 1 for EQ (Cash). If you provide 0, Bridge will show you error messages: Attempted to divide by 0.

๐Ÿ“ Trading in Baharampur?
We provide custom strategy coding for all charting tools. Discover APIBridgeยฎ in Baharampur →
×

๐Ÿš€ Need Custom Strategy Coding?

Get your TradingView (PineScript), AmiBroker (AFL), Python, or Excel logic coded by certified AlgoJi experts.

Need Strategy Coding?
×

Need Coding or Setup Help?

Connect instantly with AlgoJi algorithmic trading & strategy developers.