Interactive Brokers (India)

VXP

New Member
#51
Just for record keeping, IB uses different symbology and here is the webpage that enlists it all for NSE,

IB Products & Exchange | Interactive Brokers LLC

It appears that the maximum length of IBKR Stock symbols for NSE is 9. If a NSE Stock symbol has more than 9 characters IBKR retains first 9 characters and truncates the remaining. Secondly if any NSE Stock symbol contains "&" in it IBKR simply omits it.
 

G007

New Member
#54
Define Exchange volume?



The above TV chart is Exchange volume!
And below TWS chart is not!
Is that what you mean?

Please work with chart scales before judging...
Hello CougarTrader, Thank you for the reply.

1st screenshot is from fyers for nifty dec fut on 5 min time frame, which is 100 percent correct, while 2nd picture is from tws for same symbol on same timeframe(nifty dec fut on 5 min),its not about chart scale, volume displaying in tws is incorrect, we can observe difference in volume in 1st five or six candles for example see volume for 1st candle.Here i am talking only for volume data, price data is same in both.

I have selected native volume option in tws(display>ticker row) which should be more accurate. Its not a big issue but the volume in tws is not 100 percent correct. I have talked with customer support, they said its the only data feed which they get from the exchange(NSE).

Please inform me if i am missing something in tws. Also the datafeed in tws is from real trading account.

(The above screenshots are from 22 dec)
 

CougarTrader

Well-Known Member
#55
1st screenshot is from... which is 100 percent correct
Nobody's data is 100% accurate; the chart in the 1st screenshot is of TradingView (TV) whose API is being simply used in the web-based frontend UI of the Broker that you are referring-to...

Brokers outsource to other vendors for charting, APIs, OMS, RMS etc. and for other features/technology. Most of our broker+vendor ecosystem often fails because of either lack of infrastructure or of no proper tech-synergy in place. Often resulting to mass login issues, order not getting placed/modified, etc... list goes on especially on volatile days....

In contrast to our local disarray, IB exhibit paramount stability. They partner with Global Financial Information Services (gfis.info) for Market Data.... GFIS is known to cater data quotes for all major markets across all continents of the planet... For NSE India Data Subscriptions they do not charge anything...

Even NSE won't have 100% accurate data given cumulative hand-transfer of both Off-Market and On-Market transactions....

Also more datapoints does not mean accurate... there are several layers of extraction, assumption, algorithms in place to present the data to you!

Having this said, instead of thinking too much, you can rely on any NSE authorized data vendor.... NSE throws about 350MB of quotes per second... everybody captures a chunk of this, including TV or GFIS or anyone else....

We do not live in a perfect world!
 
Last edited:

VXP

New Member
#56
CougarTrader... Can you post screenshots of your Options and Combos Presets? Since different stocks have different lot sizes and prices, is there any way to make a single Global Preset configuration for all of them or we need to make separate Ticker specific configuration which means more than 175 Presets for Options and Combos? Thanks in advance.

On a side note, I have noticed that if the option quantity is more than 100 then the Breakeven calculated by the Performance Profile is incorrect.
 
Last edited:

CougarTrader

Well-Known Member
#57
Since different stocks have different lot sizes and prices, is there any way to make a single Global Preset configuration for all of them or we need to make separate Ticker specific configuration which means more than 175 Presets for Options and Combos?
First of all 95% of NSE Stock Options are Illiquid. Specifically for derivatives, my advise would be instead of looking for Trade signals everywhere, it is better to laser focus on handpicked ones, basis liquidity, volatility, and other stats...

Now to answer your question! No, you do not need to create presets for each one of them, if you wish to preset for large number of tickers...

User discretion is once again advised !!! YOU ARE DISCOURAGED TO DO THIS IF YOU DO NOT KNOW WHAT YOU ARE DOING !!!

IBKR settings are stored here in this file - "C:\Jts\<long alphabet identifier like "epakf......gil">\tws.xml"

Path might vary depending your installation location. Take a backup of the XML before modifying anything. Don't worry! Even if you screw-up, you would need to re-install TWS... set things up from scratch... that's all... :)

Now you need a XML parser, using your programming language preference, you need to dynamically insert below <OrderDefaultNode></OrderDefaultNode> for each of your Tickers with its corresponding symbol as "Ticker Symbol", ArString string as "Ticker Symbol", defSize as "Lot Size" and other preset as you deem fit...

