# Understanding the channel break out logic in FSM model by Eugene A. Durenard

I am reading and replicating some code from "Professional Automated Trading" by Eugene A. Durenard, Wiley (2013). I'm replicating some of the simpler strategies, and one way he presents the logic of his strategy is through these FSM (finite state machine) matrices. He never explains how to read these and I can kinda reverse engineer it, but it would be really helpful if someone here could explain to me how to read the below picture so I'm totally sure. My absolute biggest confusion is the use of square brackets?

Below you have a picture of the FSM matrix for channel breakout trend following using slow and fast channel. Slow channel is used for entry and fast channel is used for exit.

• The Current State is listed horizontally (Init, Long,...), the Next State is listed vertically. Obviously we start out in state Init. The expression in the box is the transition criteria: ]S,L[ below the Init means when we are in Init as long as the price is strictly between S and L we stay in State Init (see at left). If (second row) the price is greater or equal to L but strictly less than FPL then we go to state Long (so the ] vs [ tells if it is a strict inequality or loose). I assume PFL means "the Previous Value of L, but why F instead of V?? Any clues in the book? Apr 23 at 20:40
• The NIL in the transition matrix obviously means this transition cannot occur. For example (first row) from any state other than Init it is impossible to go back to Init (so Init is a transient state). Another ex. from Init we can never go to StopFromLong. I assume you probably already figured out all this? Apr 23 at 20:43
• On second thought PFL means profit from long !! It is the threshold at which we will take profit, i.e sell. Once the price is is greater or equal to PFL but strictly less than infinity we go to ProfitFromLong, i.e. we sell. Still not clear exactly how this PFL is set. Apr 23 at 21:03
• Probably PFL is set a fixed percentage above L at the time you enter the Long or Short state from another state (see comment in 4th row). The whole thing is pretty easy to figure out with a little guesswork, no? What is your specific question(s)? Apr 23 at 22:47
• @nbbo2 - I made the same guesswork. Still the brackets is not clear. You write, the ] vs [ tells if it is a strict inequality or loose. I agree, first row we have ]S, L[ => S<P<L. Now, I'm just trying to figure out how L[ and [L is different? What is the difference between S] and ]S? So for example how do you read the difference between [L, S] and ]S, L[. I think it is just the direction of the bracket that is somewhat confusing to me, as I'm used to think in inequalities! Apr 24 at 13:17