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

Load events in Ninjatrader in seconds, and draw Points for example

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

    Load events in Ninjatrader in seconds, and draw Points for example

    Hi how are you . I need to save certain events in 1 second timeframe in .txt.
    To then reload them in ninjatrader. Do you know how I can do it, or if there is any indicator that can load certain saved events at a specific time(in seconds, not minutes).
    I already know how to read and load text data, but it has always worked at price levels (https://ninjatraderecosystem.com/use...rgbpricelines/) and not at a specific time.
    Do you know of any indicator that does this.
    Thanks.

    #2
    Hello iradielt,

    I am not aware of an indicator with that specific task.

    You likely would need to create this type of item so that the data is saved in the format you wanted it. There are samples of reading/writing data in the following links which use .csv files however that is just the extension, you could also use .txt to store data.




    To do that at a 1 second timeframe would generally be easiest to use a 1 second chart and apply an indicator to that chart. If the indicator is using Calculate.OnBarClose then it will execute the OnBarUpdate logic each 1 second. Keep in mind if you are opening a file/writing data and it takes longer than 1 second then you will get a read/write error.
    You can also do other items like adding a 1 second secondary series to an indicator so it can be applied to any primary series and still have the logic run at 1 second intervals.

    Loading the data could be done using the indicators OnStateChange State.Historical/Configure/DataLoaded states. The script would load the data and wait for that code to finish before moving to other states.

    JesseNinjaTrader Customer Service

    Comment


      #3
      Hello, if I want to draw on a graph on a specific day and time.
      I need to load the history and draw the values on the day

      For example. 04/25/2015 05:32:30

      I found this indicator that works in seconds, but draws by hours (05:32:30) and not by days.
      How can I make him draw me on that specific day?

      Regards

      This is a V8 re‐write of the V7 indicator. It simply plots a vertical line at a specified time during the day. You can have multiple lines on a chart by using multiple instances of the indicator, and can set the color, line dash type, thickness and, of course, the time. For multiple indicator panels, […]
      Last edited by iradielt; 04-26-2022, 10:24 PM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by andrewtrades, Today, 04:57 PM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by chbruno, Today, 04:10 PM
      0 responses
      6 views
      0 likes
      Last Post chbruno
      by chbruno
       
      Started by josh18955, 03-25-2023, 11:16 AM
      6 responses
      436 views
      0 likes
      Last Post Delerium  
      Started by FAQtrader, Today, 03:35 PM
      0 responses
      9 views
      0 likes
      Last Post FAQtrader  
      Started by rocketman7, Today, 09:41 AM
      5 responses
      20 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X