Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Custom PeriodType Names

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

    Custom PeriodType Names

    Hello

    How can I find out what my custom PeriodTypes are, is there a mapping somewhere where I can see the names of the custom types??
    (E.g. PeriodType.Custom0 , PeriodType.Custom1 )

    Thanks
    Michael

    #2
    Hello Michael,

    Thanks for your note.

    There is not a centralized place where you can find these.

    You will need to go through the bar type files and check to see which bar types are using those custom bar slots.

    These files are located in:
    • (My) Documents\NinjaTrader 7\bin\Custom\Type


    If the files are protected assemblies that do not allow the code to be viewed, then you will need to use trial and error to find which bar types are being used by using a custom bar type set to each of those slots one by one.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank you!

      In Initialize() do :
      Add(PeriodType.Final4, 12)

      Is there a way to control how many DaysToLoad for the added PeriodType?

      Thanks
      Michael

      Comment


        #4
        Hi bagira198011,

        The Days to load will be the Days to load set on the Chart or in the strategy's parameters if you are adding the script to directly to the Strategies tab of the Control Center.

        Any secondary series will use the same Days to load as the primary series.

        If you are trying to get a chunk of data that is out of sync this is possible but unsupported.

        There is an example of how to do this in the included Pivots indicator (Tools -> Edit NinjaScript -> Indicator... -> Pivots).

        The relevant code is on lines 104 to 115 and 318 to 329.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Aviram Y, Today, 05:29 AM
        0 responses
        1 view
        0 likes
        Last Post Aviram Y  
        Started by quantismo, 04-17-2024, 05:13 PM
        3 responses
        25 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by ScottWalsh, 04-16-2024, 04:29 PM
        7 responses
        34 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by cls71, Today, 04:45 AM
        0 responses
        6 views
        0 likes
        Last Post cls71
        by cls71
         
        Started by mjairg, 07-20-2023, 11:57 PM
        3 responses
        216 views
        1 like
        Last Post PaulMohn  
        Working...
        X