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

Unirenko doesn't work as added dataseries

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

    Unirenko doesn't work as added dataseries

    I'm new to Unirenko and would like to use it in indicators as second and third dataseries, based on different bar sizes. While Unirenko works like it should as primary dataseries, it doesn't when added with the Add() method. This is how I coded it:

    Add(PeriodType.Custom5, 002014006);

    but I only see either nothing or lines that a too far away to mean anything. I tried to swap the "2" and the "6", because I found different information about how to combine the three parameters in the argument, but to no avail. I know that my logic of building the plots using the BarsInProgress switch works, because it does so when I add other bar structures, like the normal Renko, for test purposes.
    I downloaded the original type code that is found here in the Forum; does it already contain the parsing logic for the argument? If so, does anyone know what I might be doing wrong?

    #2
    Hello Loki45,

    Thank you for your inquiry.

    I would suggest taking a look at the last response of this particular thread on how to format the Period for the UniRenko bar: http://ninjatrader.com/support/forum...ad.php?t=78108

    What is your indicator attempting to plot?
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Thanks for your reply. The thread you referenced was in fact one of the many that I studied before starting with the Unirenko project.
      Here is what I'm trying to accomplish: While the main bar structure of the chart runs on Unirenko(Parameterset 1), I want an indicator like EMA being calculated and plotted based on Unirenko[Parameterset 2]. For that, I added the Unirenko[Parameterset 2] dataseries with the Add(), like I said in my OP. While in OnBarUpdate(), I calculate and plot the indicator values when BarsInProgress = 1, and plot the same just calculated values when BarsInProgress = 0, in order to create a closed line. I think that all is correct, because, like I also said in my OP, the code works when my added bar structure is based on something else than Unirenko, for instance when I do AddRenko(SomeInstrument, 4, SomeMarketData) or any other bar structure. So, something isn't working correctly, even if I take exactly the same Add() code posted in the thread you referenced.

      Comment


        #4
        Hello Loki45,

        For additional clarification on my end, can you please provide a sample script that duplicates the behavior you are getting?
        Zachary G.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by jaybedreamin, Today, 05:56 PM
        0 responses
        7 views
        0 likes
        Last Post jaybedreamin  
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        18 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        4 views
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        12 views
        0 likes
        Last Post Javierw.ok  
        Started by timmbbo, Today, 08:59 AM
        2 responses
        13 views
        0 likes
        Last Post bltdavid  
        Working...
        X