Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnMarketDepth Order Execution

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

    OnMarketDepth Order Execution

    Can you calculate an algorithm based on the OnMarketDepth function and then run order execution based on those calculations? It says you can build your own Level II book. I'm wondering if I can run an algo to trade based on the OnMarketdepth function?

    #2
    Hello Sadat,
    Thank you for the post.

    Yes, you can use OnMarketDepth to submit orders or do other logic if you wanted.

    The various data overrides can all be used for trading such as OnBarUpdate, OnMarketData, OnMarketDepth as well as OnExecutionUpdate.

    Keep in mind that the OnMarketDepth method is not called on historical data (backtest) so this would work going forward in realtime only.

    I look forward to being of further assistance.

    Comment


      #3
      Hi Jesse. So you're saying I could HFT with this.

      Comment


        #4
        Hello Sadat,

        By HFT do you mean high-frequency trade or automated trading? If so, then yes you can utilize the OnMarketDepth and the other mentioned overrides in a strategy. There are also more complex ways to create tools in the platform but one of the most common would be a Strategy which places trades for you based on some logic.

        I look forward to being of further assistance.

        Comment


          #5
          I mean High Frequency Trading. I was thinking about going the strategy route. How complex can the calculations in the strategy be? Can you run calculus algorithms? It says compute intensive calculations might cause poor performance.

          Comment


            #6
            Hello Sadat,

            Thank you for the reply.

            NinjaScript is C# programming language so you would be able to utilize any standard kinds of math that are supported in Programming or C#. For the performance, this will depend on your PC's overall performance and how efficient your logic is. If you are doing something very complex you can certainly run into slowdowns at times of high volatility if the PC cannot keep up with what you are doing.

            I would generally suggest installing the platform on the PC you would be trading with and then test some indicators or strategies to see how the performance is on that PC. If you will be developing the strategy yourself, NinjaTrader is a sandbox where you can test the math logic you wanted to see how it performs.

            Please let me know if I may be of additional assistance.

            Comment

            Latest Posts

            Collapse

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