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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    107 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    153 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    71 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    125 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    79 views
    0 likes
    Last Post PaulMohn  
    Working...
    X