Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How does the simulator algorithm work?

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

    How does the simulator algorithm work?

    Consider this text at https://ninjatrader.com/support/help...imulation.htm:

    "NinjaTrader provides a state of the art internal simulation engine that can be used to test trading ideas and hone your skills. The simulation engine is not a simple algorithm that fills your order once the market trades at your order price. The engine uses a scientific approach to determine fill probability by including a number of variables including: ask/bid volume, trade volume, time (to simulate order queue position), and random time delays for switching between order states."


    Can someone describe at a high level how the different parts work? For instance, if there are more asks than bids, does this mean the stock is likely to move down? Is trade volume pegged to different price levels? If there is more trade volume at a price, does it mean fills are faster at that price level?

    I'm not trying to steal NT8's trade secrets here (lol), I just would love to understand more clearly how NT8 models tickers. I've stared at the simulator's output nearly every day for > 2.5+ years here, and I think it does a pretty darn good job. So I think understanding better at a high level how it works might generate insights for me on how to think more accurately about price movements.

    Thanks in advance for any help people can provide here.

    Cheers.

    #2
    Hello carnitron

    Thank you for reaching out.

    The simulation engine in NinjaTrader is a highly advanced tool designed to model realistic market conditions and trading behavior. Here's about as much as we can provide at the moment in terms of explanating how its various components function:
    1. Order Fill Probability:
      • NinjaTrader uses a scientific approach to calculate fill probabilities for orders. The engine accounts for several variables including:
        • Ask/Bid Volume: Helps determine the likelihood of your order being filled based on the current market depth.
        • Trade Volume: Assesses the activity level at a particular price point to adjust fill chances.
        • Order Queue Position: Simulates where your order might sit in the queue, affecting how soon it might be executed.
        • Random Time Delays: Mimic real-world fluctuations and delays between order states.
    2. Ask and Bid Dynamics:
      • When there are more asks than bids, it may indicate selling pressure, often leading to a downward price movement. However, this is not guaranteed and depends on other market conditions like liquidity and external factors.
    3. Trade Volume and Price Levels:
      • Trade volume at specific price levels provides insights into where market participants are actively trading, often creating support or resistance levels.
      • Higher trade volumes at a price level can lead to faster fills at those levels, as there is more liquidity available.
    4. Realism in Order Execution:
      • The simulator does not fill orders merely because the market touches a price. Instead, it evaluates conditions such as whether sufficient volume was available to absorb your order size.
    Please let us know if you have any other questions.

    Erick P.NinjaTrader Customer Service

    Comment


      #3
      This is definitely helpful, thank you kindly for your reply.

      If I may, I want to ask a few more questions here, just to try to flesh this out a bit if possible. (Being aware that you can't go too much further, as you stated.)

      1. How does the simulator assign more or less activity to a given price point? Does it look at what that ticker did on the prior day and try to match that somehow?

      2. At a high level, how does it model the frequency of market orders? Though it is technically possible to enter a limit order on top of the price, I'm assuming most fills come from market orders that cross the spread into a limit order. The order book shows limit orders, NOT market orders, so it is a bit of a leap to conflate the two, though it might be a good approximation.

      I ask b/c I think adopting the simulator's way of thinking about the market here probably leads to better mental models, as opposed to thinking of stocks as charts, as most people do.

      Cheers.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      61 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      39 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      21 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      23 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      51 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X