Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

indicator from another timeframe on chart

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

    indicator from another timeframe on chart

    i trade on a 2 minute chart. but, my exit is on another timeframe on an indicator. is there a way to have that other timeframe indicator on the 2 minute chart?

    #2
    Hello SteveReiza,

    Thanks for your post.

    Are you referring to plotting an indicator from a custom NinjaScript strategy you created?

    AddChartIndicator() is used to plot an indicator on a chart from a strategy.

    Note from the AddChartIndicator() help guide:

    "An indicator being added via AddChartIndicator() cannot use any additional data series hosted by the calling strategy, but can only use the strategy's primary data series. If you wish to use a different data series for the indicator's input, you can add the series in the indicator itself and explicitly reference it in the indicator code (please make sure though the hosting strategy has the same AddDataSeries() call included as well)"

    This means that you could make a copy of the indicator are using in the script, call AddDataSeries() in the indicator, and modify the code to process based on the added secondary series.

    Then, you could call AddChartIndicator() in your NinjaScript strategy to plot that indicator on the chart.

    On this forum thread is a reference sample you could view demonstrating this concept: https://forum.ninjatrader.com/forum/...35#post1069735

    In the reference sample on the forum thread linked above, a copy of the EMA indicator is made, we call AddDataSeries() in the indicator and have is process logic on the added series (BarsInProgress 1 in this case). Then, in the strategy we call AddDataSeries() to add the same data series the indicator is using to the strategy and we call AddChartIndicator() to plot the indicator on the chart from the strategy.

    See the help guide documentation below for more information.

    AddDataSeres(): https://ninjatrader.com/support/help...dataseries.htm
    Working with Multi-Timeframe/Multi-Series NinjaScripts: https://ninjatrader.com/support/help...nstruments.htm
    BarsInProgress: https://ninjatrader.com/support/help...inprogress.htm

    If you are not referring to custom NinjaScripts, you could add a second data series to the chart window, add the indicator to the chart, set the indicator's 'Input series' property to the second data series, and set the 'Panel' property to '1'.

    An example of this could be seen on this publicly available YouTube video called 'How to Plot Indicators on Hidden Data Series in NinjaTrader':
    Get started with the NinjaTrader software for FREE: http://ninjatrader.com/GetStartedThis video demonstrates how to plot an indicator based off of one data s...


    Working with Charts: https://ninjatrader.com/support/help...nt8/charts.htm
    Last edited by NinjaTrader_BrandonH; 02-15-2024, 12:49 PM.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      thanks for the reply. i'm using chart trader. so, i'm trying to add it from the input series. but, i'm not seeing another option to select other than the 2 minute (the timeframe of the chart).
      Attached Files

      Comment


        #4
        Hello SteveReiza,

        Thanks for your notes.

        You will have to first add a second data series to the chart window before you could select the second data series as the input series for the indicator.

        To add the second data series to the chart, select the 'Data Series' button on the Chart Toolbar, pick the instrument on the 'Instrument' drop-down menu, and set your 'Type' and 'Value' properties for the second series, such as a 10-Minute series.

        You will see two data series listed in the 'Applied' section of the Data Series window.

        After adding the second data series to the chart, you could add the indicator to the chart and set the 'Input series' property to use the second data series and set the 'Panel' property to use the panel of the 2-Minute data series (likely Panel 1).

        See the help guide documentation below for more information.

        Working with Multiple Data Series on a Chart: https://ninjatrader.com/support/help...ata_series.htm

        Working with Indicators on a Chart: https://ninjatrader.com/support/help...indicators.htm
        Brandon H.NinjaTrader Customer Service

        Comment


          #5
          thanks for the reply. i tried adding the timeframe in the data series. and, it brings up that candle chart below the 2 minute chart. ..that's not what i'm looking for. i really actually don't want anything to appear on the 2 minute chart from when i add the other timeframe. is there a way to do that?

          Comment


            #6
            Hello SteveReiza,

            Thanks for your notes.

            To add an indicator to one data series on the chart and have the indicator calculate from another data series, you would have to have two data series added to the same chart window.

            If you do not want the secondary series to appear on the chart, you could plot the indicator on a hidden data series.

            The publicly available YouTube video called 'How to Plot Indicators on Hidden Data Series in NinjaTrader' linked in post # 2 demonstrates the steps to accomplish this. Please see the publicly available video linked below.

            How to Plot Indicators on Hidden Data Series in NinjaTrader: https://www.youtube.com/watch?v=XRGxiO3XW-k
            Brandon H.NinjaTrader Customer Service

            Comment


              #7
              thanks for the reply. okay sweet - i'll check out the youtube video.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Balage0922, Today, 07:38 AM
              0 responses
              5 views
              0 likes
              Last Post Balage0922  
              Started by JoMoon2024, Today, 06:56 AM
              0 responses
              6 views
              0 likes
              Last Post JoMoon2024  
              Started by Haiasi, 04-25-2024, 06:53 PM
              2 responses
              19 views
              0 likes
              Last Post Massinisa  
              Started by Creamers, Today, 05:32 AM
              0 responses
              6 views
              0 likes
              Last Post Creamers  
              Started by Segwin, 05-07-2018, 02:15 PM
              12 responses
              1,786 views
              0 likes
              Last Post Leafcutter  
              Working...
              X