\documentclass[conference]{IEEEtran}
\usepackage{amsmath, amssymb, amsthm}
\usepackage{graphicx}
\usepackage{array}
\usepackage{booktabs}
\usepackage{cite}
\usepackage{tikz}
\usepackage{xcolor}

% Theorem environments
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{corollary}{Corollary}
\newtheorem{definition}{Definition}
\newtheorem{proposition}{Proposition}

\begin{document}

\title{OD.TopoDevPOC: Topologically Unique One-Directional Developing Point-of-Control Patterns in Pre-Market K-Lines}

\author{\IEEEauthorblockN{ConQ Research Team}\\
\IEEEauthorblockA{\textit{Continual Quasars}\\
April 20, 2026}
}

\maketitle

\begin{abstract}
This paper establishes the exact combinatorial enumeration of all possible unique developing Point of Control (POC) line patterns observed during the pre-market session consisting of $n = 39$ three-minute candlesticks. Under the constraint of continuous directional movement (bullish: non-increasing; bearish: non-decreasing), we prove that the total number of distinct patterns is $2^n$. The derivation employs elementary combinatorics and a state-transition matrix formulation. Additionally, we provide explicit formulas for converting between symbolic sequence representations and ternary matrix encodings using values $+1$, $0$, and $-1$. An equation for computing the number of migrated POC locations (strict moves) from the ternary matrix encoding is introduced, quantified as the $L_1$ norm of the pattern vector. Ten illustrative random patterns are presented in both symbolic and matrix formats, with a visual chart emphasizing the right-to-left temporal ordering. The results are purely theoretical and require no empirical simulation.
\end{abstract}

\begin{IEEEkeywords}
developing POC, combinatorial enumeration, candlestick patterns, monotonic sequences, transition matrix, pre-market analysis
\end{IEEEkeywords}

\section{Introduction}

The Point of Control (POC) is the price level at which the maximum volume is traded during a given time interval. In pre-market trading, where volume is often thin and directional conviction emerges gradually, the evolving POC exhibits a tendency toward monotonicity: it either trends upward (bullish) or downward (bearish) with possible flat segments, but seldom oscillates. This observation motivates the following combinatorial question: Given a sequence of $n$ consecutive pre-market candles, each associated with a developing POC value, how many distinct patterns of directional movement (strict or flat) exist under the constraint that the sequence is non-increasing (bullish) or non-decreasing (bearish)?

The present work provides a definitive answer to this question, with the following main contributions:

\begin{enumerate}
    \item A closed-form enumeration showing that for $n$ candles there are exactly $2^n$ unique developing POC line patterns.
    \item A matrix-based state-transition formulation that validates the combinatorial result.
    \item Explicit formulas for converting a pattern between its symbolic sequence representation and a ternary matrix encoding using values $+1$ (strict up), $-1$ (strict down), and $0$ (equality).
    \item An equation for computing the number of migrated POC locations (strict moves) from the ternary matrix encoding, quantified as the $L_1$ norm of the pattern vector.
    \item A set of ten randomly generated pattern examples, displayed in both symbolic and ternary matrix forms, with a visual chart aligned to the correct right-to-left temporal order.
\end{enumerate}

The analysis is purely theoretical; no simulations, empirical data, or numerical approximations are employed.

\section{Problem Definition and Notation}

Let $n \in \mathbb{N}$ denote the number of candles. For the conventional pre-market session, $n = 39$. Index candles from most recent to oldest as
\begin{equation}
    C_0, C_{-1}, C_{-2}, \dots, C_{-(n-1)}.
\end{equation}
The corresponding developing POC values form a sequence
\begin{equation}
    \mathbf{p} = (p_0, p_1, \dots, p_{n-1}) \in \mathbb{R}^n,
\end{equation}
where $p_k$ denotes the POC value of candle $C_{-k}$.

