Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90


Types of orders that are executed locally/server

  • Filter
  • Time
  • Show
Clear All
new posts

    Types of orders that are executed locally/server

    Hello, I had a question about what types of orders are executed locally or sent out to a server and executed there.

    When you right click on the chart and set Buy market/limit, Sell market/limit when not already in a position.
    When you right click on the chart and set Buy market/limit, Sell market/limit when a position is open.
    When setting ATM strategy when a position is open.
    When calling EnterLongLimit(), ExitLongLimit(), ExitLongStopMarket(), SetStopLoss(), SetProfitTarget() from ninjascript.

    Does anyone know which of these are executed locally/server. Be useful to know for power outage but mainly when scalping I would like to know which order to use that will be executed on the server as my strategy relies on very fast momentum intrata bar scalping. I would like to place orders ahead of time that will be executed on the server if possible.


    When you say 'server', you probably mean 'exchange', right?

    All orders for real money accounts held at real brokerages
    are sent across the internet to an exchange for execution,
    but, actually, yes, there is a middle-man server -- NinjaTrader
    really sends your orders to the broker's designated order
    server, and it is that server that sends the order to the

    The type of order, or whether you're using an ATM strategy
    or an API call in a NinjaScript Strategy -- that has absolutely
    nothing to do with it.

    Likewise, all orders 'executed' in a Sim account, such as
    Sim101, are executed locally, inside NinjaTrader, because,
    well, duh, these orders are not real, they are for training
    purposes, the execution is being simulated inside the
    NinjaTrader software, which means Sim101 orders never
    leave your computer. [EDIT: The same goes for orders
    inside Market Replay, they are not real.]

    Prop firms, such as Apex or Topstep, are a different story.
    It usually depends on whether or not you're trading inside
    an eval account or a 'funded' account. All prop firms accts
    are real accounts as far as the NinjaTrader software knows,
    which really just means they are not local Sim101 style
    accounts, they are treated internally as a real account,
    so their orders have to be sent out across the internet
    for execution.

    Also, consider this:
    You know all orders in a Sim101 account or simulated locally,
    but did you realize that all orders in a prop firm eval account
    are being simulated remotely?

    Let's consider Rithmic based prop firms. NinjaTrader sends
    the order to the prop firm's order server (which is really a
    Rithmic server, being leased by the prop firm) and it is
    that Rithmic server which decides whether to simulate the
    order execution or forward the order to the exchange for
    execution. Obviously, all orders in all eval accts will get
    simulated, but some prop firms will simulate orders in
    your 'funded' accts, esp for newly won funded accts,
    until they decide they can trust you.

    Rithmic provides special risk mgmt software to the prop
    firms to help them manage these kinds of 'trust' decisions.


    Let's summarize.

    For Sim101 accounts, the orders are simulated locally,
    otherwise, the orders are treated as real and sent to
    your broker's server.

    Remember, your NinjaTrader software doesn't interact
    with the exchange directly, it connects to and sends orders
    to your broker's order server -- and it is that server which
    talks to the exchange.

    If your broker is a prop firm, remember they have some
    special slight of hand risk mgmt software happening under
    the hood at the server.


    Back to your questions.

    For futures trading:
    If you have a power outage at your home, and lose your
    connection to your broker, you'll typically want to immediately
    call your broker's emergency help desk and close all your
    positions. But, if you hold your positions overnight anyway,
    you may not care so much.

    For Sim101 accts, when the power goes out, who cares,
    just reset the Sim101 acct.

    Some brokerages offer an app for your smart phone, so
    when the power goes out, you might be able to manage
    your position from your phone, closing it yourself.

    Last edited by bltdavid; 05-25-2024, 08:19 AM. Reason: Added: Just like Sim101, orders in Market Replay are not real.


      Hello David thanks for the reply. When I say server, I do not mean exchange. I am talking about the servers managed by the brokers like NinjaTradaer or even Rithimic like you mentioned. Not simulation accounts either my question is in regard to live trading only.

      These brokers servers handle the orders and may aggregate or manage them before sending them to the exchange. Rithimic servers allows the prop firm to monitor risk, manage liquidity, and potentially provide better execution etc...

      I imagine the NinjaTrader software does not differentiate and have separate logic for how let's say stop loss is handled when sending these types of orders to the brokers servers before they go to the exchange. If you place a take profit or stop loss on the chart in NinjaTrader software, it would be handled the same regardless of the broker, but this is just an assumption. So, the broker would not matter where the stop loss order is being monitored either locally on our NinjaTrader software or on the brokers servers.

      If power is lost when trading and orders to be executed in the future like take profits or stop losses are monitored on the brokers servers, we would not need to call the broker's emergency help desk and close the positions. I would prefer to let the trade play out as planned if I could which is why it is important to know where orders like stop losses are being monitored before being sent to the exchange.

      I don't know if asking this in strategy development is the best place I just figured people who write strategies might know as it can be crucial to their strategy. When dealing with the volatility of futures where a contracts price can fluctuate dozens of ticks in seconds, where the orders are being monitored can make a huge difference in not only speed but order of execution. Orders that are monitored on brokers servers generally have a FIFO order of execution which also can make a huge difference when dealing with high volatility in short time frames.

      I have been trying to find a definitive answer online to this for weeks now and even called ninjatrader customer support and talked to them a few times. I feel like since there is so much confusion and uncertainty when it comes to this the best thing would be to test it out myself and know for sure. I will sacrifice a prop firm account and test where orders are being monitored. I will post my findings on this thread for anyone else that would like to know.
      Last edited by AlgoDreamer; 05-25-2024, 09:44 AM.


        Hello AlgoDreamer,

        bltdavid provided some good information.

        This page in the Help Guide goes over where orders reside according to their state and what connection you are using:

        Gaby V.NinjaTrader Customer Service


        Latest Posts


        Topics Statistics Last Post
        Started by crewtrades, 06-13-2024, 10:50 AM
        4 responses
        Last Post crewtrades  
        Started by kingsteven, Today, 08:34 PM
        1 response
        Last Post bltdavid  
        Started by biegea, Today, 08:54 PM
        0 responses
        Last Post biegea
        by biegea
        Started by rene69851, Today, 08:36 PM
        0 responses
        Last Post rene69851  
        Started by chartish, 04-11-2019, 12:40 PM
        15 responses
        Last Post joselube001