Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can i only load the last X number of historical trades?

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

    Can i only load the last X number of historical trades?

    My strategy uses ticks to set stop losses based on real times. But when i load the strategy it takes a long time to load all the historical trades, so that it can determine its strategy position. Is there a way to only load the last few historical trades just so the strategy can determine the current position? I know it is possible to turn off all historical trades.

    #2
    Hello sofortune,

    Thanks for your post.

    You could consider loading fewer days of data in the 'Days to load' property of the Data Series window if you would like the strategy to process less historical data.

    For example, if you only want the strategy to process 1 day of historical data you could set the 'Days to load' property to 1 in the Data Series window.

    See the 'How To Edit Data Series Parameters' section of this help guide page for more information: https://ninjatrader.com/support/help...price_data.htm

    Otherwise, you could consider skipping historical processing in your strategy by adding if (State == State.Historical) return; to the top of your OnBarUpdate() logic.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    90 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    137 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    120 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    71 views
    0 likes
    Last Post PaulMohn  
    Working...
    X