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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    66 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    36 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    59 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    62 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    52 views
    0 likes
    Last Post CarlTrading  
    Working...
    X