Announcement

Collapse

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

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.
    JesseNinjaTrader Customer Service

    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.
        JesseNinjaTrader Customer Service

        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.

            JesseNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by WHICKED, Today, 12:45 PM
            0 responses
            1 view
            0 likes
            Last Post WHICKED
            by WHICKED
             
            Started by FrazMann, Today, 11:21 AM
            2 responses
            6 views
            0 likes
            Last Post NinjaTrader_ChristopherJ  
            Started by rjbtrade1, 11-30-2023, 04:38 PM
            2 responses
            80 views
            0 likes
            Last Post DavidHP
            by DavidHP
             
            Started by Spiderbird, Today, 12:15 PM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_ChristopherJ  
            Started by lorem, Yesterday, 09:18 AM
            5 responses
            18 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X