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 Perr0Grande, Today, 08:16 PM
            0 responses
            2 views
            0 likes
            Last Post Perr0Grande  
            Started by elderan, Today, 08:03 PM
            0 responses
            5 views
            0 likes
            Last Post elderan
            by elderan
             
            Started by algospoke, Today, 06:40 PM
            0 responses
            10 views
            0 likes
            Last Post algospoke  
            Started by maybeimnotrader, Today, 05:46 PM
            0 responses
            11 views
            0 likes
            Last Post maybeimnotrader  
            Started by quantismo, Today, 05:13 PM
            0 responses
            7 views
            0 likes
            Last Post quantismo  
            Working...
            X