How can I use a Bridge to AmiBroker with Upstox Pro Web?

The Upstox team wants to give you all the advanced, sophisticated trading tools available in the market. One of the ways in which you can get a seamless trading experience is through the Bridge to AmiBroker product. AmiBroker is a leading charting software in the industry which offers you the tools to backtest your strategies, use the easy-to-understand code and formula editor, and analyze markets using multiple indicators and chart types. Thus, we wanted to bring you the smooth user experience of the Upstox Pro trading platforms, unbeatable brokerage rates and the vast charting tools available with AmiBroker. That's why we've created the Bridge to AmiBroker that lets you connect AmiBroker and Upstox so that you can make the most of both a charting software and a technology-focused broker.

In order to use a Bridge to AmiBroker with Upstox Pro Web, you have to first open an Upstox account or if you already have an Upstox account, you can Pay As You Go and get a monthly subscription for AmiBroker Bridge. Once you purchase the Upstox AmiBroker Bridge, you can get your license key from our Developer Portal. This license key is valid for 30 days which can be renewed at any time.

The License Key is unique and is mapped with your Client ID. Once you visit developer.upstox.com, login and create an Upstox AmiBroker App.

 

 

 

 

Now, the next step is two-fold.Firstly, you have to download the Plugin prerequisite and Install.

For 32 bits 

Secondly, you have to download the DLL and then paste the downloaded DLL into your AmiBroker Plugins folder. To paste you can access the folder by right clicking AmiBroker icon--> Open file location--> Plugins.

*Download DLL for 32 bit from here.

Once the download is complete, restart the AmiBroker Charting Software and accept the one-time certification info pop-up.

To verify you can find the Upstox AFL Plugin in the Tools--> Plugins tab of your AmiBroker software.

Using AmiBroker for signal generation:

Step 1:

Create and backtest a trading strategy using the AmiBroker charting software.

Step 2:

Then, use the AFL Formula editor to provide instructions to buy and/or sell. The instructions should follow a CSV format.

For receiving signals, the Upstox backend is designed in the following CSV format:

PlaceOrder(licenseKey, symbol, transactionType, orderComplexity, orderType, product, duration, quantity, price, triggerPrice, squareOff, stopLoss, trailingTicks, disclosedQuantity);

When you wish to send an order signal from AmiBroker, you will need to send it in this manner:

  • Simple order: PlaceOrder(“9ddf2858-54e9-45ed-b747-3b490e6d712f”, “BANKNIFTY17AUGFUT.NFO”, “b”, “simple”, “m”,  “i”, “DAY”, 40, 0, 0, 0, 0, 0, 0);

 

  • Cover order: PlaceOrder(“9ddf2858-54e9-45ed-b747-3b490e6d712f”, “BANKNIFTY17AUGFUT.NFO”, “b”, “co”, “l”,  “i”, “DAY”, 40, 52.60, 51.75, 0, 0, 0, 0);

 

  • OCO order: PlaceOrder(“9ddf2858-54e9-45ed-b747-3b490e6d712f”, “BANKNIFTY17AUGFUT.NFO”, “b”, “oco”, “l”,  “i”, “DAY”, 40, 52.60, 0, 3, 2, 0, 0);

 

Note: TrailingTicks should be set to 20 or above if you wish to place a trailing SL with OCO. Otherwise it should be kept at zero.

Symbol format: 

RELIANCE.BSE

RELIANCE.NSE

NIFTY17AUGFUT.NFO

NIFTY17AUG9800CE.NFO

USDINR17AUGFUT.NCD

GOLDM17AUGFUT.MCX

Note: For Banknifty monthly and weekly options, the scrips will be accepted as mentioned below:

  • BANKNIFTY3AUG1723500CE, where 3 is the start date, AUG is the month, 17 is the year and 23500 is the strike price.
  • BANKNIFTY31AUG1723500CE, where 31 is the start date, AUG is the month, 17 is the year and 23500 is the strike price.

Step 3:

Once the signal is generated, place order function should be called through AFL with a valid license key.

Step 4:

Upstox servers will identify the client and pass the signal on to the Upstox Pro Web.

Step 5:

Thus, the trading signal will be received in client's AlgoLab. AlgoLab is a fixed workspace available in Upstox Pro Web only for those users who enable the Bridge to AmiBroker.

Step 6:

Finally, you can place an order with just one touch with the help of Upstox one-click trade technology.

Rules for the Place Order function while using the Bridge to AmiBroker:

Download FREE Supertrend AFL - Click here

 

Download IconDownload the Upstox App Today