Consider the discrete time random walk process such that $X_{t+1} = X_t + \epsilon_t$ where $X_0 = 0$ and $\epsilon_t$, is drawn from a symmetric distribution about $0$, such as the normal distribution.
Given this sequence of points $(X_t)_{t \geq 0}$, an "uptrend pattern" could be defined as a local low at $L_1$, followed by a local high at $H_1$, another local low at $L_2$ and another local high at $H_2$, satisfying $L_1 < H_1 < L_2 < H_2$, and $X_{L_1} < X_{L_2}$, and $X_{H_1} < X_{H_2}$ and the condition that there are no other local extrema in $(X_t)$ between $L_1$ and $H_2$.
The question: What is the probability of the uptrend pattern in this framework?
I can work out the probability of the uptrend pattern if I assume that the points are adjacent, i.e. $H_1 = L_1 + 1$ etc. In this case, there are only three conditions that the lengths of the chords of the pattern must satisfy, and their joint probability follows directly from the symmetry of the distribution of $\epsilon_t$. In the general case, the path from, say, $L_1$to $H_1$ can have many steps, and I am having trouble taking these possibilities into account.