Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Keep Track of Contracts in Last Trade

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

    Keep Track of Contracts in Last Trade

    Hello,

    I am trying to keep track of the amount of contracts that were entered for the previous trade. I have the lastSize = quantity; implemented but it isn't working as expected due to partial fills. Because of the partial fills on the previous trade's exit, quantity is equal to 1.

    Any suggestions on how i can correctly capture the amount of contracts in the last trade for lastSize?


    #2
    Hello klent313,

    Thanks for your post.

    You could consider using the SystemPerformance TradeCollection to get the last trade made and then get the lastTrade.Quantity Trade value for that last trade.

    See the help guide documentation and sample code for more information.

    SystemPerformance: https://ninjatrader.com/support/help...erformance.htm
    TradeCollection: https://ninjatrader.com/support/help...collection.htm
    Trade: https://ninjatrader.com/support/help.../nt8/trade.htm
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    87 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    132 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    65 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    118 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X