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 carnitron, Today, 08:42 PM
        0 responses
        5 views
        0 likes
        Last Post carnitron  
        Started by strategist007, Today, 07:51 PM
        0 responses
        7 views
        0 likes
        Last Post strategist007  
        Started by StockTrader88, 03-06-2021, 08:58 AM
        44 responses
        3,974 views
        3 likes
        Last Post jhudas88  
        Started by rbeckmann05, Today, 06:48 PM
        0 responses
        8 views
        0 likes
        Last Post rbeckmann05  
        Started by rhyminkevin, Today, 04:58 PM
        4 responses
        58 views
        0 likes
        Last Post dp8282
        by dp8282
         
        Working...
        X