FirstHourBreakout

Description

The First-Hour Breakout strategy adds simulated orders based on the price range calculated for the first hour of the regular trading session. By default, it also compares the volume traded last night to the average nightly volume over the last five days (see the article on the Cumulative Overnight Volume for details). In addition to the first-hour range check and the overnight volume check, the strategy performs several checks at specified timestamps during the trading day. Note that since thinkScript uses timestamps in Eastern Standard Time (EST), the default numbers in the input parameters are adjusted accordingly.

The simulated orders will be added based on the following algorithm (all timestamps mentioned are default and can be modified using the input parameters):

  1. At 8:30 am Central Standard Time (CST), the strategy compares the total volume traded last night to the average nightly volume over the last five days. If the overnight volume is greater than the average, the strategy detects a volatility bias and will perform the next step. If the overnight volume is less than or equal to the average, no simulated orders will be added during this day and the check will be repeated at the same time the next day.
  2. At 9:30 am CST, the strategy registers the price range of the first hour of the trading day.
  3. If the price rises above or falls below this range at any moment from 9:45 a.m. CST to 2:45 pm CST, the strategy will add a simulated order: a buy to open order when the price rises and a sell to open order when it falls. No simulated orders to open will be added after 2:45 pm CST.
  4. All open simulated positions will be closed with the opposite simulated orders at 3:15 pm CST.

Note that you can turn off the overnight volume check by setting the use filter parameter to no.

Input Parameters

Parameter

Description

night session from midnight

Defines the start of the midnight trading session in the EST time zone, 24-hour hhmm notation.

first hour trading

Defines the start of the day trading session in the EST time zone, 24-hour hhmm notation.

main session

Defines the start of the main session (by default, one hour after the market opens) in the EST time zone 24-hour hhmm notation.

no more long positions

Defines the end time for adding simulated orders to open in the EST timezone, 24-hour hhmm notation.

night session from main session end

Defines the end of the main session in the EST time zone, 24-hour hhmm notation.

use filter

Defines whether or not to use volatility bias as the primary condition for adding simulated orders to open.

Further Reading

1. "Daytrading With Night Volume" by Domenico D'Errico. Technical Analysis of Stocks & Commodities, June 2017.