Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Data Series

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

    Data Series

    Hi guys, anyway to set the data series to 1 second, but days to load to 0... We need the data series to be set to 1 second but we don't want to load any data at the startup...

    Thank you

    dawid

    #2
    Hello Dawid,

    Thank you for your post.

    You can add a Historical check to ensure nothing is ran on historical data:
    Code:
    protected override void OnBarUpdate() 
    { 
        // Only run on real-time data
        if (Historical) 
             return;
    For information on Historical please visit the following link: http://www.ninjatrader.com/support/h...historical.htm

    Please let me know if I may be of further assistance.

    Comment


      #3
      Thanks for the reply!

      I have a strategy that reads parameter settings from a text file. I was wondering what would be the best way to get the ninja script to read my file every x seconds or on every bar update - that is why need have the data series set to 1 second but starting the strategies is taking very long, especially on slower machines...
      After the file is read script should update orders (offset, quantity etc.). The script works fine in Simulated Data Feed environment, but i have some issues when connected to my broker.

      Comment


        #4
        Hello Dawid,

        Thank you for your response.

        If you wanted to read form the file on every bar update use CalculateOnBarClose = false. For information on CalculateOnBarClose please visit the following link: http://www.ninjatrader.com/support/h...onbarclose.htm

        Please let me know if I may be of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by sidlercom80, 10-28-2023, 08:49 AM
        171 responses
        2,275 views
        0 likes
        Last Post QuantKey_Bruce  
        Started by Irukandji, Yesterday, 02:53 AM
        2 responses
        17 views
        0 likes
        Last Post Irukandji  
        Started by adeelshahzad, Today, 03:54 AM
        0 responses
        3 views
        0 likes
        Last Post adeelshahzad  
        Started by CortexZenUSA, Today, 12:53 AM
        0 responses
        3 views
        0 likes
        Last Post CortexZenUSA  
        Started by CortexZenUSA, Today, 12:46 AM
        0 responses
        1 view
        0 likes
        Last Post CortexZenUSA  
        Working...
        X