Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Data for Current Date

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

    Data for Current Date

    I am trying to get the "close" price for today's date, but only seem to be able to get everyday prior to today.

    If I loop through dates using the below. Today's date never gets hit.

    protected override void OnBarUpdate()
    {
    MessageBox.Show(Times[0].ToString());
    }

    This is in a indicator script.

    Thanks in advance.

    #2
    Welcome to our forums here - which CalculateOnBarClose setting were you working with in your study?

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Actually this seems to be working now!. Not sure if its just because of the time of day. Will check again later. In the Initialize function I have set CalculateOnBarClose = false;.

      While I have you is it possible to write scan scripts with NT? i.e loop through Instruments and do some calculations? Can you point me a document anywhere?

      Thanks!

      Comment


        #4
        Ok, yes if process on false > then it would mean the current bar process in OnBarUpdate() would be reflected otherwise it would reference the last fully closed bar.

        Yes, you can create so called MultiSeries (timeframe or instrument) scripts in NinjaTrader, we ship for example per default with the SampleMultiTimeFrame and SampleMultiInstrument strategies.

        A full documentation on the framework offered could be reviewed here -

        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by jxs_xrj, 01-12-2020, 09:49 AM
        6 responses
        3,290 views
        1 like
        Last Post jgualdronc  
        Started by Touch-Ups, Today, 10:36 AM
        0 responses
        8 views
        0 likes
        Last Post Touch-Ups  
        Started by geddyisodin, 04-25-2024, 05:20 AM
        8 responses
        61 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by Option Whisperer, Today, 09:55 AM
        0 responses
        8 views
        0 likes
        Last Post Option Whisperer  
        Started by halgo_boulder, 04-20-2024, 08:44 AM
        2 responses
        24 views
        0 likes
        Last Post halgo_boulder  
        Working...
        X