Tom Demark Sequential Indicator (TDI)

Hi, all. I have studies several indicators and scripts related to Tom Demark sequential indicator and assembled my own script.
This the first version - 01 by 04122018. I will continue to work on it. What the space.
Release Notes: Reversed the colors - which is the correct representation of advised action: green=BUY, red=SELL
Release Notes: I have made a few changes.
Primarily to simplify.
9s and 13s are converted to B and S by its color.
Release Notes: bugs fixed

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?