Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SystemPerformance.AllTrades not usable while running the strategy not in Chart.

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

    SystemPerformance.AllTrades not usable while running the strategy not in Chart.

    obviously I have an option to run the strategy by defining it in the Strategy tab of the control center without actually having the chart open and the strategy attached to it.
    I also have in my strategy a mechanism that changes the position qty based on the statistics of previous trades.
    I use the SystemPerformance.AllTrades to get the data of the previous trades.
    all is working well while the strategy is running on a chart, but if its running standalone , I don't get the data of the previous trades.
    I specifically load 50 days of data while defining the strategy , so in principle I should have historical trades the same way I do while running on the chart.

    Is this something known ?

    Or I really have some incorrect usage in my code ? in which case i will digg dipper .
    thanks for helping

    #2
    Hello dadarara,

    Thank you for your post.

    There is a strategy property called IncludeTradeHistoryInBacktest that is defaulted to true except for when a strategy is running on the Strategies tab of the Control Center. You will need to programmatically set this property to true in State.SetDefaults to include the trade history and have access to SystemPerformance.AllTrades when running the strategy from the Strategies tab:


    Once you have made this change, compile the script and then remove and re-add the strategy to the Strategies tab to pickup the changes.

    Please let us know if we may be of further assistance.

    Comment


      #3
      exactly what I needed ,,
      thanks

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      88 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      134 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      119 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      67 views
      0 likes
      Last Post PaulMohn  
      Working...
      X