Excel Functions For Integration With “Stoxxo” Intelligent Trading Bridge

Excel Functions For Integration With "Stoxxo" Intelligent API Trading Bridge

Microsoft Excel Integration

 

Required Excel Version: MS Excel 2007 or later.

 

Now you can start trading from Excel using “Stoxxo” Intelligent API Trading Bridge Excel Plugin without any limitation on possibilities.  No programming / scripting or VBA knowledge required. Getting data in Excel and Placing / Cancelling orders directly from Excel was not as easy before.

 

After configuring the Plugin, Data / Orders functions would be available like regular Excel Functions and you can use these like Sum functions. Formula bar starts typing =IB and you can see all functions available. It executes orders without any delay.

 

Each function will describe its uses and expected parameters with details of expected value. Just follow the function intellisense and call the appropriate function. Full list of functions listed below.

 

No predefined sheet with fixed format or button provided, you can make changes in your existing sheet or you can make a new excel sheet as you like. Just needs to call the appropriate function as per your requirement.

 

With its all capabilities, you can create your own full functional trading system in excel.

 

 

Features

 

  1. Indicator Functions like SMA, EMA, RSI, VWAP etc which will give you full power of trading from excel.
  2. No limitation on possibilities, you can automate your existing strategy or can make new one.
  3. Users can use / call functions from existing sheets for Pair Trading, Technical Analysis, Option Chain Analysis etc.
  4. Can work with NSE, BSE, NFO – Future and Options, MCX – Commodities

 

 

Integration

 

“Stoxxo” Intelligent API Trading plugin for excel if very much optimized and provides you seamless integration between Excel and Stoxxo with highest possible speed. The Stoxxo plugin for Excel is very fast multi-threaded. This can handle more than 100 calls per second.

 

Please follow the below steps to integrate with the Excel.

 

  1. Click Options Button and then Select Settings and Plugin Installation.

    2. In most cases, Bridge will automatically select the Excel Installation path. If you want, you can change this path as per your Excel Installation.

    Ensure that Excel must be closed to install the plugin successfully.

    Select Excel from the Left Navigation panel, then Tick EnableMS Excel Integration 

    Ensure that Excel must be closed to install the plugin successfully.  3. Finally, Click Configure and you will get a confirmation message. Now open excel and start Typing =IB and all “Stoxxo” Intelligent API Trading functions should be listed by excel.

This step is rarely required on very limited computers.

 

    1. Open Excel Options, then Select Add-Ins as given in below screenshot.
    2. Now check for Active Application Add-ins as highlighted by orange rectangle.
    3. If you are unable to find IABExcel there then click the Go button.

A new window will open like below, there Tick IABExcel Add-In, and then click OK.

Sample Excel File

You can download Sample Excel files from https://algobaba.com

 

 

Excel Functions For Stoxxo Intelligent API Trading Bridge

Excel Functions Details.

After installing the Excel Plugin, Below given functions will be accessible from any excel file. These functions will be available on your computer only.

 

//Other Functions

  1. double IB_RoundTo5Paisa(double price);
  2. string IB_GetError(int RequestID);

 

//Mapped Order API Functions

  1. String IB_MappedOrderSimple(String SourceSymbol, String TransactionType, double SignalLTP, String StrategyTag, bool StatusInSameCell = true, bool OnlyOneOrder = true);
  2. String IB_MappedOrderMod(int SignalID, String TransactionType, String SourceSymbol, String OrderType, double TriggerPrice, double Price, int Quantity, double SignalLTP, String StrategyTag, bool StatusInSameCell = true, bool OnlyOneOrder = true);
  3. String IB_MappedOrderAdv(int SignalID, String TransactionType, String SourceSymbol, String OrderType, double TriggerPrice, double Price, int Quantity, String Target, String StopLoss, String TrailingStoploss, double SignalLTP, String StrategyTag, String ProductType, String OptionsType, bool StatusInSameCell = true, bool OnlyOneOrder = true);
  4. String IB_MappedOrderSch(int SignalID, String TransactionType, String SourceSymbol, String OrderType, double TriggerPrice, double Price, int Quantity, String Target, String StopLoss, String TrailingStoploss, double SignalLTP, String StrategyTag, String ProductType, String OptionsType, DateTime ScheduleTime,  bool StatusInSameCell = true, bool OnlyOneOrder = true);

 