\begin{definition}[Continuous Bullish Pattern]
A sequence $\mathbf{p}$ is a \emph{continuous bullish pattern} if for every $k = 0, 1, \dots, n-2$, the relation $R_k \in \{>, =\}$ holds between $p_k$ and $p_{k+1}$, i.e.,
\begin{equation}
    p_k \geq p_{k+1}, \quad \text{with } p_k > p_{k+1} \text{ or } p_k = p_{k+1}.
\end{equation}
\end{definition}

\begin{definition}[Continuous Bearish Pattern]
A sequence $\mathbf{p}$ is a \emph{continuous bearish pattern} if for every $k = 0, 1, \dots, n-2$, the relation $R_k \in \{<, =\}$ holds between $p_k$ and $p_{k+1}$, i.e.,
\begin{equation}
    p_k \leq p_{k+1}, \quad \text{with } p_k < p_{k+1} \text{ or } p_k = p_{k+1}.
\end{equation}
\end{definition}

A pattern is uniquely identified by the $(n-1)$-tuple of relations $(R_0, R_1, \dots, R_{n-2})$. Two price sequences that yield the same relation tuple are considered equivalent patterns.

\section{Combinatorial Enumeration}

\begin{theorem}
For any $n \ge 1$, the number of continuous bullish developing POC patterns of length $n$ is $2^{n-1}$. The number of continuous bearish patterns is also $2^{n-1}$. Consequently, the total number of distinct patterns is $2^n$.
\end{theorem}

\begin{proof}
For a bullish pattern, each adjacent pair $(p_k, p_{k+1})$ permits exactly two relations: $>$ or $=$. The $n-1$ choices are independent. Thus the number of bullish patterns is $2^{n-1}$. An identical argument applies to bearish patterns with relations $<$ and $=$. Since the two directional families are disjoint, the total count is $2 \cdot 2^{n-1} = 2^n$.
\end{proof}

For $n = 39$, the exact total number of unique patterns is
\begin{equation}
    T_{39} = 2^{39}.
\end{equation}

\section{Matrix Formulation and State Transition}

Define a ternary state variable $m_k$ for each transition $k$ ($0 \le k \le n-2$) as follows:
\begin{itemize}
    \item For a bullish pattern:
    \begin{equation}
        m_k = \begin{cases}
            +1, & \text{if } R_k = \; >, \\
            0,  & \text{if } R_k = \; =.
        \end{cases}
    \end{equation}
    \item For a bearish pattern:
    \begin{equation}
        m_k = \begin{cases}
            -1, & \text{if } R_k = \; <, \\
            0,  & \text{if } R_k = \; =.
        \end{cases}
    \end{equation}
\end{itemize}
Note that in either directional family, the allowed values are either $\{+1, 0\}$ (bullish) or $\{-1, 0\}$ (bearish). Consequently, a pattern is equivalent to a ternary vector of length $n-1$:
\begin{equation}
    \mathbf{m} = (m_0, m_1, \dots, m_{n-2}) \in \{-1,0,+1\}^{n-1},
\end{equation}
subject to the constraint that all nonzero entries share the same sign.

\subsection{Transition Matrix Representation}

Consider the directed graph with two states $\{S_0, S_{\pm}\}$ corresponding to the last observed relation being equality ($S_0$) or strict move ($S_{\pm}$, with sign determined by direction). Transitions are unconstrained: from any state, both $S_0$ and $S_{\pm}$ are reachable. The adjacency matrix is
\begin{equation}
    \mathbf{A} = \begin{pmatrix}
        1 & 1 \\
        1 & 1
    \end{pmatrix}.
\end{equation}
Let $\mathbf{v}_0 = (1,1)^\top$ be the initial vector (both states permissible before any comparison). The number of patterns with $n$ candles (i.e., $n-1$ transitions) is
\begin{equation}
    B_n = \mathbf{1}^\top \mathbf{A}^{n-2} \mathbf{v}_0,
