Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trade Result

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

    Trade Result

    Hi...

    If I have a trade initiated from an addon or indicator like
    sellOrd = acct.CreateOrder(Ins,oaction,otype,tif,1,0,0,"","E ntry",null);
    NinjaTrader.NinjaScript.AtmStrategy.StartAtmStrate gy("My ATM", sellOrd);

    How can/should I track its result ?
    I guess I need to check when sellOrd gets filled (ok )
    then I need the position ( not sure how to do that )
    and then look at position.TradePerformance ?

    Thanks !
    pmaglio
    NinjaTrader Ecosystem Vendor - The Indicator Store

    #2
    Hello,

    Thank you for the question.

    There is a good example here: http://ninjatrader.com/support/forum...d=9&linkid=763

    This is a large sample, but it is separated into different regions. To see how to subscribe to the account updates, see line 304 and that general area. You would need to subscribe to the events to know when items like fills occur. You could then use the standard logic from the samples inside of the events handler.

    I look forward to being of further assistance.

    Comment


      #3
      Any idea how can I edit the XAML on Visual Studio ?
      I get this error
      Attached Files
      pmaglio
      NinjaTrader Ecosystem Vendor - The Indicator Store

      Comment


        #4
        Hello,

        Thank you for the post.

        In this case this would be expected, the internal gui tools would not be able to be used with the designer without error unfortunately.

        In general the designer is not suggested to be used with xaml you create for NinjaScript items, coding these manually would be the suggested approach and is what most developers do. If you are having trouble with visual studio crashing or other problems related to the designer, you can turn the designer off for xaml documents to switch to code only editing.


        Please let me know if I may be of additional assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        61 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        40 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        21 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        23 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        51 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X