Copyright 2017 by stocksdeveloper.com All Rights Reserved.
Table of contents Introduction... 3 What's new... 3 Design... 4 Installation... 5 Getting Started... 6 Start/Stop Application... 6 Registration... 7 Automated Trading... 8 Test... 10 Bulk Upload... 11 Home Screen... 12 Symbol Mapping... 13 Orders... 14 Alerts... 15 Settings... 16 Integration... 17 AMI Broker... 17 Excel... 21 Examples... 22 2 / 23
Introduction This is a software for trading automatically on KITE, NOW & NEST (client & dealer) terminals. This software has a very simple file based communication mechanism; which makes it easy to connect it with other analysis softwares such as (AMI Broker, Meta Trader, Excel, Custom Trading Application etc.) Soon we will also support ODIN platform, contact us if you want support on these. Created with the Personal Edition of HelpNDoc: Easy EPub and documentation editor What's new Fully & Semi Automated Execution Support for NEST, NOW, ODIN & Zerodha KITE platforms Bulk Order Utility for Brokers & Portfolio Managers (Place order for multiple clients) Sound alerts on order placement Support for all market segments o Cash segment o Currency, Index & Stock derivatives o Commodity (This has not been tested, contact support if you face any issues) Free to use & free support o There are no charges for the software as well as the support Easy integration with any charting or analysis software o reads orders from a shared file o To connect it with any software, the charting/analysis software simply need to write orders to a file o AMI Broker support is built-in with examples o To connect it to any other software, contact support Supports all order types (Limit/Market/StopLoss) Many other order attributes as well, have a look at sample file here New features & changes o If you need any new enhancements or changes in the software, we will try to build it after analyzing your requirement Help o We have put up a user guide to get you started o You can also contact us for any queries or support 3 / 23
Created with the Personal Edition of HelpNDoc: Write EPub books for the ipad Design All applications that need to place orders, will write the orders into a file. The orders are written into a comma separated format. These orders are picked up by and then placed into trading platform. 4 / 23
Created with the Personal Edition of HelpNDoc: Create cross-platform Qt Help files Installation To install manually follow these steps: Download setup from here. Run setup file & wait for installation to complete, it takes some time so please be patient. Software will be installed in C:\autotrader folder You will have shortcuts created on Desktop now for starting and stopping the server. Go to your desktop, right click on Start-AT shortcut & select properties. On properties window, go to Shortcut tab & click Advanced button. Tick Run as Administrator -> Press OK -> Press Apply For a free installation & demo, contact us. Phone: +91 9503569907 Email: help@stocksdeveloper.com 5 / 23
Created with the Personal Edition of HelpNDoc: Easy to use tool to create HTML Help files and Help web sites Getting Started Once you have completed all the steps in the installation procedure, you can now get started. Created with the Personal Edition of HelpNDoc: Full-featured Help generator Start/Stop Application Start To start an application, double click on the start shortcut on your desktop. It must always be run as administrator. It takes around 60 seconds for the application to start Once your application is started, you must log into the system. Open your browser and type localhost:8080 press enter. o If you are on a network (Wi-Fi), you can access the application from any computer or mobile device. Just open a browser & enter name of computer on which our is running (Example: your_computer_name:8080 ) You will see the home screen similar to the one below Stop To stop an application, double click on the stop shortcut on your desktop. 6 / 23
Created with the Personal Edition of HelpNDoc: Free iphone documentation generator Registration On first time login you will be taken to a registration page. You must register here (this is one time process). You need to enter following details: Your email address Your name Contact number NOW/NEST/KITE Client id (This is the client id that you use for logging into NOW/NEST terminal. It is required for placing order. It can be changed later through settings) Platform Version (This is version number of your NOW/NEST terminal, it is available on title bar. Example: 3.11.4). This is not applicable for KITE platform. By default, you will get a 90-days trial license. We will extend it on case to case basis, contact us when your license expires. 7 / 23
Created with the Personal Edition of HelpNDoc: Free Web Help generator Automated Trading Run Procedure Here I am giving all the steps that you would take to get automated order placement running. Login to your trading platform (NOW/NEST/KITE) Start our service by double clicking start shortcut on desktop Login to, open browser and enter url localhost:8080 Click on Start button Start your analysis application 1. Example, start AMI Broker with your strategies running live (or using Bar Reply when testing) 6. Once you have started strategies in AMI Broker, just make sure that NEST/NOW is open in FRONT. The NEST/NOW window must be in foreground (in front) for orders to be placed. 7. Whenever an order is placed from strategy, you will hear an alarm. 8. will then immediately place on order onto NOW/NEST/KITE. 1. 2. 3. 4. 5. 8 / 23
Basic Start/Stop Fully Automated Mode On the Home screen, you should see that the system is in a READY state. Press Start button to start automated trading. You can see the system is in RUNNING state. o The system will now wait for orders to come. As soon as the orders come system will place it in your trading platform. Semi Automated Mode To run in semi automated mode, press Stop/Manual o When the system is stopped, it will still read orders but it will not place them To hold/pause automated order placement, press Pause o When the system is on hold; all the orders that are received while the system is on hold will be placed when the system is started again 9 / 23
Created with the Personal Edition of HelpNDoc: Generate EPub ebooks with ease Test Before you start live trading, it is important to do some tests. Good Practice If possible, do testing after market hours During testing, if possible keep zero balance in your trading account (so all orders will be rejected) Otherwise use small quantity limit orders, and use price which is outside circuit limits (Example: price = 1.5, it will make sure that all your orders are rejected) If you follow above rules, then there is no risk accidentally placing an order Test Procedure Here I am giving all the steps that you would take to get automated order placement running. Login to your trading platform (NOW/NEST/KITE) Start our service by double clicking shortcut on desktop Login to our system, open browser and enter url localhost:8080 Click on Start button Start your analysis application 1. Example, start AMI Broker with your strategies 2. Make sure you called placeorder functions from your strategy's AFL 3. Use Bar Reply feature of AMI Broker 6. Once you have started strategies in AMI Broker, just make sure that NEST/NOW is open in FRONT. The NEST/NOW window must be in foreground (in front) for orders to be placed. 7. Whenever an order is placed from strategy, you will hear an alarm. 8. will then immediately place on order onto NOW/NEST/KITE. 1. 2. 3. 4. 5. 10 / 23
Created with the Personal Edition of HelpNDoc: Full-featured Kindle ebooks generator Bulk Upload Bulk Order Upload This feature is useful for brokers & portfolio managers. Using this feature you can place orders for multiple clients in a single click. Note: You must have a nest dealer terminal or rights to place orders on behalf of multiple clients. 1. Please open BulkOrders excel file from (C:\autotrader\scripts\excel) 2. If you get a warning, then click "Enable Marcro". 3. There are 2 sheets where you need to fill data: 1. clients: Enter your client codes here & their respective quantities 2. order: Fill your order details here 4. Click "Place Bulk Order" button. 5. The system by default will wait for 6 seconds (See column S on order sheet). This will give you time to bring NEST/NOW in front. You can modify this value. 6. Bring your NEST/NOW platform to front. 7. will enter same order for all of your clients. Please contact us if you have any custom requirement to place orders. 11 / 23
Created with the Personal Edition of HelpNDoc: Easily create iphone documentation Home Screen On top you have (Start/Pause/Manual) buttons. After that you see the current system status Refresh Button is used for reloading alerts & orders on the home screen Alerts table displays last 10 alerts generated by the system Orders tables displays all orders received by the system 12 / 23
Created with the Personal Edition of HelpNDoc: Qt Help documentation made easy Symbol Mapping Symbol mapping is a feature that is very useful, as it saves you a lot of time. A mapping basically maps a key to a security (stock, future etc). Once you have mapped a key, then you need not pass the parameters that are specified in mapping. Please look at an example below: Here we have create a mapping for key "NIFTY-I". Now we will pass this key in place of symbol. Once you have a mapping in place, you can then call function like the one below in AMI Broker: placeordermappedsymbol("nifty-i", "SELL", "NORMAL", "LIMIT", 10, 9900.5, defaulttriggerprice(), defaultdisclosedquantity()); or placeordermappedsymbol("nifty-i", "SELL", "NORMAL", "LIMIT", 10, 9900.5, 0, 0); Without the mapping you would have to call a function like this (additional fields in pink): placeorderfuture("nfo", "FUTIDX", "NIFTY", "SELL", "NORMAL", "LIMIT", 75, 9900.5, defaulttriggerprice(), "26-OCT-2017", defaultstrategyid(), defaultcomments()); 13 / 23
Created with the Personal Edition of HelpNDoc: Full-featured Documentation generator Orders Orders received by the system are displayed here: To view an order, click on the link of first column (Instrument) of the order row Remember orders are displayed in descending order of time (i.e. latest orders are displayed first) 14 / 23
Created with the Personal Edition of HelpNDoc: Easily create Web Help sites Alerts Alerts generated by the system are displayed here: To view an alert, click on the link of first column (Instrument) of the order row The Name of an alert explains the alert purpose Remember alerts are displayed in descending order of time (i.e. latest alerts are displayed first) 15 / 23
Created with the Personal Edition of HelpNDoc: Easily create CHM Help documents Settings All system settings are present here, they can be viewed & modified from here. 16 / 23
Created with the Personal Edition of HelpNDoc: Create iphone web-based documentation Integration Created with the Personal Edition of HelpNDoc: Easily create PDF Help documents AMI Broker Here we discuss about how to place orders from AMI Broker. One time setup Under the installation directory, there are sample scripts at this path (autotrader -> scripts > afl) Please do this one time activity: Copy algotrader-util.afl to Include folder of your AMI Broker installation (Example: C: \Program Files\AmiBroker\Formulas\Include) Copy algotrader.afl to Systems folder of your AMI Broker installation (Example: C: \Program Files\AmiBroker\Formulas\Systems) What are these files? algotrader-util.afl - This file provides various AFL functions that can be used for placing an order. You must include this file in your strategy, so that all functions become available to your strategy AFL. o #include <algotrader-util.afl> algotrader.afl - This file contains a simple Moving Average Crossover strategy, which shows how to place orders. 17 / 23
Functions for Placing Order There are many functions for placing order, you can use any of them as per your need. The names are self explanatory. The description of each parameter that the function takes are given on following pages. /* * Places an order using mapping. * See documentation below for parameter values. */ placeordermappedsymbol(symbol, tradetype, producttype, ordertype, quantity, price, triggerprice, disclosedquantity); /* * Places an order for a stock. * See documentation below for parameter values. */ placeorderstock(exchange, instrument, symbol, tradetype, producttype, ordertype, quantity, price, triggerprice, disclosedquantity, strategyid, comments); /* * Places an order for a future contract. * See documentation below for parameter values. */ placeorderfuture(exchange, instrument, symbol, tradetype, producttype, ordertype, quantity, price, triggerprice, expiry, strategyid, comments); /* * Places an order for a option contract. * See documentation below for parameter values. */ placeorderoption(exchange, instrument, symbol, tradetype, producttype, ordertype, quantity, price, triggerprice, optiontype, strikeprice, expiry, strategyid, comments); /* * Place an order, this function allows you provide many parameters. And it can be used to place any kind of order. * It will check whether symbol has a mapping in the system. * If a mapping is found, parameters from the mapping are used; otherwise default parameters are used. */ placeorderadvanced(exchange, instrument, symbol, tradetype, producttype, ordertype, quantity, price, triggerprice, disclosedquantity, optiontype, strikeprice, expiry, clientid, validity, tradertype, marketprotectionpct, strategyid, comments); 18 / 23
Functions for Default Values There are many other functions in algotrader-util.afl which provide default values for various parameters. These are useful if there are parameters which are not applicable in your case, then simply call it's respective default value function. defaulttradertype() defaultvalidity() defaultoptiontype() defaultexpiry() defaultclientid() defaultexchange() defaultinstrument() defaultstrikeprice() defaultdisclosedquantity() defaulttriggerprice() defaultmarketprotectionpct() defaultstrategyid() defaultcomments() Examples: // NEST/KITE/NOW Examples placeorderfuture("nfo", "FUTIDX", "NIFTY", "SELL", "NORMAL", "LIMIT", 75, 9900.5, defaulttriggerprice(), "26-OCT-2017", defaultstrategyid(), defaultcomments()); placeorderstock("nse", "EQ", "SBIN", "SELL", "INTRADAY", "LIMIT", 10, price, 0, 0, 1, "Demo sell order managed by strategy 1"); // ODIN Examples placeorderfuture("nse", "FUTIDX", "NIFTY", "SELL", "NORMAL", "LIMIT", 75, 12000, defaulttriggerprice(), "25-JAN-2018", defaultstrategyid(), defaultcomments()); placeorderstock("nse", "EQUITIES", "SBIN", "SELL", "INTRADAY", "LIMIT", 10, price, 0, 0, 1, "Demo sell order managed by strategy 1"); 19 / 23
How to place order from strategy? The best example is to look at algotrader.afl file, it is a simple strategy that demonstrates how to place orders. Here are the steps: 1. Include the afl provided by us into your strategy afl. 1. #include <algotrader-util.afl> 2. On your signal generation condition, use any of the placeorder functions that is suitable for you. placeordermappedsymbol("nifty-i", "SELL", "NORMAL", "LIMIT", 10, 9900.5, defaulttriggerprice(), defaultdisclosedquantity()); placeordermappedsymbol("nifty-i", "SELL", "NORMAL", "LIMIT", 10, 9900.5, 0, 0); placeorderfuture("nfo", "FUTIDX", "NIFTY", "SELL", "NORMAL", "LIMIT", 75, 9900.5, defaulttriggerprice(), "26-OCT-2017", defaultstrategyid(), defaultcomments()); 20 / 23
Created with the Personal Edition of HelpNDoc: Free help authoring tool Excel Here we discuss about how to place orders from AMI Broker. One time setup To work with excel, you will have to install autotrader addin. Steps: 1. Download it from here. 2. Copy the file to C:\Users\UserName\AppData\Roaming\Microsoft\AddIns. See this link for more information on how to install addins. Once you have addins install, then you can see all place order functions available in the User Defined category (see below). Double-click on placeorder functions to see list of parameters to pass. Alternatively you can type a function in excel cell: =placeorderstock And press Ctrl + A to see help. 21 / 23
Created with the Personal Edition of HelpNDoc: Write ebooks for the Kindle Examples // NEST/KITE/NOW Examples placeorderfuture("nfo", "FUTIDX", "NIFTY", "SELL", "NORMAL", "LIMIT", 75, 9900.5, defaulttriggerprice(), "26-OCT-2017", defaultstrategyid(), defaultcomments()); placeorderstock("nse", "EQ", "SBIN", "SELL", "INTRADAY", "LIMIT", 10, price, 0, 0, 1, "Demo sell order managed by strategy 1"); // ODIN Examples placeorderfuture("nse", "FUTIDX", "NIFTY", "SELL", "NORMAL", "LIMIT", 75, 12000, defaulttriggerprice(), "25-JAN-2018", defaultstrategyid(), defaultcomments()); placeorderstock("nse", "EQUITIES", "SBIN", "SELL", "INTRADAY", "LIMIT", 10, price, 0, 0, 1, "Demo sell order managed by strategy 1"); VARIABLE_NAME DATA_TYPE DESCRIPTION symbol It could be a stock symbol or a key which can be mapped to a stock/future/option contract in Mapping menu on tradetype BUY, SELL producttype INTRADAY, DELIVERY, NORMAL ordertype LIMIT, MARKET, STOP_LOSS quantity NUMBER quantity disclosedquantity NUMBER disclosed quantity, pass zero 0 if not applicable price DECIMAL order price triggerprice DECIMAL trigger price (used for stop loss order, in other cases pass zero 0) exchange NSE, NFO, BSE (maps to exchange column on NEST terminal) instrument EQ, FUTIDX, FUTSTK, OPTIDX, OPTSTK, FUTCUR, OPTCUR, FUTCOM (maps to instrument column on NEST terminal) optiontype CE, PE (Option type, pass NA if not applicable) strikeprice DECIMAL expiry expiry date (Example: 28-DEC-2017), pass NA if not applicable clientid NEST/NOW client id, pass NA if not applicable validity DAY, GTD, GTC, IOC (pass DAY if not applicable) tradertype PRO, CLI (pass CLI if not applicable) marketprotectionpct DECIMAL market protection percentage (Only applicable for Market orders, example 3.0 (which means 3% protection)), pass 0 if not applicable strategyid NUMBER Id of the strategy which should manage this order, pass -1 if not applicable strike price, pass zero 0 if not applicable 22 / 23
comments Comments for this order, pass NA if not applicable Created with the Personal Edition of HelpNDoc: Full-featured EPub generator 23 / 23