Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AllTrades.TradesCount - PDT Pattern Day trade rule

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

    AllTrades.TradesCount - PDT Pattern Day trade rule

    I have looked at the documentation for the TradesCount method in the trades collection, but it doesn't specify over what period of time, or underlying symbols (if any differentiation), or account that it provides a count for.

    What period of time does TradesCount provide a count for? How to specify the last 7 days?
    Is it possible to specify all trades for all strategies for each account?
    How would one specify the count of trades within a period of time in a specific account?

    #2
    Hello AnotherWorkingHomeless, thanks for writing in.

    The SystemPerformance class will provide the performance of the strategy from the start of historical data (i.e. the leftmost bar on the chart) to the current forming realtime bar.

    If you need a time filter on the trades, your strategy would need to calculate this manually by iterating over the SystemPerformance.AllTrades list and selecting only the trades that fall into the specified time range.

    Strategies can only run on one account at a time, there is no supported way of getting all trades for all strategies on multiple accounts.

    The Account class has a list of Executions within, but this list is cleared every 24 hours. There is no supported way of getting executions from the database at this time.


    Please let me know if I can assist any further.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    94 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    51 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    80 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    75 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    62 views
    0 likes
    Last Post CarlTrading  
    Working...
    X