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 Brevo, Today, 01:45 AM
          0 responses
          6 views
          0 likes
          Last Post Brevo
          by Brevo
           
          Started by aussugardefender, Today, 01:07 AM
          0 responses
          3 views
          0 likes
          Last Post aussugardefender  
          Started by pvincent, 06-23-2022, 12:53 PM
          14 responses
          242 views
          0 likes
          Last Post Nyman
          by Nyman
           
          Started by TraderG23, 12-08-2023, 07:56 AM
          9 responses
          384 views
          1 like
          Last Post Gavini
          by Gavini
           
          Started by oviejo, Today, 12:28 AM
          0 responses
          6 views
          0 likes
          Last Post oviejo
          by oviejo
           
          Working...
          X