Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Difference backtest and chart

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

    Difference backtest and chart

    Hi, I am using a strategy in a backtest and use the same strategy attached to a chart. Is there any way how I can test in the code of the strategy if the strategy is used in a backtest or used attached to a chart? The variable 'history' is not usable, because for the backtest as well for historical bars in the chart it returns 'true'. Any suggestion?

    Kind regards,
    Rene

    #2
    Rene, unfortunately nothing really supported per NinjaScript in that area, but a test for Account.Name should be useful, since in backtest that should report the Backtest101 string compared to your live account or Sim101 when used from the chart.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    105 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    53 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    35 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    38 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    74 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X