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

PeriodType.Renko not getting processed

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

    PeriodType.Renko not getting processed

    I have an indicator that I want to use on Renko and min charts. however when I use :-

    if(BarsPeriod.BasePeriodType == PeriodType.Renko)

    it is equating to false and

    if(BarsPeriod.BasePeriodType == PeriodType.Minute)

    is equating to true when I run it on Renko charts

    Second question is does BarsPeriod refer to only the primary bar index or all that have been added?
    Last edited by GKonheiser; 11-19-2014, 05:28 AM.

    #2
    Hello GKonheiser,

    Thank you for your post.

    BarsPeriod will refer to the primary bar series.

    What you may want to be looking for is BarsPeriods:
    http://www.ninjatrader.com/support/h...arsperiods.htm

    The difference here is that it will allow you to select the other bar series that have been added to the script.

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      thanks for the info but its doesn't answer my question.

      When I have a renko chart I am using :-

      Code:
      if(BarsPeriod.BasePeriodType == PeriodType.Renko)
      to separate logic that is just for Renko charts but it is not processing it, Ive been tho the script with VS and its equating to false, what am I doing wrong?

      Comment


        #4
        If you adding another dataseries for the Renko then are you using
        "AddRenko("ES 06-10", 2, MarketDataType.Last);"
        It is different from "Add("ES 12-06", PeriodType.Tick, 100);"

        Comment


          #5
          No its the primary bar series and the logic is not getting processed??

          Comment


            #6
            Originally posted by GKonheiser View Post
            I have an indicator that I want to use on Renko and min charts. however when I use :-

            if(BarsPeriod.BasePeriodType == PeriodType.Renko)

            it is equating to false and

            if(BarsPeriod.BasePeriodType == PeriodType.Minute)

            is equating to true when I run it on Renko charts

            Second question is does BarsPeriod refer to only the primary bar index or all that have been added?
            The syntax says that that syntax is: "Only relevant for Kagi, LineBreak, and PointAndFigure Bars objects. Possible values: ..."

            You should be using BarsPeriod.Id.
            Attached Files
            Last edited by koganam; 11-19-2014, 08:05 AM.

            Comment


              #7
              Oh your right, I did have the page up but stupidly didn't see it : \ thx very much

              Comment


                #8
                Originally posted by GKonheiser View Post
                Oh your right, I did have the page up but stupidly didn't see it : \ thx very much
                Nothing stupid. We all overlook things at times. You would be surprised how many mistakes I make when I code. I am always surprised if my code works the very first time that I write it!

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by mattbsea, Today, 05:44 PM
                0 responses
                4 views
                0 likes
                Last Post mattbsea  
                Started by RideMe, 04-07-2024, 04:54 PM
                6 responses
                31 views
                0 likes
                Last Post RideMe
                by RideMe
                 
                Started by tkaboris, Today, 05:13 PM
                0 responses
                2 views
                0 likes
                Last Post tkaboris  
                Started by GussJ, 03-04-2020, 03:11 PM
                16 responses
                3,282 views
                0 likes
                Last Post Leafcutter  
                Started by WHICKED, Today, 12:45 PM
                2 responses
                20 views
                0 likes
                Last Post WHICKED
                by WHICKED
                 
                Working...
                X