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

Monitoring orders placed manually

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

    Monitoring orders placed manually

    I trade manually (often but not always using ATM) and I want to write a code to monitor the active orders to alert me if I am doing mistakes and maybe even cancel bad orders automatically.
    What's the way to correct object and possible example to read orders in the real account?
    Thank you

    #2
    Hello giogio1,

    Thanks for your post.

    There would not be a supported way to detect manual trades and manage them programmatically in NinjaTrader 7. In NinjaTrader 8, you can use the AddOn Framework and create a NinjaScript that:
    1. Loops through the Account.Orders collection for the account to find active orders
    2. Subscribes to Account OrderUpdate events to look for any newly opened orders.
    3. Tracks these Orders in the script so they can be changed or cancelled with Account.Change or Account.Cancel
    I have included NinjaTrader 8 documentation on these items below if you wish to investigate further.

    Order object - https://ninjatrader.com/support/help...n-us/order.htm

    Account.Orders - https://ninjatrader.com/support/help...rs_account.htm

    Account.OrderUpdate - https://ninjatrader.com/support/help...rderupdate.htm

    Account.Change - https://ninjatrader.com/support/help...-us/change.htm

    Account.Cancel - https://ninjatrader.com/support/help...-us/cancel.htm

    Please let me know if I can be of further assistance.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by popecapllc, 08-09-2023, 07:42 PM
    10 responses
    1,366 views
    0 likes
    Last Post BartMan
    by BartMan
     
    Started by jbays87, Today, 09:46 PM
    0 responses
    6 views
    0 likes
    Last Post jbays87
    by jbays87
     
    Started by ETFVoyageur, 04-30-2024, 02:04 PM
    11 responses
    101 views
    0 likes
    Last Post ETFVoyageur  
    Started by bubblegum, 03-18-2024, 10:41 AM
    3 responses
    48 views
    0 likes
    Last Post vjsworld  
    Started by JamesK1, Today, 02:48 PM
    1 response
    13 views
    0 likes
    Last Post JamesK1
    by JamesK1
     
    Working...
    X