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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    71 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    143 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    76 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    47 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    51 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X