Announcement

Collapse
No announcement yet.

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 CarlTrading, 03-31-2026, 09:41 PM
                1 response
                156 views
                1 like
                Last Post NinjaTrader_ChelseaB  
                Started by CarlTrading, 04-01-2026, 02:41 AM
                0 responses
                90 views
                1 like
                Last Post CarlTrading  
                Started by CaptainJack, 03-31-2026, 11:44 PM
                0 responses
                140 views
                2 likes
                Last Post CaptainJack  
                Started by CarlTrading, 03-30-2026, 11:51 AM
                0 responses
                130 views
                1 like
                Last Post CarlTrading  
                Started by CarlTrading, 03-30-2026, 11:48 AM
                0 responses
                107 views
                0 likes
                Last Post CarlTrading  
                Working...
                X