Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indictor on Indicator

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

    Indictor on Indicator

    I'm new to Ninja, trying the V6 Simulation. I can't seem to find how to apply an indicator to an indicator. For example a 5 period SMA to a MACD Histogram.Is this possible, can someone point me in the right direction?

    Thanks,

    Guy


    TraderGuy
    NinjaTrader Ecosystem Vendor - EMS

    #2
    imported post

    a) You can not configure an indicator on indicator by NT UI.
    b) However you can code your own indicator by NinjaScript. To e.g. run an 14 period SMA on the MACD Diff (MACD has 3 data series: Macd, Avg and Diff), you could do something like this in your OnBarUpdate method:
    Code:
     protected override void OnBarUpdate()
     {
     Plot0.Set(SMA(MACD(12, 26, 9).Diff, 14)[0]);
     }
    I suggest starting of wizard generated indicator template and take it from there.

    Comment


      #3
      imported post

      Thanks, that works but it seems to limit me to four parameters. If I want to specify the MACD parameters and two SMA lines will I need to bypass the wizard and code it manually?

      Thanks

      Guy




      TraderGuy
      NinjaTrader Ecosystem Vendor - EMS

      Comment


        #4
        imported post

        Yes, you would need to manually add additional inputs.

        Ray
        RayNinjaTrader Customer Service

        Comment


          #5
          imported post

          Great, got it working with five inputs. Thanks for the responses.

          Guy
          TraderGuy
          NinjaTrader Ecosystem Vendor - EMS

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          64 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          41 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          22 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          25 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          51 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X