Thanks for your note.
I am still unable to reproduce the issue after testing your strategy using the NinjaTrader Continuum connection. I attempted to run a backtest on the strategy using different date ranges for the ES instrument and was unable to reproduce the issue after 3 different tests.
To investigate this matter further, you would need to be able to consistently reproduce the behavior you are reporting using specific data series and strategy settings.
Please test the strategy on the Playback connection to try and reproduce the issue. Once you are able to consistently reproduce the issue using specific settings, please send me the exact steps, data series settings, strategy settings, and the date/time that the error occurs when testing with Playback.
Then, I could use that information to reproduce the issue on my end at the same date/time in Playback to investigate what might be causing the behavior.
Also, I see that you only have one print in your script that prints out the Stop Price of the order.
You should also add a print to the script that prints out the value of the indicator plot after a value is assigned to it to see how the plot is evaluating. For example, the print might look like this.
Print("Pstop plot: " + Pstop[0]);
Let me know if I may assist further.

Comment