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

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
    Chris L.NinjaTrader Customer Service

    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
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by habeebft, Today, 07:27 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_ChristopherS  
        Started by AveryFlynn, Today, 04:57 AM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by Max238, Today, 01:28 AM
        4 responses
        37 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by r68cervera, Today, 05:29 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by geddyisodin, Today, 05:20 AM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X