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 CaptainJack, 05-29-2026, 05:09 AM
        0 responses
        173 views
        0 likes
        Last Post CaptainJack  
        Started by CaptainJack, 05-29-2026, 12:02 AM
        0 responses
        91 views
        0 likes
        Last Post CaptainJack  
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        130 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        209 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        186 views
        0 likes
        Last Post CarlTrading  
        Working...
        X