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

Changing chart timeframe.

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

    Changing chart timeframe.

    Hello. Is there a way to change timeframe of chart via code?

    #2
    Hello blekdzhon,

    Thanks for opening the thread.

    It is possible to load a separate data series and use the data series for calculation, but it is not possible to dynamically load a new data series or change the primary data series (the bar type, period, and time frame.)

    We are tracking interest in dynamically loaded data series', but as this is more in reference to changing the primary data series, I will submit a separate feature request on your behalf. I'll update this post with the feature request ticket ID when I receive it.

    EDIT: This feature is being tracked with the Dynamically added additional data series feature request. The ticket ID is SFT-882 and can be noted in the release notes pages of the help guide for the version of NinjaTrader 8 that includes that feature's implementation.

    Release Notes: https://ninjatrader.com/support/help...ease_notes.htm

    Please let me know if I may be of further assistance.
    Last edited by NinjaTrader_Jim; 06-13-2017, 09:55 AM.
    JimNinjaTrader Customer Service

    Comment


      #3
      Originally posted by blekdzhon View Post
      Hello. Is there a way to change timeframe of chart via code?
      Is there a way to access the timeframe of a chart via code so I have multiple charts running and for example have a signal on a 50 tick chart or 100 tick chart and want to send an alert to the alerts window along the lines of 'FDAX 50 tick chart signal A detected', 'FDAX 100 tick chart signal B detected'?

      Comment


        #4
        Hello mballagan,

        Yes, you can check BarsPeriod and Instrument.MasterInstrument (for BarsInProgess 0 for multi series NinjaScripts) to get information about the data series that the NinjaScript is attached to.

        Alerts can be sent with the Alert() method.

        Here are links to openly available documentation on the items discussed.

        Instrument.MasterInstrument.Name - https://ninjatrader.com/support/help...ument_name.htm

        BarsPeriod - https://ninjatrader.com/support/help...barsperiod.htm

        Alert() - https://ninjatrader.com/support/help...n-us/alert.htm

        If you have any questions on the items referenced here, please don't hesitate to bump the thread.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by alifarahani, Today, 09:40 AM
        2 responses
        12 views
        0 likes
        Last Post alifarahani  
        Started by junkone, Today, 11:37 AM
        3 responses
        15 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by pickmyonlineclass, Today, 12:23 PM
        0 responses
        1 view
        0 likes
        Last Post pickmyonlineclass  
        Started by frankthearm, Yesterday, 09:08 AM
        12 responses
        44 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by quantismo, 04-17-2024, 05:13 PM
        5 responses
        35 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X