• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Finding previous closing price

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

    Finding previous closing price

    I would like to find the prior closing price at the end of the business day (4:15 PM EST) for the ES (or any instrument based on its business day closing time.) I am using a 24 hour session so the PriorDay OHLC will not work.

    I then want to draw a line from that bars close tick through to the opening of the next day as a reference point.

    I believe I can use the DrawLine function to draw the line and the Closes function to get the closing price. I am not sure how to accurately go back in time to the right time bar to get the price.

    Can you recommend something?

    Thank you,

    MiamiTom

    #2
    Hello,

    I assume you do know want a programming answer. There is not setting out-right for doing this. However you could produce something like this in the Strategy Wizard which will program it for you:
    http://www.ninjatrader-support.com/H...verview37.html

    Or you could temporarily change the session times, look at the proper price, then change your sessions back and draw the line.
    DenNinjaTrader Customer Service

    Comment


      #3
      Hello,

      Yes I am looking to build a simple indicator to plot this line.

      Tom

      Comment


        #4
        Hello MiamiTom,

        Yes – you can program this in NinjaScript. NinjaScript is NinjaTrader's extension to the powerful Microsoft C# language. In addition to the core functionality of C# and the Microsoft .NET framework we have added features designed for the rapid implementation of custom indicators, automated trading systems and custom drawing.

        This link will take you to the NinjaScript section of our Help Guide:
        http://www.ninjatrader-support.com/H...tml?Overview17

        If you’re not a programmer & your indicators &/or strategies become more complex, you can check out this link for a list of NinjaScript consultants.
        http://www.ninjatrader.com/webnew/pa...injaScript.htm

        We also encourage you to search our Free NinjaScript File Sharing Section. There is a large community of programmers & traders that you can share ideas with & ask questions. Just follow this link:
        http://www.ninjatrader.com/support/f...splay.php?f=37

        Please let me know if I can answer any additional questions.
        ChipNinjaTrader Customer Service

        Comment


          #5
          Chip,

          This should be a simple indicator to develop without having to go through the NinjaScript.

          How can I get the closing price at an earlier time without counting back the bars? Is there a search function to the DataTime series function? Or is there a for loop function that will iterate me back checking for the time I want and then use the Closes function to get the price?

          Thank you,

          Tom

          Comment


            #6
            Hello MiamiTom,

            All indicators are developed with NinjaScript. The only indicator we have that works closely to what you want is the PriorDayOHLC indicator. You may consider supplementing your feed with provider that offers daily historical data. The "close" price of this feed will then typically be the settlement close you're looking for. See below for a list of our providers and the level of data supported.
            Click here to view more information on Historical Data

            For a programming solution you can use GetBar() to return the number of bars since the specified DateTime.

            A reference sample illustrating the use of this is available at the link below.
            http://www.ninjatrader.com/support/f...ad.php?p=44911
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Trade95, Today, 05:38 PM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_EricB  
            Started by Karelgp7, Today, 03:16 PM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by orenytz, Today, 01:18 PM
            1 response
            22 views
            0 likes
            Last Post NinjaTrader_PaulH  
            Started by des.kkeng, Today, 01:10 PM
            1 response
            13 views
            0 likes
            Last Post NinjaTrader_PatrickG  
            Started by Capablanca, Today, 12:35 PM
            1 response
            10 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X