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

Ninzarenko multiple data series (NT8)

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

    Ninzarenko multiple data series (NT8)

    Is this the correct way to call a Multiple data series using NinzaRenko bar type?

    else if (State == State.Configure)
    {
    AddDataSeries(Data.BarsPeriodType.NinzaRenko, Value=6, Value2=4);
    AddDataSeries(Data.BarsPeriodType.NinzaRenko, Value=4, Value2=2);

    #2
    Hello futuros,

    Thank you for your post.

    The code you have would not be correct, however, you can add a custom BarsType which is installed on your system by casting the registered enum value for that BarsPeriodType. For example: AddDataSeries((BarsPeriodType)14, 10);

    You can find further information in the tips for AddDataSeries():

    https://ninjatrader.com/support/help...dataseries.htm

    If you do not know the registered enum value, you can contact the Ninza and they should be able to get you that information.

    Please let us know if we may be of further assistance to you.
    Last edited by NinjaTrader_ChelseaB; 06-26-2022, 11:24 PM.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Kate View Post
      Hello futuros,

      Thank you for your post.

      No, however, you can add a custom BarsType which is installed on your system by casting the registered enum value for that BarsPeriodType. For example: AddDataSeries((BarsPeriodType)14, 10);

      You can find further information in the tips for AddDataSeries():



      If you do not know the registered enum value, you can contact the Ninza and they should be able to get you that information.

      Please let us know if we may be of further assistance to you.
      So the correct way to call this Bar type from a trading system would be?

      else if (State == State.Configure)
      {
      AddDataSeries((BarsPeriodType)6, 4);
      AddDataSeries((BarsPeriodType)4, 2);

      Comment


        #4
        futuros, you should call these statements in State.Configure:

        // adding 1st series for ninZaRenko 8/4
        AddDataSeries(new BarsPeriod() {
        BarsPeriodType = (BarsPeriodType)12345, // ninZaRenko’s ID
        Value = 8, // Brick Size
        Value2 = 4 // Trend Threshold
        });

        // adding 2nd series for ninZaRenko 6/2
        AddDataSeries(new BarsPeriod() {
        BarsPeriodType = (BarsPeriodType)12345, // ninZaRenko’s ID
        Value = 6, // Brick Size
        Value2 = 2 // Trend Threshold
        });
        ninZa
        NinjaTrader Ecosystem Vendor - ninZa.co

        Comment


          #5
          What if it is Multi Instrument, lets say based on /ES ninza renko, I want to buy other script. I have it like below, is it right?

          AddDataSeries("ES 03-21", new BarsPeriod() {
          BarsPeriodType = (BarsPeriodType)12345, // ninZaRenko’s ID
          Value = 8, // Brick Size
          Value2 = 4 // Trend Threshold

          Comment


            #6
            Hello victorNT,

            Thank you for your reply.

            Other than the fact that you're missing the closing curly bracket, parenthesis and semi-colon, this looks correct. So:

            AddDataSeries("ES 03-21", new BarsPeriod() {
            BarsPeriodType = (BarsPeriodType)12345, // ninZaRenko’s ID
            Value = 8, // Brick Size
            Value2 = 4 // Trend Threshold
            });

            Should work for you.

            Please let us know if we may be of further assistance to you.
            Kate W.NinjaTrader Customer Service

            Comment


              #7
              Thanks. Yah I missed that part in copy paste.

              Comment


                #8
                Can somebody share Ninza Renko strategy if you have one?

                Comment


                  #9
                  Hello, how would I program an indicator that shows me the color of the bar previous to the current one on different NinzaRenko charts? that is, it shows me the color of the bar previous to the current one (bullish or bearish) of the graphs of 64/16, 32/8, 16/4

                  Comment


                    #10
                    Hello Jquiroz1975,

                    Thanks for your notes.

                    First, you would need to add the data series to the script using AddDataSeries() similar to what NinjaTrader_Kate noted in post # 6.

                    Note that the first added series in a script will have a barSeriesIndex of 1. The second added series in a script will have a barSeriesIndex of 2, and so on.

                    Then you would use the plural of Open (Opens[int barSeriesIndex][int barsAgo]) and Close (Closes[int barSeriesIndex][int barsAgo]) to check if a bar is an up bar or a down bar.

                    For example, if the NinzaRenko data series is the first added series in the script, you could check if the NinzaRenko bar is an up bar (green) by creating a condition that checks if Closes[1][0] > Opens[1][0]. To check if the bar is a down bar you would create a condition that checks if Closes[1][0] < Opens[1][0].

                    Another example: if you have 2 NinzaRenko data series added to the script and you want to check if both of them are up bars, you could create a condition that checks if Closes[1][0] > Opens[1][0] && Closes[2][0] > Opens[2][0].

                    See the help guide documentation below for more information.

                    AddDataSeries: https://ninjatrader.com/support/help...dataseries.htm
                    Closes: https://ninjatrader.com/support/help...nt8/closes.htm
                    Opens: https://ninjatrader.com/support/help.../nt8/opens.htm
                    Working with Multi-Instrument/Multi-Timeframe NinjaScripts: https://ninjatrader.com/support/help...nstruments.htm
                    Brandon H.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by nandhumca, Today, 03:41 PM
                    0 responses
                    1 view
                    0 likes
                    Last Post nandhumca  
                    Started by The_Sec, Today, 03:37 PM
                    0 responses
                    3 views
                    0 likes
                    Last Post The_Sec
                    by The_Sec
                     
                    Started by GwFutures1988, Today, 02:48 PM
                    1 response
                    5 views
                    0 likes
                    Last Post NinjaTrader_Clayton  
                    Started by ScottWalsh, 04-16-2024, 04:29 PM
                    6 responses
                    32 views
                    0 likes
                    Last Post ScottWalsh  
                    Started by frankthearm, Today, 09:08 AM
                    10 responses
                    36 views
                    0 likes
                    Last Post frankthearm  
                    Working...
                    X