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 burtoninlondon, Today, 12:38 AM
    0 responses
    9 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    14 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Yesterday, 07:51 PM
    0 responses
    13 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,983 views
    3 likes
    Last Post jhudas88  
    Working...
    X