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

bug on forum 10.09.2017

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

    bug on forum 10.09.2017

    here this part is mistake i think:

    BarsPeriod.BasePeriodType has incorrect description


    #2
    Hello selnomeria,

    Are you referring to the BarsPeriod page in the help guide which I am linking below?


    I am not showing this for BarsPeriod.BarsPeriodType but for BarsPeriod.BaseBarsPeriodType which is correct.

    If not, please include a link to the page you are referring to.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I mean this link : https://ninjatrader.com/support/help...barsperiod.htm

      Comment


        #4
        Hello selnomeria,

        The help guide is correct.

        When using any bar type other than Kagi, LineBreak, and PointAndFigure such as Minute, Tick, Volume, Day, Month, etc, you must use BarsPeriod.Id and you must not use BarsPeriod.BasePeriodType.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          then how to detect (in script) which type of chart is being used?

          lets say, i have a script, which should detect the chart type, which user uses (he might switch to kagi or minute bar, but script should detect them). how to do it?

          Comment


            #6
            selnomeria,

            You can create a condition.

            if (BarsPeriod.Id == PeriodType.Minute)
            {
            }
            else if (BarsPeriod.BasePeriodType == PeriodType.Kagi)
            {
            }
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              yes, that seems right !

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by suroot, 02-25-2017, 04:43 AM
              11 responses
              2,548 views
              0 likes
              Last Post Zilvercat  
              Started by Rogers101, 05-05-2024, 11:30 AM
              16 responses
              50 views
              0 likes
              Last Post Rogers101  
              Started by ninza33, Today, 12:31 PM
              2 responses
              10 views
              0 likes
              Last Post ninza33
              by ninza33
               
              Started by Bobin, 03-12-2024, 08:51 AM
              15 responses
              482 views
              0 likes
              Last Post fiddich
              by fiddich
               
              Started by Skifree, Today, 11:21 AM
              4 responses
              15 views
              0 likes
              Last Post Skifree
              by Skifree
               
              Working...
              X