//Place Order Functions

  1. String IB_PlaceOrder(int UniqueID, String StrategyTag, String UserID, String Exchange, String StockSymbol, String TransactionType, String OrderType, String ProductType, int Quantity, double Price = 0,double TriggerPrice = 0,String StopLoss = “0”,String Target = “0”, String SLTrailingValue = “0”, int DisclosedQuantity = 0, double SignalLTP = 0, String DataProvider = “”, bool StatusInSameCell = true,bool OnlyOneOrder = true);

 

//Order Modification and Cancellation

  1. string IB_ModifyOrder(String RequestID, int Quantity, double LimitPrice = 0, double TriggerPrice = 0, String StopLoss = “0”, String Target = “0”, String SLTrailingValue = “0”, String TgtTrailingValue = “0”,  String BreakEvenPoint = “0”, bool OnlyOneOrder = true);
  2. string IB_CancelOrExitOrder(String RequestID);

 

//Misc Functions

  1. bool IB_SquareOff(String UserID);
  2. bool IB_SquareOffAll();
  3. bool IB_SquareOffStrategy(string StrategyTag);
  4. double IB_MTM(String UserID, int RefreshSeconds);

 

//Order Details Functions

  1. String IB_OrderStatus(String RequestID, bool InSameCell = true);

 

 

Indicator Functions

Stoxxo Intelligent API Trading Bridge Excel plugin supports many indicators which makes indicator values calculation very easy for the user. Now users can calculate RSI, MACD etc with just a simple one formula. Indicator list is kept updating within the plugin, few of them are documented below for clarification on how to use it. Rest indicators you can use the same way.

1.     IB_SMA(table_array, Period)

Calculate the MA / SMA (Simple Moving Average) / DMA.

table_array: Table array to calculate SMA. This is a reference table array of values on which you wish to calculate SMA. Eg A1:A51

Period: Period to calculate SMA, Default 20

Examples:

 = IB_SMA (A1:A51) – It will calculate SMA on data from A1 to A51 for 20 Period.

 = IB_SMA (A1:A51, 10) – It will calculate SMA on data from A1 to A51 for 10 Period.

                 

  1. TB_EMA(table_array, Period)

Calculate the EMA – Exponential Moving Average.

table_array: Table array to calculate EMA. This is a reference table array of values on which you wish to calculate EMA. Eg A1:A51

Period: Period to calculate EMA, Default 20

Examples:

                       = TB_EMA (A1:A51) – It will calculate EMA on data from A1 to A51 for 20 Period.

 = TB_EMA (A1:A51, 10) – It will calculate EMA on data from A1 to A51 for 10 Period.

 

3.     TB_RSI(table_array, Period)

Calculate the RSI – Relative Strength Index.

table_array: Table array to calculate RSI. This is a reference table array of values on which you wish to calculate RSI. Eg A1:A51

Period: Period to calculate RSI, Default 14

Examples:

= TB_RSI (A1:A51) – It will calculate RSI on data from A1 to A51 for 14 Period.

 = TB_RSI (A1:A51, 10) – It will calculate RSI on data from A1 to A51 for 10 Period.

 

4.     TB_VWAP (table_array)

Calculate the VWAP – Volume Weighted Average Price. It needs Open, High, Low, Close, and Volume data so select table_array range correctly.

Here you need to select all rows of Open, High, Low, Close and Volume. You may select extra rows at the end of the array, no problem in that. But starting 5 rows must be O, H, L, C and Volume.

table_array: Table array to calculate VWAP. It needs Open, High, Low, Close, and Volume data so select correctly. Eg A1:E50

Examples:

= TB_VWAP (A1:F51) – It will calculate VWAP on data from A1 to F51. Here Open at A, High at B, Low at C, Close and D and Volume at E column. Rest columns were of dates and those will be ignored internally.

 

