Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SMA Overlay's

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

    SMA Overlay's

    Hi,

    Have a few different SMA's on an indicator and I want to make sure they layed on top on each over in the correct order.

    SMA's are 200,50,12


    I want the 50 SMA to be under the 200 and 12. At the moment its a random thing when I load onto a chart.

    Code is as follows......

    protectedoverridevoid Initialize()
    {
    Add(new Plot(Color.FromKnownColor(KnownColor.CornflowerBlu e), PlotStyle.Line, "Plot12"));
    Add(
    new Plot(Color.FromKnownColor(KnownColor.Gray), PlotStyle.Line, "Plot50"));
    Add(
    new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot200"));

    Overlay =
    true;

    CalculateOnBarClose=
    false;
    }


    protectedoverridevoid OnBarUpdate()
    {




    Plot12.Set(SMA(period12)[
    0]);

    Plot50.Set(SMA(period50)[
    0]);


    Plot200.Set(SMA(period200)[
    0]);





    }


    Can I overlay the 200 and 12 over the 50 SMA?



    Thanks
    Bruce

    #2
    Bruce, the plots ZOrder could unfortunately not be set per plot, only per indicator. It would be therefore easiest if you add the SMA indicator 3 times with your desired settings and then change the ZOrder as needed with those instructions here : http://www.ninjatrader.com/support/m...rt-Z-Order.htm

    Then save this setup in a workspace file for future use.

    Comment


      #3
      Ok..thanks. Got it sorted out now.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      579 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      334 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
      554 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X