Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

performance info error change Time Range on source code

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

    performance info error change Time Range on source code

    Hello,

    I have changed the time frame range in the optimizer backtest by source code using params.

    Code:
    protected override void Initialize()
    ..
    BackTestFrom = new DateTime(YearFrom, MonthFrom, 1); 
    BackTestTo = new DateTime(YearFrom, MonthFrom+1, 1);
    But the performance windows don't show true info:
    World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.


    World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.


    World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.


    And don't print the true info

    Code:
    protected override void OnBarUpdate()
    ..
     if ((base.CurrentBar == (base.Bars.Count - 2)) && !this.infoShow)
                        {
                            this.infoShow = true;
                            base.Print(" \x00b7 Start Date: " + BackTestFrom.ToString());
                            base.Print(" \x00b7 End Date: " + BackTestTo.ToString()); 
                            base.Print(" \x00b7 Total Profit: " + base.Performance.AllTrades.TradesPerformance.Currency.CumProfit + " $/€ "); 
    ..
    · Start Date: 01/02/2016 0:00:00
    · End Date: 01/03/2016 0:00:00
    · Total Profit: 769,999999999975 $/€
    · Start Date: 01/04/2016 0:00:00
    · End Date: 01/05/2016 0:00:00
    · Total Profit: 769,999999999975 $/€
    · Start Date: 01/01/2016 0:00:00
    · End Date: 01/02/2016 0:00:00
    · Total Profit: 769,999999999975 $/€
    · Start Date: 01/03/2016 0:00:00
    · End Date: 01/04/2016 0:00:00
    · Total Profit: 769,999999999975 $/€
    · Start Date: 01/06/2016 0:00:00
    · End Date: 01/07/2016 0:00:00
    · Total Profit: 769,999999999975 $/€
    · Start Date: 01/05/2016 0:00:00
    · End Date: 01/06/2016 0:00:00
    · Total Profit: 769,999999999975 $/€
    · Start Date: 01/07/2016 0:00:00
    · End Date: 01/08/2016 0:00:00
    · Total Profit: 769,999999999975 $/€
    · Start Date: 01/07/2016 0:00:00
    · End Date: 01/08/2016 0:00:00
    · Total Profit: 2270 $/€
    · Start Date: 01/02/2016 0:00:00
    · End Date: 01/03/2016 0:00:00
    · Total Profit: 419,999999999995 $/€
    · Start Date: 01/03/2016 0:00:00
    · End Date: 01/04/2016 0:00:00
    · Total Profit: 2360,00000000001 $/€
    Best Regards
    David

    #2
    Hello,

    Thank you for the question.

    Unfortunately the images leave out any relevant information such as the values used for the properties you are asking about.

    In order to make sense of the prints, I would need to both see the exact syntax used and also the values used for the test being shown. Could you provide a simplified example of a single property and how you are currently using it? I could then check the syntax to see what may be happening.

    Our support does not provide debugging services so I may be unable to say why the whole script is failing, but if you can excerpt the logic for just the Time restriction you are using, I may be able to see what is happening with that.

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    571 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    331 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    549 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    550 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X