Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Time based Renko Bricks development

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

    Time based Renko Bricks development


    I understand the irony of adding time to non-time based charts, but one of my strategies (the success of which is yet to be determined) involves me create this.

    To create this new BarType, I'm looking at the existing code for RenkoBarType and SecondBarsType. The base will be from RenkoBarType, but how do I add the timed bar data to it?
    The logic I would be looking for is to use the last tick value after x seconds to be used for constructing the Renko bar.

    Should I add data series for Time based Bars into my Renko code? And how do I use it after that?
    Any suggestions would be greatly appreciated.

    #2
    Hello admiralpanda,

    Thank you for your post.

    Data series cannot be added in a BarsType script.

    For a minute based renko, you would need to design your own custom logic. I recommend taking a look at the logic in the SecondBarsType script, in particular the TimeToBarTime() method to see an example of the logic for this.

    Please let us know if you have any further questions.

    Comment


      #3
      Thank you.
      I've looked at that one already. But without adding it the series to the chart, it would not be possible when the next x seconds are up right? Like in the case of SecondsBarsType, the function TimeToBarTime() gets the previous bar's time to understand where it is at.

      Comment


        #4
        Hello admiralpanda,

        Yes, the time is based on the previous bar. However, the first bar has a bar time rounded to the nearest interval of seconds. Then the subsequent bars are based on if the data update time is more than the interval of seconds later than the previous bar's close time.

        Please let us know if you have further questions.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        43 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        21 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        30 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        50 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        40 views
        0 likes
        Last Post CarlTrading  
        Working...
        X