Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT7: Plotting Multiple EMA from Different Range Barss

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

    NT7: Plotting Multiple EMA from Different Range Barss

    In NT 7 I have a chart whose primary series is a 13Range bar, I want to plot the 13-bar EMA from the 4,13,21,and 34 Range bars---on this chart, I do NOT need the 4,21,34 range bars to plot--just the 13-bar EMA from them.

    I have added the EMA's by adding these other series to the charts 'data series' definition, however, it is distorting the visual display the primary chart.

    Is there a way to NOT plot the other series bars other than the primary?

    Ultimately I want a single bar chart (13 Range Bar)--with 4 EMA lines--all a 13Bar EMA plot from the 4,13,21,and 34 Range bars.

    I don't think I can ratio the EMA's like I could in a time chart (like a 13 minute chart)--because the bars don't form in sync with each other.
    Jim-Boulder
    NinjaTrader Ecosystem Vendor - Elephant Tracks

    #2
    Hello Jim- Boulder,

    You can do this with custom programming a multiseries indicator. Series are added for calculation purposes, but not plotted.

    A sample multiseries script is available by clicking tools > edit NinjaScript > Strategy > Sample MultiTime frame. Documentation is available here:


    Add the series in the indicators Initialize() method. You can then pass BarsArray[ ] into the EMA. 0 = Primary Series, 1 = Secondary Series, 2 = Third series, etc.

    Value.Set(EMA(BarsArray[1], 13)[0]); //Plots the second series EMA (first added series)
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      thanks-how would I add an additional PLOT line to plot the EMA of dataseries index 3 for instance...I am having issues adding multiple Plot lines inside (one for each dataseries) of the strategy....
      Jim-Boulder
      NinjaTrader Ecosystem Vendor - Elephant Tracks

      Comment


        #4
        If this is in a strategy, you first add statements in the Initialize method. These are just placeholders for the actual values that are set in OnBarUpdate. This sample can help with strategy plotting:
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        51 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        31 views
        0 likes
        Last Post PaulMohn  
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        165 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        100 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        160 views
        2 likes
        Last Post CaptainJack  
        Working...
        X