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)[0]);     
    SMASlow.Set(SMA(30)[0]);
    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 jcbinks, Today, 03:32 PM
      2 responses
      14 views
      0 likes
      Last Post jcbinks
      by jcbinks
       
      Started by Stefan Mayer, Today, 03:09 PM
      1 response
      13 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by M_ichel, Today, 03:18 PM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_ShawnB  
      Started by ralett, Today, 02:43 PM
      2 responses
      15 views
      0 likes
      Last Post ralett
      by ralett
       
      Started by Nightmaregpu, Today, 02:18 PM
      1 response
      13 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Working...
      X