@BenTen Thats the indicator I used to create the arrows I provided above. what I am struggling with it creating a strategy from this or a study from this which signals correctly. The problem is that if one arrow shows a signal (up or down), I need to hold that signal until it signals the opposite signal and this is where I think I am running into a problem with my code. I confirmed I am doing this by plotting the alert and it is not matching the arrows. I need to write something where if there is a cross the value is 1 and it stays one until this is another cross in the opposite direction.