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

Is there an event for when a trade is first logged?

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

    Is there an event for when a trade is first logged?

    Looking for something I can use in an addon. If there is no event for when a trade is logged (position closed), would it be better to use the trades collection or the executions collection to determine what the last trade was. I am thinking I can use their events to capture any change and then look at the trades to determine if the last one was a profit or loss. That just seems a little convoluted. Suggestions?

    #2
    Hello Chippy,

    You can use the addon account events to watch for order updates, executions or position changes: https://ninjatrader.com/support/help...ount_class.htm

    The term trade means a set of executions that are paired, to an addon there is no "trade", just executions or orders. If you wanted something similar to what a strategy does with trade performance there are undocumented ways to build your own based on executions: https://ninjatrader.com/support/foru...ns#post1091093

    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by set2win, Today, 04:11 PM
    0 responses
    7 views
    0 likes
    Last Post set2win
    by set2win
     
    Started by trader3000a, Today, 02:18 PM
    0 responses
    4 views
    0 likes
    Last Post trader3000a  
    Started by Tavor, Today, 02:06 PM
    0 responses
    11 views
    0 likes
    Last Post Tavor
    by Tavor
     
    Started by WalterSkinner, 07-01-2022, 03:14 PM
    2 responses
    26 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by vitaly_p, Today, 10:13 AM
    0 responses
    17 views
    0 likes
    Last Post vitaly_p  
    Working...
    X