The error was mine in that the logic was wrong due to my ignorance.
My script was working in backtesting and pretty much any other time than 9:30 am at the open. Due to increased volume at the open, the logic used, and the script being set to calculate OnPriceChange, the increased volume was causing my logic to process faster than NT could acknowledge that a variable has been assigned a new value that was needed to set my exit levels.
The script has 3 separate steps that need to be completed in order, and each of them must be complete before the logic progresses to the next step.
At the open, the price is changing so quickly that based on how the script was written the 2nd and 3rd steps were occurring almost simultaneously before a value could be assigned and then referenced to set the exits.
I separated the 2nd and 3rd step with an additional 1 second and the script is working beautifully.
Thank you for your help!

Comment