It is not our role on these forums to debug your code. Community members are for sure welcome to help you with this.
In this case I have stripped your code down so that you can see the approach needed to isolate, simplify, and confirm all values. This is not part of our normal support services. You will have to do this in the future and a NinjaScript consultant can be hired if it is beyond your skill level to isolate, simplify, and debug.
The following changes were made:
- Took out extra conditions not relevant to the condition you were checking for.
- Used public input and not the internal private variable
- Draw at bars ago 0 and High[0] so you can see the arrow aligned with the bar the condition occurred on.
- Plots were removed but added manually stochastics indicator to confirm it's working as expected.

Comment