Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding new Bar object to Chart

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

    Adding new Bar object to Chart

    In the video for V7 charting there is an example of adding a second time series to the chart, changing the plot of the first time series to Box and having the second time series displayed withing this box.

    I would like to duplicate that display but use the second time series that is added in a strategy. Is it possible to display a time series added to a strategy from the strategy so that both the chart and strategy have access to the same second time series?

    #2
    Hello GuyFB,

    Thank you for your post.

    Yes, this is possible but there's no automatic syncing of charts series with a strategies series.

    Strategies series are added manually through the intialize method. This help guide article can help with the syntax needed to add multiple series to a strategy.

    You have to manually set the chart series and then manually add the strategy series through code.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Ryan,
      So what you are telling me is that by adding a Bar series to a strategy does not add the series to a chart like adding an indicator to a strategy adds the indicator to the chart.

      To get the second bar series to display in the chart I must add it to the chart separately. There for the displayed bar series and what is used in the strategy could be different so I am responsible to coordinate. IS THAT CORRECT??

      Also::
      Is it possible to display an indicator from the strategy that is based on a second added bar series?

      Comment


        #4
        If you add a secondary series to a strategy, the bar data is loaded, but the chart does not display this series unless you manually add it through the Right Click > Data Series option.

        Yes, you are responsible for matching a chart series added manually through the GUI with a strategy series added through code.

        It is possible to plot indicators based on a secondary series using a Strategy. However, the GUI makes this much easier. When adding the indicator you can choose among all the chart series to base its calculations from.

        See here for the reference sample on plotting from within a strategy.
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by GussJ, 03-04-2020, 03:11 PM
        11 responses
        3,221 views
        0 likes
        Last Post xiinteractive  
        Started by andrewtrades, Today, 04:57 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by chbruno, Today, 04:10 PM
        0 responses
        6 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        436 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        9 views
        0 likes
        Last Post FAQtrader  
        Working...
        X