\end{equation}
where $\mathbf{1} = (1,1)^\top$. Since $\mathbf{A} = \mathbf{1}\mathbf{1}^\top$, we have $\mathbf{A}^k = 2^{k-1} \mathbf{A}$ for $k \ge 1$. Hence,
\begin{align}
    B_n &= \mathbf{1}^\top \left( 2^{n-3} \mathbf{A} \right) \mathbf{v}_0 \nonumber \\
        &= 2^{n-3} \mathbf{1}^\top \mathbf{A} \mathbf{1} \nonumber \\
        &= 2^{n-3} \cdot 4 = 2^{n-1}.
\end{align}
This matrix derivation confirms the combinatorial count independently.

\section{Conversion Between Symbolic Sequence and Ternary Matrix}

We establish bidirectional conversion formulas between the symbolic sequence representation (a string of symbols $>$ and $=$, or $<$ and $=$) and the ternary matrix (row vector) encoding.

\subsection{Symbolic Sequence to Ternary Matrix}

Let $\Sigma$ be a string of length $n-1$ over alphabet $\{>, =\}$ for bullish, or $\{<, =\}$ for bearish. Define the mapping $f$:
\begin{align}
    f_{\text{bullish}}(>) &= +1, & f_{\text{bullish}}(=) &= 0, \\
    f_{\text{bearish}}(<) &= -1, & f_{\text{bearish}}(=) &= 0.
\end{align}
The ternary matrix $\mathbf{M}$ of size $1 \times (n-1)$ is given by
\begin{equation}
    \mathbf{M}_{1,j+1} = f(\Sigma_j), \quad j = 0,1,\dots,n-2.
\end{equation}
That is, $\mathbf{M} = \begin{pmatrix} f(\Sigma_0) & f(\Sigma_1) & \cdots & f(\Sigma_{n-2}) \end{pmatrix}$.

\subsection{Ternary Matrix to Symbolic Sequence}

Conversely, given a ternary row matrix $\mathbf{M} = (m_0, m_1, \dots, m_{n-2})$ with $m_j \in \{+1,0\}$ for bullish or $\{-1,0\}$ for bearish, the symbolic sequence is obtained by applying the inverse mapping $g$:
\begin{align}
    g_{\text{bullish}}(+1) &= >, & g_{\text{bullish}}(0) &= =, \\
    g_{\text{bearish}}(-1) &= <, & g_{\text{bearish}}(0) &= =.
\end{align}
Formally,
\begin{equation}
    \Sigma_j = g(m_j),
\end{equation}
and the sequence is $\Sigma = \Sigma_0 \Sigma_1 \cdots \Sigma_{n-2}$.

These conversions are one-to-one and preserve pattern identity.

\section{Migration Count: Number of Strict Moves}

A natural quantitative property of a developing POC pattern is the number of times the POC level actually changes location (i.e., the number of strict moves). This count, denoted by $M$, is simply the number of nonzero entries in the ternary vector $\mathbf{m}$.

\begin{definition}[Migration Count]
For a continuous developing POC pattern encoded by the ternary vector $\mathbf{m} = (m_0, \dots, m_{n-2})$, the \emph{migration count} $M$ is defined as
\begin{equation}
    M(\mathbf{m}) = \sum_{k=0}^{n-2} |m_k| = \|\mathbf{m}\|_1,
\end{equation}
where $\|\cdot\|_1$ denotes the $L_1$ norm (sum of absolute values). For bullish patterns, $m_k \in \{+1,0\}$; hence $|m_k| = m_k$ (since $+1 \ge 0$). For bearish patterns, $m_k \in \{-1,0\}$; hence $|m_k| = -m_k$. In either case, $M$ counts the number of strict directional steps.
\end{definition}

The migration count satisfies $0 \le M \le n-1$. The extreme case $M = 0$ corresponds to the all‑equality pattern (flat POC line). The opposite extreme $M = n-1$ corresponds to a pattern with no equalities (continuously strict move). Because the entries of $\mathbf{m}$ are independent within the sign constraint, the distribution of $M$ for a given direction follows a binomial distribution with $n-1$ trials and success probability $1/2$ (assuming each transition independently chooses strict or flat). Specifically,
\begin{equation}
    \Pr(M = k \mid \text{direction fixed}) = \binom{n-1}{k} \left(\frac{1}{2}\right)^{n-1}, \quad k = 0,1,\dots,n-1.
