• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 MNinjaTrader 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 MNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by sun0781, Today, 05:02 PM
        0 responses
        6 views
        0 likes
        Last Post sun0781
        by sun0781
         
        Started by ronhb107, 09-12-2019, 10:09 AM
        4 responses
        41 views
        0 likes
        Last Post Mr.Trader  
        Started by rwilliam, Today, 03:55 PM
        0 responses
        3 views
        0 likes
        Last Post rwilliam  
        Started by asmmbillah, Today, 03:42 PM
        2 responses
        8 views
        0 likes
        Last Post asmmbillah  
        Started by NT-Roland, Today, 03:25 PM
        0 responses
        7 views
        0 likes
        Last Post NT-Roland  
        Working...
        X