Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Renko Chart Computation Detail

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

    Renko Chart Computation Detail

    Hi there,
    My understanding is that Renko bricks are formed whenever the last price has either gone a certain number of ticks above the previous brick's top edge, forming a new brick upwards, or a certain number of ticks below the previous brick's bottom edge, forming a new brick downwards. My question is when I select a specific custom date range (such that I am only seeing data for some 3 days in the past), how does NT compute the very first Renko brick? That is, the main algorithm uses the previous brick to form a new brick, how much further back do you go prior to the selected date range? Thank you.
    Pedro

    #2
    The first tick of historical data is considered the 'previous brick' when calculating the first Renko bar that you will see.

    In other words, NinjaTrader looks at the first tick of your historical data then compares subsequent ticks to that tick's value to determine the color/direction of the first brick that you will see.

    For example, lets say you are loading a 7 Renko chart. NinjaTrader looks at the first available historical tick and uses this as the previous bar's value.. It looks at the subsequent ticks and when one of these ticks is either 7 ticks greater or less than the first tick, the chart prints the brick in that direction.

    Comment


      #3
      Patrick,
      Thanks for the quick response. Just to clarify this for myself. When you say historical data, it sounds like you're talking about only the data I selected, for instance, if I chose my data to be 7/10 through 7/11, then this first tick you're referring is the very first tick data in 7/10, correct? And also, when you say "previous bar' value," you mean to say that the value will both be a top and bottom edge for comparison, correct?

      Finally, I found this piece of code in NT, and I was wondering if it had anything to do with this.

      public override int GetInitialLookBackDays(BarsPeriod period, TradingHours tradingHours, int barsBack)
      {
      return 3;
      }


      Thank you.

      Pedro

      Comment


        #4
        Hello Pedro,

        Thanks for the additional questions.

        I believe you understand correctly.

        NinjaTrader charts load with historical data and then proceed into real time data processing. The first tick of the historical data series for when you load it will be the starting tick for the creation of the Renko bar. If your starting date is 7/10, then the first tick of the session on that day will be the starting tick for the bar formation. Once the bar exceeds the number of ticks in either direction, the bar is then formed. The initial tick is neither considered a top or bottom until the bar finishes its formation.

        GetInitialLookBackDays() is a method used in creating BarsTypes to place an initial number of Days To Load when you create a data series with that particular bar type. You can observe that if you switch the bar type from and back to Renko in the Data Series window, you can see that the value 3 is placed in the Days To Load field. You can specify less if you wish, as the value of 3 was chosen as an appropriate amount of data to load as an initial value.

        Please let me know if I can be of further help.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by quantismo, 04-17-2024, 05:13 PM
        3 responses
        25 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by ScottWalsh, 04-16-2024, 04:29 PM
        7 responses
        34 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by cls71, Today, 04:45 AM
        0 responses
        5 views
        0 likes
        Last Post cls71
        by cls71
         
        Started by mjairg, 07-20-2023, 11:57 PM
        3 responses
        214 views
        1 like
        Last Post PaulMohn  
        Started by TheWhiteDragon, 01-21-2019, 12:44 PM
        4 responses
        547 views
        0 likes
        Last Post PaulMohn  
        Working...
        X