• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

code to calculate distance to orders

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

    code to calculate distance to orders

    Does anyone have any code that calculates the distance (ticks or points) to the closest limit order? or something similar?

    #2
    Hello NinjaCustomer,
    Thanks for your post.

    You could do this by looping through your Orders collection, then filtering out everything except your closest limit order, and then doing some math to let you know how many ticks away you are.
    https://ninjatrader.com/support/help...rs_account.htm

    I do not have any specific samples that demonstrate this, however the same topic is discussed at the following forum post. Starting at Post #3 the conversation is about accessing order information in NT8.
    https://ninjatrader.com/support/foru...working-orders

    Josh G.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ballboy11, Today, 04:29 PM
    0 responses
    6 views
    0 likes
    Last Post ballboy11  
    Started by zacharydw00, Today, 02:29 PM
    2 responses
    20 views
    0 likes
    Last Post zacharydw00  
    Started by timcjpfx, Today, 06:22 AM
    4 responses
    27 views
    0 likes
    Last Post timcjpfx  
    Started by welson, Today, 08:26 AM
    2 responses
    17 views
    0 likes
    Last Post NinjaTrader_PatrickG  
    Started by brucerobinson, Today, 08:27 AM
    3 responses
    16 views
    0 likes
    Last Post NinjaTrader_Kate  
    Working...
    X