XML:
<OrderDefaultNode>
    <OrderDefault varName="element" side="0" useClosePositionSizeFirst="false" useCumulativeSizeForMarketDepth="true" preferSmart="false" useDefaultAmt="false" strategy="false" active="false" useRemainingTicketSize="true" defaultDisplaySizeTo50PercOfSize="false" defaultDestination="true" hedgeOrderOffsetType="false" version="19" defSize="5700" sizeInc="#" rfqSize="5700" orderOrigin="7" blotterPrecautionTypeFT="0" blotterPrecautionTypeFDR="0" blotterPrecautionMultiplierFT="1" blotterPrecautionMultiplierFDR="1" numOfTicks="20" numOfTicksFT="0" numOfTicksFDR="0" cashQtyEstimateFactor="25" expandedStrategyLastUse="0" timestamp="1641715709298" trailingOffset="1.0" hedgeOrderOffset="0.01" hedgeOrderPctOffset="0.0" closeCurrencyOffset="0.01" rebalanceCashOffset="0.01" defaultAmt="0.0" defaultCryptoBuyMktAmount="0.0" relativeOffset="0.01" sizeDivisor="0.0" roundingThreshold="0.0" useForUSSTKOnly="false" pegMidOffsetsDistance="0.005" percentCheck="3" percentCheckFT="3" percentCheckFDR="3" timeInForce="DAY" hedgeOrderType="1" orderType="2" ticketOrderType="1" closeCurrencyOrderType="1" rebalanceCashOrderType="1" bookTraderSizeMultipliers="1,2,3,5" secType="OPT" symbol="TATAMOTORS" trailingUnit="0">
        <startTime></startTime>
        <endTime></endTime>
        <ArString varName="secDefs">
            <String>TATAMOTORS</String>
        </ArString>
        <Fraction varName="preciseDefSize" numerator="#" denominator="0" isANum="false" simplified="true"/>
        <Attributes varName="attribs">
            <OpenCloseAttrib val="C"/>
            <TriggerMethod>
                <TwsEnum type="jfix.FixTriggerMethod" varName="val" val="0"/>
            </TriggerMethod>
            <TouchedTrigger val="1.0" allowZero="false"/>
            <CommissionPolicy>
                <TwsEnum type="jfix.FixCommissionPolicy" varName="val" val="0"/>
            </CommissionPolicy>
        </Attributes>
        <OCAType varName="ocaType" fixString="ReduceOnFillNonBlock"/>
        <AlgoExchangeSettings varName="algoExchangeSettings">
            <AlgoAttributePresetMap varName="algoAttributeMap"/>
        </AlgoExchangeSettings>
        <defaultQuantityType>Shares</defaultQuantityType>
        <OdPrimaryOrder varName="odPrimaryOrder" reverseBidAsk="true" initComponentSize="#" subComponentSize="#" priceIncrement="#" profitTaker="#" restoreSize="false" adjustedOrderType="-1" adjustedTrailingAmount="#">
            <PriceTypeQuantityUnit varName="limit" quantity="0.0" unit="0" useParentOrdPrc="false">
                <priceType>Ask</priceType>
                <priceTypeExt>Ask</priceTypeExt>
            </PriceTypeQuantityUnit>
            <PriceTypeQuantityUnit varName="priceCap" quantity="0.0" unit="0" useParentOrdPrc="false">
                <priceType>None</priceType>
                <priceTypeExt>None</priceTypeExt>
            </PriceTypeQuantityUnit>
            <PriceTypeQuantityUnit varName="stop" quantity="1.0" unit="0" useParentOrdPrc="false">
                <priceType>Limit</priceType>
                <priceTypeExt>Limit</priceTypeExt>
            </PriceTypeQuantityUnit>
            <PriceTypeQuantityUnit varName="stopLimit" quantity="0.03" unit="0" useParentOrdPrc="false">
                <priceType>Stop</priceType>
                <priceTypeExt>Stop</priceTypeExt>
            </PriceTypeQuantityUnit>
            <PriceTypeQuantityUnit varName="relativeLimit" quantity="0.0" unit="0" useParentOrdPrc="false">
                <priceType>None</priceType>
                <priceTypeExt>None</priceTypeExt>
            </PriceTypeQuantityUnit>
            <PriceTypeQuantityUnit varName="touchedTrigger" quantity="-1.0" unit="0" useParentOrdPrc="false">
                <priceType>Last</priceType>
                <priceTypeExt>Last</priceTypeExt>
            </PriceTypeQuantityUnit>
            <PriceTypeQuantityUnit varName="adjustedTrigger" quantity="0.0" unit="0" useParentOrdPrc="false">
                <priceType>None</priceType>
                <priceTypeExt>None</priceTypeExt>
            </PriceTypeQuantityUnit>
            <PriceTypeQuantityUnit varName="adjustedStop" quantity="1.0" unit="0" useParentOrdPrc="false">
                <priceType>None</priceType>
                <priceTypeExt>None</priceTypeExt>
            </PriceTypeQuantityUnit>
            <PriceTypeQuantityUnit varName="adjustedStopLimit" quantity="0.0" unit="0" useParentOrdPrc="false">
                <priceType>None</priceType>
                <priceTypeExt>None</priceTypeExt>
            </PriceTypeQuantityUnit>
            <AlgorithmSleeveSettings varName="sleeveAlgoSettings">
                <AlgoExchangeSettings varName="algoExchangeSettings">
                    <AlgoAttributePresetMap varName="algoAttributeMap"/>
                </AlgoExchangeSettings>
            </AlgorithmSleeveSettings>
        </OdPrimaryOrder>
        <AttachedOrderData2 varName="attachedOrder2" orderType="-1" offset="0.0" initComponentSize="#" subComponentSize="#" priceIncrement="#" trailingAmount="#" trailingUnit="0" adjustedTrailingAmount="#" adjustedTrailingUnit="0" autoAttachStopLoss="false" autoAttachProfitTaker="false">
            <PriceTypeQuantityUnit varName="limit" quantity="1.0" unit="0" useParentOrdPrc="false">
                <priceType>Parent_Order</priceType>
                <priceTypeExt>Parent_Order</priceTypeExt>
            </PriceTypeQuantityUnit>
            <autoStop>NONE</autoStop>
            <PriceTypeQuantityUnit varName="stop" quantity="-1.0" unit="0" useParentOrdPrc="false">
                <priceType>Parent_Order</priceType>
                <priceTypeExt>Parent_Order</priceTypeExt>
            </PriceTypeQuantityUnit>
            <PriceTypeQuantityUnit varName="stopLimit" quantity="0.0" unit="0" useParentOrdPrc="false">
                <priceType>None</priceType>
                <priceTypeExt>None</priceTypeExt>
            </PriceTypeQuantityUnit>
            <PriceTypeQuantityUnit varName="adjustedTrigger" quantity="1.0" unit="0" useParentOrdPrc="false">
                <priceType>None</priceType>
                <priceTypeExt>None</priceTypeExt>
            </PriceTypeQuantityUnit>
            <PriceTypeQuantityUnit varName="adjustedStop" quantity="1.0" unit="0" useParentOrdPrc="false">
                <priceType>None</priceType>
                <priceTypeExt>None</priceTypeExt>
            </PriceTypeQuantityUnit>
            <PriceTypeQuantityUnit varName="adjustedStopLimit" quantity="0.0" unit="0" useParentOrdPrc="false">
                <priceType>None</priceType>
                <priceTypeExt>None</priceTypeExt>
            </PriceTypeQuantityUnit>
        </AttachedOrderData2>
        <modifiedByUser>TOUCHED_BY_USER</modifiedByUser>
        <presetVariant>ORDER_PRESET_SEC_TYPE_LEVEL</presetVariant>
        <AlgorithmFavoritesSettings varName="algoFavoritesSettings">
            <List varName="algoExchangeSettings" type="jsetting.ArAlgoExchangeSettings"/>
        </AlgorithmFavoritesSettings>
    </OrderDefault>
    <ListOfOrderDefaultNode varName="children"/>
