Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarsPeriods on NT8

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

    BarsPeriods on NT8

    Hello,

    I have a chart with a primary data series of 45 mins and a secondary data series of 5 mins. BarsPeriods[0].Value & BarsPeriods[1].Value report a value of 1. Is this the way it's supposed to work ?
    I was expecting 45 & 5 respectively. NT8 on Windows 10. Thank you.

    Anthony

    #2
    Hi Anthony, thanks for posting.

    My test script is working. Can you reproduce with the script I posted here? To test add the attached file into Documents\NinjaTrader 8\bin\Custom\Indicators and compile>run on a chart and observe the output window.

    Best regards,
    -ChrisL
    Attached Files

    Comment


      #3
      Hello Chris,

      It works but on Type = Minute, when Type is other like Heiken Ashi it the period is always at 1. Is there some work around or do I have to hardcode it ? Thanks

      Anthony

      Comment


        #4
        Hi Anthony,

        I was able to get the value with BarsPeriods[0].BaseBarsPeriodValue for the Heiken Aski type.

        Note that you can look at the source code for the default bars types in the platform in the BarsTypes folder for reference.

        Kind regards,
        -ChrisL

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        50 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        126 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        69 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        42 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        46 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X