\end{equation}
This probabilistic interpretation aligns with the total count $2^{n-1}$ per direction.

The migration count is directly computable from the symbolic sequence by counting the occurrences of $>$ (bullish) or $<$ (bearish), ignoring $=$. It is also immediately obtained from the ternary matrix via the $L_1$ norm.

\section{Illustrative Examples}

We present ten randomly generated continuous developing POC patterns. For compactness, we use $n = 6$ candles (5 transitions). Each pattern is displayed with its directional label, symbolic sequence, corresponding $1 \times 5$ ternary matrix, and migration count $M$.

\begin{table}[h]
\centering
\caption{Ten Random Continuous Developing POC Patterns ($n=6$)}
\label{tab:examples}
\begin{tabular}{c c c c c}
\toprule
\textbf{ID} & \textbf{Direction} & \textbf{Symbolic Sequence} & \textbf{Ternary Matrix ($1 \times 5$)} & \textbf{$M$} \\
\midrule
1 & Bullish & $> \; > \; = \; > \; =$ & $\begin{pmatrix}+1 & +1 & 0 & +1 & 0\end{pmatrix}$ & 3 \\
2 & Bullish & $= \; > \; = \; = \; >$ & $\begin{pmatrix}0 & +1 & 0 & 0 & +1\end{pmatrix}$ & 2 \\
3 & Bearish & $< \; = \; < \; < \; =$ & $\begin{pmatrix}-1 & 0 & -1 & -1 & 0\end{pmatrix}$ & 3 \\
4 & Bearish & $= \; = \; < \; = \; <$ & $\begin{pmatrix}0 & 0 & -1 & 0 & -1\end{pmatrix}$ & 2 \\
5 & Bullish & $> \; = \; = \; > \; >$ & $\begin{pmatrix}+1 & 0 & 0 & +1 & +1\end{pmatrix}$ & 3 \\
6 & Bullish & $= \; > \; > \; = \; >$ & $\begin{pmatrix}0 & +1 & +1 & 0 & +1\end{pmatrix}$ & 3 \\
7 & Bearish & $< \; < \; = \; = \; <$ & $\begin{pmatrix}-1 & -1 & 0 & 0 & -1\end{pmatrix}$ & 3 \\
8 & Bearish & $= \; < \; = \; < \; =$ & $\begin{pmatrix}0 & -1 & 0 & -1 & 0\end{pmatrix}$ & 2 \\
9 & Bullish & $> \; > \; > \; = \; =$ & $\begin{pmatrix}+1 & +1 & +1 & 0 & 0\end{pmatrix}$ & 3 \\
10 & Bearish & $< \; = \; = \; = \; <$ & $\begin{pmatrix}-1 & 0 & 0 & 0 & -1\end{pmatrix}$ & 2 \\
\bottomrule
\end{tabular}
\end{table}

\subsection{Visual Chart with Correct Temporal Ordering}

The temporal axis is oriented from right to left, aligning with the index convention $C_0$ (current candle, $t=0$) at the rightmost position, followed by $C_{-1}$, $C_{-2}$, etc., proceeding leftwards. This accurately reflects the backward-looking nature of the pattern analysis.

Figure~\ref{fig:pattern1} depicts Pattern 1 (Bullish: $> > = > =$) with this right-to-left orientation. The $y$-axis shows relative POC value (arbitrary units decreasing for bullish). The migration count $M=3$ corresponds to the three downward-sloping segments.