5.     TB_SuperTrend(table_array, Period, Multiplier, CalculationMode)

Calculate the SuperTrend. It needs Open, High, Low, Close, and Volume data so select table_array range correctly. Value provided in 2 columns, so keep the next column free.

Here you need to select all rows of Open, High, Low, Close and Volume. You may select extra rows at the end of the array, no problem in that. But starting 5 rows must be O, H, L, C and Volume.

table_array: Table array to calculate SuperTrend. It needs Open, High, Low, Close, and Volume data so select table_array range correctly. Eg A1:E50

Period: Period to calculate SuperTrend, Default 10

Multiplier: Multiplier to calculate SuperTrend, Default 3

CalculationMode: Default 3 which means WIDLER, Other Options are 1 =SMA, 2 = EMA, 3 = WIDLER

     Examples:

= TB_SuperTrend (A1:E50) – It will calculate SuperTrend on data from A1 to E50. Here Open at A, High at B, Low at C, Close and D and Volume at E column.  Period and other parameters will be used with their default value.

 = TB_SuperTrend (A1:E50, 7, 2) – It will calculate SuperTrend on data from A1 to E50 with Period = 7 and Multiplier = 2.

= TB_SuperTrend (A1:E50, 7, 2, 2) – If you wish to use a different calculation mode, you can supply value accordingly. Here EMA will be used to calculate SuperTrend.

 

6.     TB_ATR (table_array, Period, CalculationMode)

Calculate the ATR – Average True Range. It needs Open, High, Low, Close, and Volume data so select table_array range correctly.

Here you need to select all rows of Open, High, Low, Close and Volume. You may select extra rows at the end of the array, no problem in that. But starting 5 rows must be O, H, L, C and Volume.

table_array: Table array to calculate ATR. It needs Open, High, Low, Close, and Volume data so select table_array range correctly. Eg A1:E50

Period: Period to calculate ATR, Default 14

CalculationMode: Default 2 which means EMA, Other Options are 1 = SMA, 2 = EMA, 3 = WIDLER

     Examples:

= TB_ATR (A1:E50) – It will calculate ATR on data from A1 to E50. Here Open at A, High at B, Low at C, Close and D and Volume at E column.  Period and other parameters will be used with their default value.

 = TB_SuperTrend (A1:E50, 10, 1) – It will calculate ATR on data from A1 to E50 with Period = 10 and CalculationMode as 1 which means SMA.

 

7.     TB_BollingerBands(table_array, Period, StandardDeviation)

Calculate the Bollinger Bands. Provided Values are Bollinger, UpperBand, LowerBand. Value provided in 3 columns, so keep the next 2 columns free.

table_array: Table array to calculate Bollinger Bands. Eg A1:A50

Period: Period to calculate Bollinger Bands, Default 20

StandardDeviation: Standard Deviation to calculate Bollinger Bands, Default 2

Examples:

= TB_BollingerBands (A1:A50) – It will calculate Bollinger Bands on data from A1 to A50. Period and other parameters will be used with their default value.

= TB_BollingerBands (A1:E50, 20, 3) – It will calculate Bollinger Bands on data from A1 to A50 with Period = 7 and StandardDeviation = 3.

 

8.     TB_MACD (table_array, FastEMA, SlowEMA, SignalEMA)

Calculate the MACD – Moving Average Convergence Divergence. Provided Values are MACDLine, Signal, Histogram. Value provided in 3 columns, so keep the next 2 columns free.

table_array: Table array to MACD. Eg A1:A50

FastEMA: FastEMA to calculate MACD, Default 12

SlowEMA: SlowEMA to calculate MACD, Default 26

SignalEMA: SignalEMA to calculate MACD, Default 9

 

Examples:

= TB_MACD (A1:A50) – It will calculate MACD on data from A1 to A50. Period and other parameters will be used with their default value.

= TB_MACD (A1:E50, 15, 30, 10) – It will calculate Bollinger Bands on data from A1 to A50 with FastEMA = 15, SlowEMA = 30 and SignalEMA = 10.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *