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 CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      32 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      195 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      356 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      277 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X