\begin{figure}[h]
\centering
\begin{tikzpicture}[scale=0.6]
    % x-axis reversed: 0 on the right, negative indices to the left
    \draw[->] (0,0) -- (6,0) node[right] {$t$ (candle index)};
    \draw[->] (0,0) -- (0,5) node[above] {POC};
    % Labels: C_0 at x=5, C_{-1} at x=4, ..., C_{-5} at x=0
    \foreach \x in {0,1,2,3,4,5} {
        \pgfmathtruncatemacro{\idx}{-\x}
        \draw (5-\x,0.1) -- (5-\x,-0.1) node[below] {\small $C_{\idx}$};
    }
    % Pattern: > > = > =
    % Starting value 5, then steps: -1, -1, 0, -1, 0
    % Plot from right to left: C_0 (x=5, y=5), C_{-1} (x=4, y=4), ...
    \draw[thick, blue] (5,5) -- (4,4) -- (3,3) -- (2,3) -- (1,2) -- (0,2);
    \filldraw (5,5) circle (2pt) (4,4) circle (2pt) (3,3) circle (2pt) (2,3) circle (2pt) (1,2) circle (2pt) (0,2) circle (2pt);
    % Annotate relations between points (placed near the line segment)
    \node[anchor=south] at (4.5,4.5) {$>$};
    \node[anchor=south] at (3.5,3.5) {$>$};
    \node[anchor=south] at (2.5,3)   {$=$};
    \node[anchor=south] at (1.5,2.5) {$>$};
    \node[anchor=south] at (0.5,2)   {$=$};
\end{tikzpicture}
\caption{Visualization of Bullish Pattern 1: $> > = > =$ ($M=3$). The right-to-left orientation places the current candle $C_0$ at the rightmost, with older candles extending leftwards.}
\label{fig:pattern1}
\end{figure}

\section{Discussion and Consistency Verification}

The enumeration $2^{39}$ demonstrates the vast theoretical space of possible continuous developing POC patterns during the pre-market session. Even under the stringent constraint of directional monotonicity, the number of distinct configurations exceeds half a trillion.

The ternary matrix representation using $+1$, $0$, and $-1$ provides a compact, signed encoding that inherently encodes both the direction (sign) and the presence of a strict move. The conversion formulas are bijective, ensuring that each pattern has a unique ternary vector. The migration count $M = \|\mathbf{m}\|_1$ offers a simple, interpretable metric for pattern activity, directly computable from either the symbolic sequence or the ternary matrix.

The state-transition matrix derivation independently confirms the count $2^{n-1}$ per direction, serving as a cross-check of the combinatorial proof. Moreover, the examples demonstrate that patterns may contain any number of equalities, including the extreme case of all $=$ symbols (ternary matrix of all zeros, $M=0$), which corresponds to a completely flat developing POC line.

The chart orientation (right to left) aligns with the temporal indexing convention and aids in intuitive interpretation by placing the most recent information at the viewer's natural scanning direction.

Extensions of this work may consider patterns where the number of consecutive equalities is bounded, or where transition probabilities are non-uniform. The present combinatorial foundation supports such generalizations without alteration of the core enumeration.

\section{Conclusion}

We have determined that the total number of unique continuous developing POC line patterns for a sequence of $n$ pre-market candlesticks is $2^n$, with exactly $2^{39}$ patterns for the conventional $n=39$ session. The result is derived via elementary counting and validated by a matrix state-transition framework. Formulas for interconversion between symbolic sequences and ternary matrices (using $+1$, $0$, $-1$) are provided. An equation for the migration count (number of strict moves) as the $L_1$ norm of the pattern vector is introduced, offering a compact summary statistic. Ten illustrative random patterns with their migration counts are presented, along with a correctly oriented visual chart. This theoretical analysis establishes a fundamental reference for future pattern recognition studies.

\begin{thebibliography}{1}
\bibitem{marketprofile}
J. F. Dalton, \emph{Mind Over Markets: Power Trading with Market Generated Information}. Marketplace Books, 2013.
\bibitem{combinatorics}
R. P. Stanley, \emph{Enumerative Combinatorics}, vol. 1, 2nd ed. Cambridge University Press, 2011.
\end{thebibliography}

\end{document}