Author Archives: Jack Slocum

About Jack Slocum

CEO / Founder @ Alta5. Founder of Sencha and #ExtJS. #500strong

Create a bot to sell covered calls every month in 23 lines of JavaScript

Covered Call is a common option strategy that is used to enhance a long stock position. In simple terms, it allows an investor to sell a portion of the unlimited upside in a stock position for cash each month. I almost always prefer covered calls to naked stock because it provides some downside protection (via cost basis reduction) and it allows me to profit even when the share price stays the same. Covered calls is easy to learn and doesn’t introduce any additional risk.

- Buy 100 shares of stock.
- Sell 1 call for every 100 shares.

read more

Tasty Condor – a bot that collects monthly premium trading Iron Condor spreads on SPY

Earlier this week we introduced a new build of the Alta5 platform with additional support for option strategies, including Iron Condor spreads. Iron Condor is a popular delta neutral strategy used by professional money managers and individual investors to collect monthly premium and slowly profit from Theta (time decay). In this article, I will walk you through my process to build a bot that trades an Iron Condor on SPDR S&P 500 ETF (SPY) every month automatically.

Tasty Condor

There are many different variations to the Iron Condor strategy. The bot I created trades my personal favorite, a dynamic variation discussed by the wizard Tom Sosnoff of tastyTrade in this video. I call it… Tasty Condor.

read more

Introducing the Bittman Algorithm

This is a repost of an article recently published on the blog for my new startup, Alta5. Our platform enables investors to automate stock and options trading strategies using JavaScript.

In 2012 Jim Bittman, Director of Program Development and a Senior Instructor for The Options Institute at CBOE, gave a presentation that outlined a 2-step strategy for trading the S&P 500 Index (SPX) using weekly options. The strategy is particularly attractive because Mr Bittman supplied very specific entry and exit points, back testing data, probabilities and a detailed comparison vs trading once a month using standard monthly SPX options. This weekly strategy was one of the primary strategies that inspired the creation of altarithm.

read more

Better Declarative Listeners for ExtJS

The most recent post on the Sencha Blog, Declarative Listeners in Ext JS 5, goes over some of the improvements made in the latest ExtJS release to make attaching event listeners to components a little easier. I have been using a small override in ExtJS 4 for a while that offers a similar declarative approach to attaching listeners, but also gives the developer the ability to traverse the component hierarchy or listen to stores. This small override completely changed the way I develop apps using ExtJS.

read more

HTML5 History API

HTML5The Ext JS framework includes the Ext.util.History component for managing the browser history that was first introduced in Ext 2.0 back in 2007. It’s pretty solid, and other than bug fixes it hasn’t changed much since then.

In the reportcaster framework, all state changes while changing reports or drilling within reports is routed through a Navigator component that supports pluggable strategies for how to do that navigation. The default method is to use the browsers history. We were using Ext.util.History to do that and it worked just fine. However, since Ext.util.History doesn’t support the hashchange event or HTML5 History all navigation is slightly delayed by the polling interval of Ext.util.History.  Users found that to be undesirable.

read more

Encapsulate complex logic for cleaner code and reuse

Ext JS provides many reusable components for use in Javascript applications that shield the developer from complex timer and/or asynchronous code. However, you may still find yourself writing timing or asynchronous code directly in your application code that you would be better off encapsulating in a class.

Timer code is generally not pretty, bug prone and is not something I want to look at all the time. Once that logic is available as an object, it’s easy to mask the complexity and make that functionality available transparently to other developers.

read more

Simple Tasks v2 – Multiple lists, NativeWindows and Reminders

In collaboration with Adobe, one of the key additions in Ext 2.0.2 was Adobe AIR 1.0 support for running in the application sandbox. Also, the Simple Tasks AIR application sample was rewritten to take advantage of more of the native functionality in AIR and gained some cool custom Ext components that can be used outside of AIR.


First, lets cover some of the AIR APIs that were used:

This was one of the most useful additions to the Ext.air package. It provides an API to create windows, manage those windows, listen for events like standard Ext Observables and automatic state management for the windows.

read more