</OrderDefaultNode>
1641719464478.png


Save the XML, then upload that onto TWS using:

1641719521158.png


One related thing I have noticed is that if the option quantity is more than 100 then the Breakeven calculated by the Performance Profile is incorrect.
Ideally 1 option contract = 100 units of its underlying, but in our country given stock option illiquidity, STT and many other non-correlated aspects, such as the "extravagent lot size", the equivariance never remain balanced. So, the assumptive deduction is ought to be incorrect.

To make it easy, simply (SellPrice - BuyPrice) * Qty == "bhau bhagwan che"
 
Last edited:

VXP

New Member
#58
CougarTrader... Undoubtedly you are an expert on TWS and that is the reason we look forward to you for advise on issues relating to it and you are kind enough to spare your valuable time to answer our queries.

However the solution suggested by you seems to create Ticker specific Presets in a more complicated way. If we create Ticker specific Presets from the Global Configuration it saves that information in "tws.xml" but in much simpler way. Both the methods seems to get the same results. Please correct me if I got it wrong.

First of all 95% of NSE Stock Options are Illiquid. Specifically for derivatives, my advise would be instead of looking for Trade signals everywhere, it is better to laser focus on handpicked ones, basis liquidity, volatility, and other stats...

I agree with you on this point. However I trade in a small universe of 30-40 most liquid stocks. Since I am trading in just few thousands of shares at a time the liquidity on these shares is enough for entry and exit without much slippages.
 

VXP

New Member
#59
I have one more query regarding margins on writing a covered call option. It appears that IBKR asks for full margin even on covered call writing. I tried selling covered calls from "Write Options" window as well as Options Chain windows and both of them show full short sell margins. So covered call writing doesn't seems to be viable option with IBKR?
 

CougarTrader

Well-Known Member
#60
I have one more query regarding margins on writing a covered call option. It appears that IBKR asks for full margin even on covered call writing. I tried selling covered calls from "Write Options" window as well as Options Chain windows and both of them show full short sell margins. So covered call writing doesn't seems to be viable option with IBKR?
If you do covered call as equal number of Future Contract(s) + Option Contract(s) then Exchange's margin benefit applies..

If you do with stocks, which are for overnight, for writing call options you would need full margin for writing those option contracts...
 

Similar threads