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

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.
    Gaby V.NinjaTrader Customer Service

    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.
        Gaby V.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by rbeckmann05, Yesterday, 06:48 PM
        1 response
        12 views
        0 likes
        Last Post bltdavid  
        Started by llanqui, Today, 03:53 AM
        0 responses
        6 views
        0 likes
        Last Post llanqui
        by llanqui
         
        Started by burtoninlondon, Today, 12:38 AM
        0 responses
        10 views
        0 likes
        Last Post burtoninlondon  
        Started by AaronKoRn, Yesterday, 09:49 PM
        0 responses
        15 views
        0 likes
        Last Post AaronKoRn  
        Started by carnitron, Yesterday, 08:42 PM
        0 responses
        11 views
        0 likes
        Last Post carnitron  
        Working...
        X