Select Page

Quantity from Stoploss (Qty from SL): Calculated only for LE/SE signals. For LX/SX signals, we take qty based on the last LE/SE signal send (regardless they are complete or not; Bridge does not check for NetPos here)
->RoundLotSize: for EQ segment should be given as 1
->Risk is user-defined points Eg. 3000

Calculate Quantity dynamically from Stoploss (Qty by SL)

       ->It takes StopLoss from Signal values, it should be provided correctly.
ID,Type,Symbol,OrderType,TrigPrice|StopLoss|Target,Price,Qty,InstrumentName,StrategyTag

        ->Example: When the signal is received in SBIN with 3000 risk, 2 rs StopLoss and RoundLotSize= 1, Bridge will place an order with quantity 1500.

       ->Example (for testing): When the signal is received in SOUTHBANK with 2 risk, 0.10 rs StopLoss and RoundLotSize= 2, Bridge will place an order with quantity 20.


->Qty= int(Risk/(StopLoss*RoundLotSize) )*RoundLotSize.

However, if you try to use Qty by SL by sending Stoploss = 0 in Signal, it will give the error “Attempted to divide by zero”. Also as per the above formula, a valid StopLoss is required in Signal to send a valid quantity.

Also, as per the above example, the round lot size should be a minimum of 1 for EQ (Cash).