Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plotting 2 SMAs within one Indicator

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

    Plotting 2 SMAs within one Indicator

    Greetings!

    I've discovered (I think) that two SMAs of different lengths can not be plotted from within one Indicator. The indicator would compile, but the process would stop dead in its tracks upon seeing the second SMA plot request. I deleted the second SMA plot request, and it ran fine.

    e.g. SMAFast.Set(SMA(8));
    SMASlow.Set(SMA(30));

    Any thoughts?

    Thanks! :-)

    #2
    You don't want to "Set" to a whole DataSeries. You want to set to individual values. Try this:

    Code:
    SMAFast.Set(SMA(8)[COLOR=Red][0][/COLOR]);     
    SMASlow.Set(SMA(30)[COLOR=Red][0][/COLOR]);
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thank you!

      I am an idiot ... I had 5 plots, and in the "Properties" section, allocated values 0,1,2,4,and 5. So it didn't recognize a 5th plot ... (should have been values 0,1,2,3,4) ... Grrr.

      I can't tell you how much time I spent trying to figure out something so stupid!

      Thank you again!

      :-)

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      566 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      330 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      547 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      548 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X