Bot Examples

Simple Trend Trading with Options Bot

Here is how to leverage the flexibility of bots to create a simple trend following bot using options.
Simple Trend Trading with Options Bot
Kirk Du Plessis
May 14, 2021

This video demonstrates how to create a simple trend trading bot with options and uses components from the “Simple trend trading with stocks bot” example. The tutorial explains how to create a trend trading options strategy bot reusing automations to maximize the platform’s functionality.

The bot’s objective is to sell a put credit spread when a security is above a long-term moving average.

Create bot (:27)

This bot will use automations previously built for other bots, but a new bot is created first with a unique icon and position limits.

Create new bot and settings

Copy a scanner automation (1:43)

Although this bot will trade options instead of stocks, the Stock Trend Scanner created before can be copied and modified to enter options positions, like a short put spread.

To copy an automation, select the “+” icon and click the copy icon of the automation you want to copy.

Create a copy of an automation

You can rename the automation in the automation editor.

Rename the automation

Edit decision action (3:17)

You can use the same custom inputs and decisions from the original automation. You can also delete or replace any of the actions, and the changes will only be applied to the new version. 

For example, the same ticker symbol inputs will be used in this automation. You can use the decision recipe for referencing the underlying symbol’s 200-day SMA as well. However, this bot will trade option positions, so the open position action needs to be changed from long equity to a short put spread. 

Select the action’s settings to delete it from the automation editor.

Deleting a bot action in the automation editor

To add a new open position action, select the “+” icon under the “Yes” branch of the editor. Select “Open Position,” and you can choose a position type.

Adding an open position action for a short put spread

You can input the option strategy details. There are multiple recipes available to customize the position. Remember, you can use the same custom input to link variable fields within the automation.

New options position details

Select “Save,” and the open position action is added to the automation. 

Open position action added to the automation editor

The bot will open a short put spread if the underlying security is above its 200-day simple moving average. 

Add a monitor automation (6:23)

This bot requires a new monitor automation to specifically manage short put option positions. As with the scanner automation, a copy can be made of an existing monitor automation, and the necessary changes can be made to manage short put option positions instead of long equity positions.

Create a copy of a monitor automation

You can easily change the repeater action to filter through short put positions. The monitor automation will close the position if the underlying security is below the 200-day SMA.

Edit the repeater action at beginning of a monitor automation

The bot is complete with scanner and monitor automations. Turn on the bot, and it will begin scanning for new positions to enter. 

This video demonstrates the powerful functionality of bots. The ability to copy and modify automations to quickly create a new bot with the framework of existing automations provides you with flexibility and efficiency.

Next article
Multiple Moving Averages Bot
How to create a bot using multiple moving averages for entry and exit criteria.
Was this helpful?
FAQs
Related articles

Trade smarter with automation