In this article, we have used Kite API to place order from Excel, but the procedure is same for other Broker’s API as well.
You can download the Excel file used in this article from here.
Lets create a simple Buy signal Buy when Ltp crosses above our input level 'Get LTP In Cell A1 = LTP 'Input Buy Level Cell B1 = Your Buy Level 'Generate Signal Cell C1 = IF(A1>=B1, "BUY", "NOSIGNAL") 'Place Order Cell D1 = IF(C1="BUY",PlaceRegularOrderBridge( "NSE", "AXISBANK", "BUY", "MARKET", 1, "MIS", 0, 0, "DAY", "LONG", 0, True, "AA", False, "LONG" ),"NA")
Video version of this article is available here
If you are new to Algo Trading, then try exploring the strategies at https://codeadvisor.in/code-advisor/. We already have some famous strategies coded in VBA/AFL (like ORB, Levels Breakout, Supertrend etc). You can use these strategies to get started quickly or use as a reference to build your own strategy. We will periodically add new strategies and codes that are available in public domain.