Tutorial 193 | Activity Bars | TradeStation EasyLanguage tutorials and programs
  • 10 months ago
Tutorial 193 takes another look at TradeStation ActivityBars (see also Markplex tutorial 133: https://markplex.com/free-tutorials/tutorial-133-displaying-trade-at-bid-and-ask-data-using-activitybars/.)

Activity bars allow the user to analyze a bar ("activity bar") smaller than the current bar. In this tutorial the 'big' bars are set to daily, with the analysis being made on one minute bars ("activity bars").

Specifically the tutorial analyzes the Commodity Channel Index (CCI) effectively applied to the smaller interval (one minute bars) and looks for "zero rejections" i.e. the CCI get close (or slightly crosses the zero line, depending on the inputs we use, but then moves back in the same directions it came from.

Tutorial 193 also looks for divergence between price and the CCI.

In either case, if an incidence of a zero rejection or a potential divergence occurs, an activity bars is drawn for the price range in which it occurred.

The tutorial includes two methods:

LegacyColorFromColObject: takes the name of a color and converts it into an integer which can be used in the AB_AddCellRange statement.

NewBar: this method is called for each activity bar. Most of the functionality is concerned with looking for divergences and zero rejections. If found AB_AddCellRange adds an activity bar. The method includes functionality to get a label value from a string. It also get the color value from a TokenList containing specific names of colors from the Color class.

See the tutorial page: https://markplex.com/free-tutorials/tutorial-193-activitybar-study-showing-cci-zero-rejection-and-divergence/
Recommended