• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Executions Today

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

    Executions Today

    I'm trying to check if there have been any trades on the current day in my strategy. Is this the best approach?
    Code:
    protected override void OnBarUpdate()
    
     if (SystemPerformance.AllTrades.Count  != 0)
    .
    .
    .
    I'm unclear on how long the SystemPerformance.AllTrades.Count holds the value. Seem like I need to have a date check, or is there a better approach?

    #2
    Hi Kentoes, thanks for your note.

    Once a trade is complete it will be added to the SystemPerformance.AllTrades trade collection. Every Trade object will have an "Exit" Execution object. The Execution object holds a timestamp that can be evaluated:
    https://ninjatrader.com/support/help...?execution.htm

    Please let me know if I can assist any further.
    Chris L.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by RogerLin, Today, 01:20 AM
    0 responses
    7 views
    0 likes
    Last Post RogerLin  
    Started by blokinjuka, Today, 01:16 AM
    0 responses
    2 views
    0 likes
    Last Post blokinjuka  
    Started by avrege, Today, 12:39 AM
    0 responses
    4 views
    0 likes
    Last Post avrege
    by avrege
     
    Started by ahm1992, Yesterday, 04:56 PM
    6 responses
    29 views
    0 likes
    Last Post bltdavid  
    Started by firstlanetech, Yesterday, 11:24 AM
    2 responses
    31 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X