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

how to read top or bottom of chart?

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

    how to read top or bottom of chart?

    Hi, how can I determine the price at the top of the chart or bottom of the chart? I mean not the data... simply if chart displays 100.15 to 100.40 then how do I get this 100.40 (or close to it) value? ... and also the 100.15 value?

    #2
    If I understand you correctly, you want to know the approximate high and low of recent price actions. Depending on your timeframe, it may suffice to call CurrentDayOHL method to find the high and low of the current day. If you want to know specifically the high of the last, say, 30, bars, you can create a private variable of the DataSeries type initially. When the OnBarUpdate method is called, pouplate it with highs of the last 30 bars and use the Max function to find the high for the last 30 bars. With a similar approach, you can find the low.

    Comment


      #3
      thanks but no, well yes,, it is price action... the high and low of the chart window... all I want to know is what is the price of the top of the chart and the price of the bottom.

      Or if that is not possible, then how do I determine how many bars the chart window is showing? If I know that then I can figure out the top of the chart and the bottom by getting the high and low of the last x bars where x is the number of bars visible in the chart window.

      Comment


        #4
        I see what you want now. First, I want to correct myself on how to find the highest high of the recent n bars. The method to use is HighestBar. Second, I am curious why an indicator even cares about how many bars are visible in the chart. I would think the market (and therefore your indicador) does not care how you resize or scroll your chart. However, if you want to find it out to ensure your indicator's plots are visible in the chart, you can set its AutoScale property to true.

        Comment


          #5
          Originally posted by NinjaCustomer View Post
          Hi, how can I determine the price at the top of the chart or bottom of the chart? I mean not the data... simply if chart displays 100.15 to 100.40 then how do I get this 100.40 (or close to it) value? ... and also the 100.15 value?

          Check the CalculateValueAreaHisto indicator.

          Comment


            #6
            thanks for the help guys

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Christopher_R, Today, 12:29 AM
            0 responses
            9 views
            0 likes
            Last Post Christopher_R  
            Started by sidlercom80, 10-28-2023, 08:49 AM
            166 responses
            2,235 views
            0 likes
            Last Post sidlercom80  
            Started by thread, Yesterday, 11:58 PM
            0 responses
            3 views
            0 likes
            Last Post thread
            by thread
             
            Started by jclose, Yesterday, 09:37 PM
            0 responses
            8 views
            0 likes
            Last Post jclose
            by jclose
             
            Started by WeyldFalcon, 08-07-2020, 06:13 AM
            10 responses
            1,415 views
            0 likes
            Last Post Traderontheroad  
            Working...
            X