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

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
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by rhyminkevin, Today, 04:58 PM
    1 response
    31 views
    0 likes
    Last Post Anfedport  
    Started by iceman2018, Today, 05:07 PM
    0 responses
    4 views
    0 likes
    Last Post iceman2018  
    Started by lightsun47, Today, 03:51 PM
    0 responses
    7 views
    0 likes
    Last Post lightsun47  
    Started by 00nevest, Today, 02:27 PM
    1 response
    14 views
    0 likes
    Last Post 00nevest  
    Started by futtrader, 04-21-2024, 01:50 AM
    4 responses
    49 views
    0 likes
    Last Post futtrader  
    Working...
    X