Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Advanced Order Handling with Market Orders

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    I discovered the problem. It was my lack of understanding of how an order object is processed during high-volume environments.
    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

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    81 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    41 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    64 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    66 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    54 views
    0 likes
    Last Post CarlTrading  
    Working...
    X