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

Optimizing processing time in milliseconds

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

  • pstrusi
    replied
    Thanks a lot Chelsea for your help

    Best regards

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello pstrusi,

    Order submissions are not timed. The amount of time it will take for the order to come back as accepted and then working depends on your internet speed and your computer speed.

    The faster your processor is, the faster orders can be prepared and submitted. The faster your internet and the closer your location to the servers of your broker, the faster order information can be transmitted and received.

    An overfill occurs if an order cancellation or order modification is sent and the order has already been filled or cancelled.

    Your description of an in-flight-execution (where change order or order cancellations are transmitted at the exact moment the order is filling on the exchange servers) is possible.
    Please see the help guide on the 'Risks of Electronic Trading with NinjaTrader' in the section 'In Flight Executions'.
    http://ninjatrader.com/support/helpG...trading_wi.htm

    If NinjaTrader has not received a reply on an order, any further orders will be queued. If no information is received on an order, this will cause an error to appear in a popup in NinjaTrader.

    I'm not certain on the operations you are comparing, however, performing an if switch and doing a simple math operation are both likely to consume a single CPU cycle.
    I would recommend contacting a operating system engineer that would be able to further detail the exact amount of CPU caused by each operation type and variable byte size.

    Leave a comment:


  • pstrusi
    started a topic Optimizing processing time in milliseconds

    Optimizing processing time in milliseconds

    Hi Ninjas

    NT platform does a great job running automated algoritms pretty fast, however I'm interested to optimize that process a little bit in my code, so a doubt rises for incoming tick by tick frame. Let's suppose that you have a decent internet connection, working with IB, a very fast PC and your strategy is working tick by tick:

    1. Approximately: how long ( in milliseconds ) does NT take for the whole process: from "Market Order signal triggered" until "Order filled received", meaning the complete round ? 100, 150, 200 milliseconds?

    2. If your Strategy triggered a new opposite order BEFORE that the last market order has been filled, will that situation create an overfill ?


    3. Which way could it be a faster code to process a comparison between variables :
    a) Using conditional sentences such as: IF .....THEN
    b) Substituting conditional sentences by a simple equation that has the same logic ?



    I'm pretty aware that NT is far from processing HFT algos but I'm trying to do my best.

    Thanks for your attention
    Last edited by pstrusi; 10-05-2016, 04:16 AM.

Latest Posts

Collapse

Topics Statistics Last Post
Started by Christopher Leggit, Today, 01:54 AM
1 response
7 views
0 likes
Last Post NinjaTrader_PaulH  
Started by bojim, Yesterday, 08:35 PM
1 response
14 views
0 likes
Last Post NinjaTrader_PaulH  
Started by tminusten.0, Today, 02:33 AM
3 responses
9 views
0 likes
Last Post NinjaTrader_Jason  
Started by Thomas79, Today, 02:26 AM
1 response
9 views
0 likes
Last Post NinjaTrader_Jim  
Started by WHICKED, Yesterday, 11:12 PM
0 responses
13 views
0 likes
Last Post WHICKED
by WHICKED
 
Working...
X