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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    173 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    90 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    129 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    208 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    186 views
    0 likes
    Last Post CarlTrading  
    Working...
    X