You can use technical indicators to drive when an options trade is entered and exited. ORATS has indicators and will add more. If there are indicators not in our list, you can still use technical indicators. Here's how:

The best way to get technical indicators into the backtester is to develop Entry & Exit dates. You can do this in a spreadsheet, via code, or with an outside service. Here's an example of using a spreadsheet:

First, get historical pricing. You can either use the ORATS Data API, under DataHistory select DailyPrices, or a free service like Yahoo Finance.

Second, use formulas to determine the entry and exit dates. In the example, a client wants to use a moving average technical indicator to trigger an options strategy. The rule is to initiate an entry trigger when the 20 day stock price moving average (20dayMA) is greater than the 50 day moving average, and the 50 day is greater than the 100 day average. Make a formula that looks to see that the 20dayMA>50dayMA and 50dayMA>100dayMA: If this And statement is satisfied, then put either the current date, or if there was a date in the cell above from a different entry point use that.

Here's what it looks like in Excel:


Once you have all the entry dates, put a formula to exit when the entry date is blank, i.e. when the 20dayMA>50dayMA and 50dayMA>100dayMA rule is broken. You will have a list of many entry dates and only a few exit dates when there is a blank after a long list of qualifying dates.


In a new sheet, copy off these two columns of dates, add symbol name, and sort on the exit dates. You will have a series looking like this:


Next, copy this three column list, paste into the ORATS backtester Symbol input box. Click 'Exit at Signal'. Here's what it looks like.


Now you can set up the backtester strategy and rules and the trading will be dictated by the entry and exit points you developed.

Here are some other resources:

Backtest Your Own Signals

Backtest Basics: How to set up the Wheel strategy