Create Your Own Automated Stock Trading Robot In EXCEL!
3.6 (30 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
327 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Create Your Own Automated Stock Trading Robot In EXCEL! to your Wishlist.

Add to Wishlist

Create Your Own Automated Stock Trading Robot In EXCEL!

Learn how to use Visual Basic in Excel to automate your trading!
3.6 (30 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
327 students enrolled
Created by Peter Titus
Last updated 1/2017
English
Current price: $10 Original price: $150 Discount: 93% off
1 day left at this price!
30-Day Money-Back Guarantee
Includes:
  • 4.5 hours on-demand video
  • 3 Articles
  • 5 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Have a coupon?
What Will I Learn?
Be able to trade and generate extra income even while you're at work or away from the computer
Understand the basics of the Interactive Brokers Excel API
Learn how to build automation through sub procedures in Visual Basic
Be able to automate any spreadsheet task with VBA
Learn how to import data and do backtesting in Excel
Start off with a basic trading system that is already profitable
Download your own copy of Ranger 1.0
Use Ranger1.0 to automate your own trading right away
Understand the code in Ranger 1.0 and be able to customize it to fit your own ideas
Add your own functions and algorithms to Ranger1.0
Build YOUR OWN automated trading system in Excel from scratch
View Curriculum
Requirements
  • You should already be familiar with Excel
  • Trading experience is useful, but not required
  • Computer, internet connection, Excel 2010 or newer
  • You will need $10,000 to open a margin account and $5,000 to open an IRA account with Interactive brokers.
Description

In this course you will learn how to build trading automation in Excel, the most popular spreadsheet software on the market. In Excel, there are no limits to what you can build! You are limited only by your imagination! The course is built around learning Visual Basic for applications (VBA) and we'll be examining a simplified version of the system I built for trading called Ranger1.0. We'll use this system as an example to show you how to build your own automation. Every student will be able to download a copy of Ranger1.0 for their own use. By the end of the course you will understand the code that runs Ranger1.0 and be able to customize it to fit your ideas. You will also be able to use what you've learned to build your own automated system from the ground up, if that's what you choose to do.

The focus of this course is on trading stocks. It is possible to trade futures, currencies, options, and bonds through Ranger1.0, but examples on how to trade these are not covered in detail. However, by the end of this course you will have enough knowledge in Visual Basic to be able to create your own custom automation to trade whatever you want however you want!

The sky is the limit! With excel you really can build just about anything you can imagine. This course will get you started using Visual Basic, even if you've never written any code before. You will learn how to automate the order life cycle, how to build timers, play sounds, record live data, do backtesting, and even how to build a decision making AI!

Finally, I will guide you through everything you need to know to set up an account with Interactive Brokers, how to set up the Excel API, and how to trade using a simulated "Paper" trading account. An Interactive Brokers account is required to receive live streaming data and to send orders, but even if you do not have an account, I will show you how to get historical data for excel that you can do backtesting on right away, and even get you started with a trading system (that you can optimize further) that is already profitable!

Who is the target audience?
  • Anyone interested in learning the basics of automated trading in Excel
  • Anyone looking for ways to add automation to their trading routine
  • Anyone who wants to build an automated trading system in Excel
Students Who Viewed This Course Also Viewed
Curriculum For This Course
Expand All 42 Lectures Collapse All 42 Lectures 04:44:08
+
Introduction to Automated Trading
4 Lectures 13:22

Here we talk about what we want in an automated trading system and go over what Ranger1.0 is and what it does.

Preview 07:14

This is a live demo showing how the automated setup is activated and how the system handles the market open. Then I send a trade through my simulated trading account followed by an exit order. We also talk briefly about the live data recorder and the Log Data function.

Preview 04:51

Legal Stuff - Disclaimer
00:47

Ranger1.0 is an ideal system for trading breakouts from support and resistance ranges! If you are unfamiliar with the concepts of support, resistance, and breakouts, here are some web resources to get you acquainted.

Resources for those unfamiliar with support/resistance and breakouts
00:30
+
Using Visual Basic for Applications (VBA)
4 Lectures 33:30

I show you how to open VBA and how to navigate the interface. Then I show you how to easily use and define variables and how to write sub procedures.

Visual Basic for Applications (VBA) basics
10:12

We go over how to write "if" statements, then how to add "and" and "or" to these statements to perform some simple example functions.

If and or statements
07:10

I show you how to record a macro and use code from it in your sub. We talk about how to write code to simply reference a cell by a row and a column number. I also show you how easy it is to generate a "yes - no" dialogue box.

Macros, cells, and dialogue boxes
08:29

Here we build a sample loop using the GoTo function and a counter.

Loops
07:39
+
Ranger 1.0 functionality
25 Lectures 02:59:36

Download Ranger1.0 excel file here

Download Ranger1.0 here!
05:12

I show you how to build a timer and where timers are used in Ranger1.0 as well as how to make a simple clock that ticks every second.

How to build a timer
08:41

Here we talk about how easy it is to schedule a task (or run any sub at any set time) using the application.ontime function.

How to schedule a task at a specific time
05:31

We go over how the alarm works, and how to play sounds through VBA. (sounds must be .wav files)

How to build an alarm and play sounds
04:51

I show you how the "clear worksheet" sub works and how to clear ranges of cells and change cell colors.

Clearing cells and ranges
06:09

When building an automated trading system, you can use the Auto_Open sub to run anything as soon as the workbook opens, and use the Worksheet_Calculate sub to run anything every time the worksheet calculates (such as every time a price changes)

Auto_Open and Worksheet_Calculate subs
02:23

Here we go over the various features of the Excel API.

Introduction to the Interactive Brokers Excel API
05:23

I show you how to request live market data in excel, using the Excel API and how to automate this task.

How to request live market data automatically
07:05

I go through how to set up the worksheets to get ready for trading manually, then I show you how to automate this entire process.

How to automate your daily setup tasks
13:35

Here we go over how to send orders manually through the Excel by entering the symbol and the trade data into the "Conditional Orders" worksheet.

How to send orders manually through Excel
03:36

Here we talk about why we need to add "island" as the primary exchange for certain nasdaq stocks and how to automatically detect a setup error.

Checking for set up errors automatically
05:38

I show you how the system can be designed to generate a trade that requires your final approval before being sent, and also how to send all trades automatically. We also go over how to tell if the order was "Submitted" or "Filled" and at what price and for how many shares.

How to design your system to run in automatic or manual mode
07:15

Here we go over how each stage of the order cycle is managed and how we keep track of which stage each trade is in.

Managing the order life cycle
03:49

Here we take a look at how the system checks for trades and stopouts, the code it uses to trigger orders, and how it can be set to send them automatically.

How to trigger orders and send them automatically
16:00

I show you the calculation I use (and how to customize it) to calculate the number of shares to buy so that you risk the same amount on every trade whether you are trading something with a wide (volatile) range, or something with a narrow range.

Smart position sizing
12:49

Here we go over how gains are calculated after we exit each trade, and how the smart position sizing calculation is used in calculating our "real" percentage gain or loss.

How gains are calculated (smart position sizing continued)
06:46

We go over the PTpaste sub and how it auto-inserts our price targets after a buy and stop price are entered.

How to insert price targets automatically
03:26

Here we go over the code that handles our exit order (take profits order)

Price targets
17:15

Here we talk about our stop and timeout code

How to automate stops
10:44

This lecture is on how to easily prevent subs (especially those that run multiple times per second) from conflicting with the Interactive Brokers subs that request market data or send orders.

Conflicting subs: how to prevent them
05:03

I show you how the "Force Exit" button puts the text "Timeout" into the nearest trade cell so you can quickly exit a trade manually if you want.

Manual Position Exit (Force Exit Button)
01:49

Here we go over how to close your open positions at a set time near the end of the day. Especially useful if you're day trading.

How to automatically close positions near the end of the day
02:48

Sometimes you may encounter a situation where you need to start the system from an "open position" state. This could be due to Interactive Brokers cancelling your order or if you entered a position manually from TWS or some other special situation. Here I show you how to make sure the system is set up properly to go forward from an "open position" state.

Overnight positions and special situations
02:16

I show you how the system logs data when you're done trading and pastes your gains or losses on the "Log" worksheet.

How to automatically log trading data
05:40

Here we go over how the system records live market data and how you can customize it.

How to record live data tick by tick
15:52
+
Extras
8 Lectures 56:57

In this lecture I show you how to import historical data (intraday and yearly) using interactive brokers. Then I show you other sources of market data on the web you may find useful.

How to import data from Interactive Brokers or other sources
10:22

This lecture is about how to do backtesting in Excel. If you are doing a lot of backtesting, especially if you are using "standard" technical indicators, Excel is probably not the best software platform out there, but the advantage of Excel is you can backtest anything you can build an algorithm for. I built a sample backtester to show you how to do it and help you get started. The sample rules we tried here are already profitable on yahoo and apple. You can further optimize this system with your own ideas!

How to do backtesting in Excel
14:50

There are an enormous number of Excel workbook functions and you can use ANY of them in your own automated trading system. If you want the standard technical indicators too, there are add-ins you can get to bring those into excel as well!

Create your algorithm, an introduction to Excel workbook functions
05:14

I show you how to build a decision making AI that makes decisions the way a human does. We go over three different types of data inputs, and how transform them into numbers an AI can use to make a decision- as well as how to "weight" each factor based on how important it is.

How to build a decision making AI that thinks like a human
10:04

Here we go over how to step through your code line by line using the F8 command. I show you how to force a sub to run by setting up a sample situation and how to disable certain lines from running by putting a ' mark in front of them. Don't forget to re-enable these lines of code if you want then to run again in a live situation!

How to debug your code line by line
07:41

Here I show you some of the most useful tricks I've learned when configuring Interactive Brokers and the best way to get technical support. I've also attached a huge list of resources for additional learning about the Trader Work Station and the Excel API. Be sure to click on the "View Resources" button!

Setting up Interactive Brokers for the first time
04:26

A warm thank you from me for taking this course as well as a discussion on how to continue your journey!

Where should you go from here?
03:24

Congratulations to all who have completed this course! You now have the power and knowledge to build your own automated trading system in Excel!

Wrap up and thank you
00:56
+
Bonus
1 Lecture 00:42
75% OFF coupon for: The Big Volatility Short
00:42
About the Instructor
Peter Titus
3.9 Average rating
61 Reviews
1,528 Students
3 Courses
Trader, Technologist, and Entrepreneur

Peter Titus graduated from the University of Wisconsin- Madison with an engineering degree in 2003. He has been actively trading stocks and options since 2006 and has been building automated trading systems in Excel using Visual Basic for Applications (VBA) since 2009. He specializes in day trading stocks and ETFs.