Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Starting a strategy without historical operations.

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

    Starting a strategy without historical operations.

    Good morning,

    I would like to start my custom strategy without the history of completed operations appearing.
    I have tried to configure:

    protected override void OnStateChange()
    {
    if (State == State.Configure)
    {
    // Exclude trade history in a backtest to benefit from memory savings
    IncludeTradeHistoryInBacktest = false;
    }
    }

    But it doesn't work.
    Could you help me?

    Thank you very much in advance and have a nice day.​

    #2
    Hello BIOK.NT,

    If you don't want to process historical data you can use the State in OnBarUpdate.

    Join the official NinjaScript Developer Community for comprehensive resources, documentation, and community support. Build custom indicators and automated strategies for the NinjaTrader platforms with our extensive guides and APIs.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    52 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    29 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    193 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    354 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    274 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X